I am analyzing a Windows executable file(PE Format), probably written in Borland Delphi. The program starts with the following instructions:
pusha (1)
pushf (2)
xor ebp, ebp
jmp add_eh
add_eh:
mov eax, ss:off_4025E5[ebp]
mov dword ptr ss:(loc_402159+1)[ebp], eax
push offset loc_40215f (3)
push dword ptr fs:0
mov fs:0, esp (4)
mov eax, [esp+2Ch] (5)
cmp [eax+IMAGE_DOS_HEADER.e_magic], 'ZM'
jnz short loc_40206C
I reproduced on paper the stack until the instruction marked with (5), it seems that at (5) the esp+2Ch is pointing above the first register(AX) pushed by (1).
Where does esp+2Ch point and what can be it's value?
Thank you!