c++ - What is going on in this? -


i reading through someone's code, , calling functions this. "this" in block pointer virtual method table, , using offsets call function in said table. hack thing in case wondering.

    __asm {     mov edi,     lea ecx, [edi + 0x4]     mov edx, dword ptr ds:[ecx]     call [edx + 0x24] }    

he has simpler bits of code call "this" + offset, confused on going on in one. can post vtable dump ida if @ all.

looks multiple inheritance. in such cases, there separate vtables each inherited class interface. so, 2nd , 3rd instructions calculate start of vtable specified inherited class interface. call obvious, 24 magic number, known offset function called in inherited class.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -