How to check the EIP value with assembly language? [duplicate]

Assuming 32-bit x86, use the following function:

get_eip: mov eax, [esp]
         ret

Then, to get the value of EIP in EAX, simply:

call get_eip

Leave a Comment