User talk:2.93.215.157

sub ebp, N - is incorrect for the prologue and will corrupt the stack and when the return is hit at the epilogue will the wrong return address.

Suppose we have this:

main: @0x1000 call function1

function1: @0x2000 push ebp mov ebp, esp sub ebp, 4 mov dword [ebp-4], 0x33 mov esp, ebp pop ebp ret     <--- 0x1000 should be at the top of the stack, but it's off by -4

The stack is off at the return by 4 bytes. Check it in a debugger :).