Two push, but only one pop. Should be farily obvious why the exception occurs.
push eax ;save eax
push ebx ;save ebx
mov eax, 100 ;store 100 to eax?
pop ebx
ret
If you push
somthing on the stack, you must ensure that the stack balances by either manually adjusting it, or by using the same number of pop
as you pushed before. In your case the ret
instruction will jump somwhere where eax
originally pointed to.
0x7b == 123 == eax