I have this piece of x86 assembler code:
mov edx, off_984C400
mov eax, [edx+1E0h]
call eax
The OpenSecurityTraining-Videos teached me that [something]
meants that the processor tries to access memory at the position something
.
That would mean move 0x984C400 into edx, add 0x1E0 to it and call whatever address there is in memory
.
My problem now is, that I only have static analysis via IDA available and don't know how I can find out what address is at [0x984C400 + 0x1E0]
. Is there any way I can get the static address of the function?
The most likely explanation would be that the address in question is either a
struct
that has a virtual function pointer (set somewhere else), or that it's avtable
(if it's C++). The pointer is probably in the data segment (check that yourself)If it's a
struct
with virtual functions, check the address'sxref
s (and maybe of the addresses around it)vtable
s are initialized inctor
s, so in this casexref
ing the address should get you to thector
.Anyway, remember that this call can be translated into more than one possible function.