Dripping Reverse Notes (5)

1. The target operand and source operand in the mov instruction cannot be memory units at the same time

(The general meaning of the error reported in the figure below is: the instruction does not support the given operand)

2. LEA syntax:

LEA target operand, ptr ds: a memory unit

Function: copy the number of this memory unit to the target operand

3. Push data

Three ways:

(1)mov dword ptr ds:[esp-4],0x12124545

sub esp,4

(2)SUB ESP,4

MOV DWORD PTR DS:[ESP],56562323

(3)MOV DWORD PTR DS:[ESP-4],78784545

LEA ESP,DWORD PTR SS:[ESP-4]

The above three methods just decompose the function of push into two steps

Just like push eax

It is to reduce the memory number corresponding to ESP by 4, and then copy the memory number corresponding to eax into the memory corresponding to ESP

4. Pop data

mov eax,dword ptr ds:[esp]//Assign the value in the memory number corresponding to esp to eax

add esp,4

If you use pop, it should be: pop eax

Guess you like

Origin blog.csdn.net/m0_51295934/article/details/122561541