142k views
1 vote
12) Suppose you wanted a subroutine to return to an address that was 3 bytes higher in memory than the return address currently on the stack. Write a sequence of instructions that would be inserted just before the subroutine’s RET instruction that accomplish this task.

User EvanK
by
5.6k points

1 Answer

1 vote

Answer:

.code

main proc

mov ecx,ebp

mov ecx, 787878

push ecx

call MySe7en

invoke ExitProcess,0

main endp

MySe7en PROC

pop ecx

sub ecx, 3

mov

push ecx

ret

end main

User Narae
by
5.7k points