Can Someone Explain What Is The Push Opcode?
Can Someone Explain What Is The Push Opcode?
12345678
Last edited by exloserr on Mon Jun 13, 2022 5:16 pm, edited 1 time in total.
Re: Can Someone Explain What Is The Push Opcode?
In most cases the register rsp or esp holds the address of the top of the stack
-
- Expert Cheater
- Posts: 312
- Joined: Sat Oct 06, 2018 3:19 pm
- Reputation: 137
Re: Can Someone Explain What Is The Push Opcode?
But what means push? What means push 00000163?
-
- Table Makers
- Posts: 336
- Joined: Thu Aug 03, 2017 6:19 am
- Reputation: 206
Re: Can Someone Explain What Is The Push Opcode?
It loads("pushes") the hex value of 163 onto the top of the stack. That means that the value will be in [esp] for x32 or [rsp] in the case of x64. If there is another push after that instruction for example push 00000100 then [esp]/[rsp] contains the hex value of 100 and [esp+4]/[rsp+4] contains the hex value of 163. At least if the second value pushed onto the stack is 4 bytes big, if it is 8 bytes big then [esp+8]/[rsp+8] would contain the first value pushed onto the stack.
Instead of push 163 you could also write:
Code: Select all
sub esp,4 // or rsp and sub 8 for 8-Bytes big values
mov [esp],163
[Link]
[Link]
And maybe this:
[Link]
Who is online
Users browsing this forum: No registered users