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 


Find the address values of a variable number of things...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
5tapl3r
Newbie cheater
Reputation: 0

Joined: 31 Dec 2013
Posts: 15

PostPosted: Tue Dec 31, 2013 1:53 pm    Post subject: Find the address values of a variable number of things... Reply with quote

Hi, I'm new cheat engine but I've done the tutorial and I can't seem to find any info on what I'm looking for.

Here is what I'm trying to do:

I'm trying to find the address of some values, but there is never a definite number of values, it's always random. I don't even know if that makes sense or if that is possible...

For example, let's say I use notepad++. I'd would like to make a program in c++ that reads every .txt files opened with notepad++ from the memory addresses of notepad++ (I realize I could do it more easily some other way, but I'm trying to do it that way to learn how to do it.

So if I've 3 files opened in notepad++ with different strings, I'd like my program to display:

file 1: [string 1]
file 2: [string 2]
file 3: [string 3]

Thanks for the help!
Back to top
View user's profile Send private message
Rawing
Cheater
Reputation: 0

Joined: 01 May 2010
Posts: 42
Location: Austria

PostPosted: Thu Jan 02, 2014 5:38 am    Post subject: Reply with quote

That'll be difficult.
You'll have to hope that the file names are saved in an array.

I'd start off by opening a few tabs in Notepad++, then finding the file names with CE. Then find the pointer to each file name (since the file name is a string, there should be a pointer to it). When you've found all of them, see if their addresses have a certain distance from each other - if they're saved in an array, that'll be the case. For example, the memory layout might look like this:
(It's marked as code because otherwise the indentation is messed up. Good job, you damn forum software.)
Code:
address     description
5              pointer to file name 1
9              pointer to file name 2
13            pointer to file name 3
...


In this example, the "distance" between each address is 4.
Next, find the pointer path to the array. Since you know in which general area the array starts (somewhere near the address 5 in the example), that shouldn't be too difficult. You can use the pointer scanner for this; since Notepad++ isn't a memory hog, it should finish in a short time.

Once you have the pointer path to the array and the distance between the array's items, you can access each item in the array. All that's left is to find out how many items the array actually holds. I don't know how arrays look in memory, but I think it'll look somewhat like this:
Code:
address    description
xxx          number of items in the array
xxx+4      pointer to the array of file names


Once you know all this, writing the program should be an easy task.

_________________
Game over! Die again!
Back to top
View user's profile Send private message MSN Messenger
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