Previously, when the program begins there is no EBP. As methods now
expect the caller to set up their EBP, the entry-point needs to do this
for the entry function.
Additionally, the ESP was not modified to discard the method's stack
frame (i.e. localvars), which would cause an error on ret as EIP was
not on the top of the stack.
Previously, when the program begins there is no EBP. As methods now expect the caller to set up their EBP, the entry-point needs to do this for the entry function.
Additionally, the ESP was not modified to discard the method's stack frame (i.e. localvars), which would cause an error on
ret
as EIP was not on the top of the stack.