我遇到了以下带有大量案例(160+)的跳转表。不过,IDA 分析中似乎缺少一些案例。例如,它从案例 22 -> 38 -> 91 中跳过,我总共可以看到大约 10 个案例。
- 我可以期望所有 switch case 都占用顺序内存吗?有没有可能这些案例没有丢失,只是位于内存中的其他地方?
- 如果它们通常是连续的,那么 IDA 是否只是误解了这些案例?
- 谁能解释为什么有大量属于这个跳转表的案例,但我只看到少数几个?
周围的说明0052B970,它是位于屏幕截图正上方的 disasm:
.text:0052B932 loc_52B932: ; CODE XREF: sub_52B920+9↑j
.text:0052B932 8A 01 mov al, [ecx]
.text:0052B934 3C B5 cmp al, 0B5h
.text:0052B936 73 F3 jnb short loc_52B92B
.text:0052B938 0F B6 D0 movzx edx, al
.text:0052B93B 8B 04 95 E8 0A+ mov eax, dword_730AE8[edx*4]
.text:0052B942 85 C0 test eax, eax
.text:0052B944 57 push edi
.text:0052B945 8B 7D 08 mov edi, [ebp+arg_0]
.text:0052B948 89 07 mov [edi], eax
.text:0052B94A 75 06 jnz short loc_52B952
.text:0052B94C 5F pop edi
.text:0052B94D 5E pop esi
.text:0052B94E 5D pop ebp
.text:0052B94F C2 04 00 retn 4
.text:0052B952 ; ---------------------------------------------------------------------------
.text:0052B952
.text:0052B952 loc_52B952: ; CODE XREF: sub_52B920+2A↑j
.text:0052B952 85 C0 test eax, eax
.text:0052B954 53 push ebx
.text:0052B955 0F 8D DC 01 00+ jge loc_52BB37
.text:0052B95B 8D 42 EA lea eax, [edx-16h] ; switch 158 cases
.text:0052B95E 3D 9D 00 00 00 cmp eax, 9Dh
.text:0052B963 0F 87 C8 01 00+ ja loc_52BB31 ; jumptable 0052B970 default case
.text:0052B969 0F B6 80 80 BB+ movzx eax, ds:byte_52BB80[eax]
.text:0052B970 FF 24 85 44 BB+ jmp ds:off_52BB44[eax*4] ; switch jump
.text:0052B977 ; ---------------------------------------------------------------------------
.text:0052B977
.text:0052B977 loc_52B977: ; CODE XREF: sub_52B920+50↑j
.text:0052B977 ; DATA XREF: .text:off_52BB44↓o
.text:0052B977 83 FE 0D cmp esi, 0Dh ; jumptable 0052B970 case 22
.text:0052B97A 72 4A jb short loc_52B9C6
.text:0052B97C 0F B7 49 01 movzx ecx, word ptr [ecx+1]
.text:0052B980 5B pop ebx
.text:0052B981 89 0F mov [edi], ecx
.text:0052B983 5F pop edi
.text:0052B984 B8 01 00 00 00 mov eax, 1
.text:0052B989 5E pop esi
.text:0052B98A 5D pop ebp
.text:0052B98B C2 04 00 retn 4
谢谢。
