2

jmp *0x804a260(,%eax,4)

Say, for example, eax holds 2. This will take 2 * 4 and add it to 0x804a260 giving you 0x804a268, and will jump to that location, correct?

nrz
  • 10,435
  • 4
  • 39
  • 71
user2827048
  • 539
  • 6
  • 18
  • Long time since I've done assembler, but from memory JMP is the jump command, so it looks to me to jump to a specific pointer/address and properly transfering the values of the eax register – Allan S. Hansen Nov 20 '13 at 08:13

1 Answers1

3

jmp *0x804a260(,%eax,4)

The ATT syntax above is the same as the following in intel syntax:

jmp dword ptr [eax*4 + 0x804a260]

It computes the memory location eax*4 + 0x804a260, reads a dword from that location treating it like an address and jumps to that address.

Using your example, let's say eax is 2. The computed address is 0x804a268. Furthermore, let's say at 0x804a268 it contains 0xbadf00d. That means after doing the jmp the program counter eip will try to execute the next instruction at memory location 0xbadf00d.

greatwolf
  • 20,287
  • 13
  • 71
  • 105