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 dynamicaly autopopulate cheat table?

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

Joined: 21 Apr 2009
Posts: 7

PostPosted: Thu May 29, 2014 9:45 pm    Post subject: How to dynamicaly autopopulate cheat table? Reply with quote

I have a static offset (no pointer needed) to a list of structures of a game, but the order is randomized on each new run. If i look at the memory I can easily identified the structs that i want to modifiy as they start with a static 4byte string.

I would like to dynamicaly add these addresses to my cheat table.

Is that possible and if yes how? I tried to find a tutprial for it but this is very hard to find if i don't know for what to search.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Thu May 29, 2014 10:01 pm    Post subject: Reply with quote

Yes, it's possible. Just filter out the addresses/structures that you want to add to your cheat table by using the 4 byte strings. Then, just load each register in to a custom address. When you add the custom addresses to your table, just label them accordingly and add the correct offset.

I have published a few examples on how to do this. If you need help, be sure to post your script.
Back to top
View user's profile Send private message
Lockhead
How do I cheat?
Reputation: 0

Joined: 21 Apr 2009
Posts: 7

PostPosted: Thu May 29, 2014 10:06 pm    Post subject: Reply with quote

until now I never scripted in CE so a hint to your example scripts would be helpfull.
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Thu May 29, 2014 11:14 pm    Post subject: Reply with quote

Lockhead wrote:
until now I never scripted in CE so a hint to your example scripts would be helpfull.


Code:

[enable]
aobscan(mysymbol, b yt es 0f my st at ic st ri ng)
label(mystruct)
registersymbol(mystruct)
mysymbol:
mystruct:
[disable]


Then, add your struct to the table using "struct" as the address of the base.

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Fri May 30, 2014 12:45 am    Post subject: Reply with quote

It is possible that I misunderstood something. Lockhead, when you say you have a list of structures, are you referring to an instruction that handles all of these structures...or something else?

I assumed you were referring to an instruction, if not, I'm not sure what you're asking.
Back to top
View user's profile Send private message
Lockhead
How do I cheat?
Reputation: 0

Joined: 21 Apr 2009
Posts: 7

PostPosted: Fri May 30, 2014 9:43 am    Post subject: Reply with quote

What I have is this:

app.exe+94C844 at this offset the list starts with it first entry and it is static, so on every run of the application the list start at this offset. From here on every +C is a new list entry and the struct of each entry looks like this:
{
4 Byte, uniqe id
1 Byte, the value i want to change
7 Byte zero padding
}

My Problem is now, that the order is randomized on each run, so I can't access the value directly as there are some of them that should not be changed or modified but other can. I know the uniqe id of each one I want to modify.

So I need a way to identify the postions of the entries I want to change.
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Fri May 30, 2014 11:22 am    Post subject: Reply with quote

I may be wrong, but I think it's more likely that you're just getting the wrong starting address (app.exe+94c844). It seems more likely to me that you're getting something that's off a few bytes and misinterpreting the structure members than it is that they are rearranging themselves. Either way, if you have a known, constant, unique ID then just scan for that.

What game is this, btw?

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Fri May 30, 2014 1:52 pm    Post subject: Reply with quote

As far as I'm concerned, you have two options:

1. Check to see if any of those values are collectively being accessed by a single instruction and inject your script there (follow the steps outlined in my initial post).
2. Use the approach that justa_dude has given, and set up AOB scans for every unique ID string.
Back to top
View user's profile Send private message
Lockhead
How do I cheat?
Reputation: 0

Joined: 21 Apr 2009
Posts: 7

PostPosted: Fri May 30, 2014 2:23 pm    Post subject: Reply with quote

As the list is randomized a simple AoB scan would not work as I could only scan for the identifier but thats no way to go as the identifier is used more than once in the application, or can i set the starting offset for scripted aob scans?
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Fri May 30, 2014 2:31 pm    Post subject: Reply with quote

Lockhead wrote:
As the list is randomized a simple AoB scan would not work as I could only scan for the identifier but thats no way to go as the identifier is used more than once in the application, or can i set the starting offset for scripted aob scans?


Didn't you say that there follows a pattern of one unknown byte, seven zero bytes, and a four-byte ID that repeats? Sounds like enough for a unique scan to me.

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
Lockhead
How do I cheat?
Reputation: 0

Joined: 21 Apr 2009
Posts: 7

PostPosted: Sat May 31, 2014 10:41 am    Post subject: Reply with quote

Yes the the format of the list entries, but there are multiple list with the same layout and same content but different functionality, so a scan von only the uniqe id will return multiple values. Nevermind I wanted to do it in CE so that anybody user could look into the code, but writing this stuff in C# is easier as I have iterators and all this stuff around.
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