我遇到过这个函数,它接受一个指向我认为是自定义 C 结构的指针。我根据随后的访问得出了这个结论。
arg_0= dword ptr  4   ;struct passed in
push    ebx
push    ebp
mov     ebp, [esp+8+arg_0]  ; store pointer of struct in ebp
push    esi
push    edi
xor     ebx, ebx
而且,离上面不远,我看到它被填充了:
mov     [ebp+0D4h], bl
mov     [ebp+0F4h], bl
mov     [ebp+114h], bl
xor     eax, eax
mov     [ebp+0B8h], eax
mov     [ebp+0BCh], eax
mov     [ebp+0C0h], eax
我不知道结构的大小,但我见过[ebp+0f14h]. 因此,我定义了一个 size 的自定义 IDA 结构0xF14。现在我在将这个自定义结构应用于这个指针时遇到了麻烦。我试过Alt+Q然后选择我自己的自定义结构,但它不起作用。输出窗口说Command "DeclareStructVar" failed
我的自定义结构:
00000000 custom_sturct   struc ; (sizeof=0xF14)
00000000                 db ? ; undefined
00000001                 db ? ; undefined
00000002                 db ? ; undefined
[...same stuff...]
00000F11                 db ? ; undefined
00000F12                 db ? ; undefined
00000F13 field_F13       db ?
00000F14 custom_sturct   ends
00000F14
我正在使用 IDA Pro 6.3


