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 


Relative jmp offset calculation

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

Joined: 18 Feb 2018
Posts: 4

PostPosted: Tue Feb 20, 2018 10:00 am    Post subject: Relative jmp offset calculation Reply with quote

I'm trying to understand how cheat engine calculates the jmp 7FF6DA550000 opcode from E9 E9DBBBFF bytecode.

The start of the jmp instuction is at 7ff6da992412

The closest I've been able to get calculating the address it will jump to is

(7ff6da992412 + 5) + FFBBDBE9 = 7FF7DA550000

FFBBDBE9 in the swapped endian of E9DBBBFF.

7FF[7]DA550000 is almost right except the 7 in brackets should be a 6.

Any clues on where to go from here or how you would calculate the absolute jmp address from the instruction location and relative offset



cheatengine-x86_64_2018-02-20_10-34-21.png
 Description:
 Filesize:  124.55 KB
 Viewed:  3542 Time(s)

cheatengine-x86_64_2018-02-20_10-34-21.png


Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Tue Feb 20, 2018 10:16 am    Post subject: Reply with quote

For x64 addresses in instructions use an offset and the next instruction's address, so 0xE9DBBBFF + game.exe+432417 = 0x7FF6DA550000.
_________________
Back to top
View user's profile Send private message Visit poster's website
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Tue Feb 20, 2018 10:26 am    Post subject: Reply with quote

(7ff6da992412 + 5) + FFBBDBE9 = 7FF7DA550000
FFBBDBE9 as a signed 4 byte value is negative though because it's greater than 7FFFFFFF, -4465687 in decimal, positive 4465687 = 0x00442417

(7ff6da992412 + 5) - 00442417 = 7FF6DA550000

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
muse4665
How do I cheat?
Reputation: 0

Joined: 18 Feb 2018
Posts: 4

PostPosted: Tue Feb 20, 2018 10:56 am    Post subject: Reply with quote

FreeER wrote:
(7ff6da992412 + 5) + FFBBDBE9 = 7FF7DA550000
FFBBDBE9 as a signed 4 byte value is negative though because it's greater than 7FFFFFFF, -4465687 in decimal, positive 4465687 = 0x00442417

(7ff6da992412 + 5) - 00442417 = 7FF6DA550000


That works, thank you.
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