Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Do I Know x86?

Name: Anonymous 2014-10-30 20:35

Found this while reversing a program:

mov esi, ds:MessageBoxA
call esi ; MessageBoxA


Am I missing something or are these the stupidest two instructions ever emitted by a C++ compiler?

Name: Anonymous 2014-10-31 15:53

call rel32
Displaces by a 32 bit *signed* quantity, so if you wanted to call a procedure that is greater than 2^31-1 away from current EIP you would need to use an indirect call through a register.
Also for 64 bit x86 the only way to get at the full 64 bit absolute addressing mode is the mov instruction, so to call a function at addresses > 4GB you would have to use mov reg, address + call reg

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List