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 


creating an asm opcode

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Effection
How do I cheat?
Reputation: 0

Joined: 25 Mar 2007
Posts: 5

PostPosted: Mon Jun 25, 2007 5:15 am    Post subject: creating an asm opcode Reply with quote

Don't ask why I'll +Rep... my code is dynamically allocated and inserted into a program and i need to be able to create a "call" and "jmp" op code to the start address and to a function used by the code.
In mips its easy enough for a jal,
(0x0C000000 | (0x03FFFFFF & ((u32)address >> 2)))
but i cant find out how to do it for x86 Crying or Very sad
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Mon Jun 25, 2007 5:55 am    Post subject: Reply with quote

First byte is a 0xe9, then the next 4 are (addressto-(addressfrom+5)), which can also be written as (addressto-addressfrom-5).
_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Mon Jun 25, 2007 6:05 am    Post subject: Reply with quote

I just used this thing a while ago, I checked manually with CheatEngine - I've allocated some memory, added a JMP and start changing values.. about 2 mins..
Back to top
View user's profile Send private message
Effection
How do I cheat?
Reputation: 0

Joined: 25 Mar 2007
Posts: 5

PostPosted: Mon Jun 25, 2007 1:25 pm    Post subject: Reply with quote

Thankyou Uzeil! Very Happy is this the same for "call" with the first byte being 0xe8 ?
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