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 


Getting pointer offset from another pointer

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

Joined: 21 Nov 2024
Posts: 2

PostPosted: Thu Nov 21, 2024 9:04 am    Post subject: Getting pointer offset from another pointer Reply with quote

Hi all,

I am trying to calculate the path of a pointer using memory pointed by another pointer, something like this
[[xxx.DLL+123abc]+[[xxx.DLL+123abc]+456*4]*4]+4

I could not find related info and I will really appreciate if anyone can provide some help.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 147

Joined: 06 Jul 2014
Posts: 4536

PostPosted: Thu Nov 21, 2024 12:21 pm    Post subject: Reply with quote

If the offset's type is an 8-byte integer, that should work fine. If it's not, explicitly specify the type by putting one of the following tokens in parenthesis before the dereference:
  • BYTE - 1-byte unsigned
  • CHAR - 1-byte signed
  • WORD - 2-byte unsigned
  • SHORT - 2-byte signed
  • DWORD - 4-byte unsigned
  • LONG - 4-byte signed
  • QWORD / UINT64 - 8-byte unsigned
  • LONGLONG / INT64 - 8-byte signed
e.g. 4-byte signed value:
Code:
local address = getAddress'[[xxx.DLL+123abc]+(LONG)[[xxx.DLL+123abc]+456*4]*4]+4'
print(('%08X'):format(address))

If you want to add an address to the address list, you can specify the offset like that too:
Code:
offs0: 4
offs1: (LONG)[[xxx.DLL+123abc]+456*4]*4
base:  xxx.DLL+123abc
Regarding the address list, it seems offsets are truncated to 4-byte signed integers before they're added to the pointer node. This differs from the symbol handler.
_________________
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
ironlizardster
How do I cheat?
Reputation: 0

Joined: 21 Nov 2024
Posts: 2

PostPosted: Thu Nov 21, 2024 12:39 pm    Post subject: Reply with quote

Thanks!
I was wondering if there was option to do it without lua but looks like that's the only option.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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