Need help understanding E8 asm call instruction x86

前端 未结 2 1151
你的背包
你的背包 2021-02-01 06:59

I need a helping hand in order to understand the following assembly instruction. It seems to me that I am calling a address at someUnknownValue += 20994A?

E8 32F         


        
2条回答
  •  自闭症患者
    2021-02-01 07:35

    Whatever you're using to obtain the disassembly is trying to be helpful, by giving the target of the call as an offset from some symbol that it knows about -- but given that the offset is so large, it's probably confused.

    The actual target of the call can be calculated as follows:

    • E8 is a call with a relative offset.
    • In a 32-bit code segment, the offset is specified as a signed 32-bit value.
    • This value is in little-endian byte order.
    • The offset is measured from the address of the following instruction.

    e.g.

           E8 32 F6 FF FF         call 
    +5     (next instruction)
    
    • The offset is 0xFFFFF632.
    • Interpreted as a signed 32-bit value, this is -0x9CE.
    • The call instruction is at and is 5 bytes long; the next instruction is at + 5.
    • So the target address of the call is + 5 - 0x9CE.

提交回复
热议问题