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 


JMP on 64 bit games (AOB Injection)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Alphasoldier
Advanced Cheater
Reputation: 1

Joined: 07 Apr 2009
Posts: 95

PostPosted: Thu Aug 24, 2017 2:49 pm    Post subject: JMP on 64 bit games (AOB Injection) Reply with quote

So I decided to take a wild step into 64 bit games, managed to find several functions that I could use, so I wrote my own code for it which worked just fine.
However, every time I disabled the script, the game would crash.
It took me some time, but I found the reason.

The simple jmp that goes to my piece of code is more than twice as long than most 32 bit games.
Code:
jmp 2B40C6A0000
>
FF25 00000000 00006A0CB4020000

I used a template for this, so maybe it's entirely my fault, but I'd love to know if there is some 64-bit alternative to a JMP, or am I just stuck with this long string of zero's because it's 64-bit?
Having asked that, I also have no idea why there's a quadword of 0's there. It feels useless.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4300

PostPosted: Thu Aug 24, 2017 3:33 pm    Post subject: Reply with quote

It's because there is no jmp rel64 instruction. What's being shown is a pseudoinstruction CE defined. The instruction being executed is actually a jmp r/m64 using rip-relative addressing with a displacement of 0 (hence the dword 0), and the 64-bit address being jumped to is stored in the next qword after that instruction.

If you don't like that, make sure the address being jumped to is within a signed rel32 displacement of the injection point so CE can assemble a jmp rel32 instruction instead. Passing an address as the third argument to alloc will make CE allocate memory near that address (CE should automatically fill this in for you if you selected a standard template).

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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 Gamehacking 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