Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Opcode to bytes [C++]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
booingthetroll
Expert Cheater
Reputation: 0

Joined: 30 Aug 2011
Posts: 114
Location: ::1

PostPosted: Fri Feb 08, 2013 7:11 pm    Post subject: Opcode to bytes [C++] Reply with quote

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
View user's profile Send private message
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Fri Feb 08, 2013 8:42 pm    Post subject: This post has 1 review(s) Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites