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 


Pointer+Address+Offset

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sat Jul 29, 2017 4:28 am    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?t=422516

you need to dereference luBase+213740 to a pointer first and add 3e0 to that

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Jul 29, 2017 10:38 am    Post subject: This post has 1 review(s) Reply with quote

pseudocode
Code:
//  dereference luBase+213740
baseAddress = readPointer(luBase+0x0213740) // *(void*)(...)

offsets = {..., 0x3E0} // ... represents values for multi-level pointers

// read through pointer/offset chain
address = baseAddress
for i=0, offsets.length-1 // skip last offset
  address = readPointer(address+offsets[i]) // *(void*)(...)

// add last offset (0x3E0) and read as final type
value = readType(address+offsets[offsets.length-1], DWORD) // *(DWORD*)address

// readInteger(readPointer(luBase+0x0213740) + 0x3E0)
// DWORD value = *(DWORD*)((*(void*)luBase+0x0213740)+0x3E0)


Personally, I'd highly recommend you make a function or two that will do the work for 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 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