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 


How to traverse/iterate through this container?

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

Joined: 25 May 2014
Posts: 59

PostPosted: Wed May 15, 2019 11:26 am    Post subject: How to traverse/iterate through this container? Reply with quote

I spent ~30minutes trying to figure out, no idea how to do that so I'm asking for the help of hax0rz who are experienced with this kind of stuff:
I have this address:

Offset20 is a pointer to some kind of list/vector
Offset24 is "how many elements it contains"

The inside of it:
https://prnt.sc/np0902

Offset0 leads to "element one"
Offset4 leads to "element two"
Offset8 leads to "element three"

However, if the "list size" was 2 then
Offset0 leads to "element two"
Offset4 leads to "element two"
Offset8 leads to "element three"

Each of these "elements" has useful (for me) information at offset10 and offset14 so I need to get those

The inside of each elements looks like this:
http://prntscr.com/np0ai4
http://prntscr.com/np0au9
http://prntscr.com/np0ayh

It looks like they just point to whatever randomly (this doesn't look like a .next() and .previous() pointers) so I can't figure out how I could iterate through this from my code. The list could contain from 0 to a hundred of elements.
In case of someone generous enough to provide example code, most readable would be C++[/code]
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4290

PostPosted: Wed May 15, 2019 3:52 pm    Post subject: Reply with quote

It looks like some type of tree. The pointers are the left node, parent, and right node.
_________________
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