|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
booingthetroll Expert Cheater Reputation: 0
Joined: 30 Aug 2011 Posts: 114 Location: ::1
|
Posted: Fri Feb 08, 2013 7:11 pm Post subject: Opcode to bytes [C++] |
|
|
I discovered an exploit for Roblox, and I would like to automate it with C++. I have just about everything done except for one problem - I have the memory allocated(I hope... no errors), but I need to basically do
push [allocated mem addr]
As you know, they're mixed up and I don't know how to change "push 1234567" into 68 67 45 23 01. Anyway, how2do?
|
|
Back to top |
|
|
Innovation Grandmaster Cheater Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Fri Feb 08, 2013 8:42 pm Post subject: |
|
|
0x01234567 -> {0x01, 0x23, 0x45, 0x67} -> {0x67, 0x45, 0x23, 0x01} (Reverse Order)
PUSH imm16/32 corresponds to 0x68 (see this for reference).
Putting it together, you have {0x68, 0x67, 0x45, 0x23, 0x01}.
The reason the bytes are reversed is that x86 uses little-endian.
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|