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 


Integer variables have weird values

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

Joined: 22 Feb 2023
Posts: 7
Location: Spain

PostPosted: Wed Feb 22, 2023 9:06 am    Post subject: Integer variables have weird values Reply with quote

Im hacking a game where the values seem to have been mangled for some reason. For example:


0 is 11622982758321214820
5 is 7337589450990942497
etc

My best guess is that there is some kind of intentional obfuscation.
Back to top
View user's profile Send private message
Xx XoTiC V1 xX
Cheater
Reputation: 1

Joined: 03 Aug 2012
Posts: 43

PostPosted: Wed Feb 22, 2023 9:45 am    Post subject: Re: Integer variables have weird values Reply with quote

ArdiCamarada wrote:
Im hacking a game where the values seem to have been mangled for some reason. For example:


0 is 11622982758321214820
5 is 7337589450990942497
etc

My best guess is that there is some kind of intentional obfuscation.



More than likely encryption, if you see any XORs when looking in the disassembler then chances are there's some encryption going on, even if you don't see any XORs it still could be encrypted but some game code just works differently then what you may usually see. I haven't studied all opcode instructions but you need to trace and find where the value is BEFORE it gets encrypted if that is what's going on, there's tutorials to learn about breaking and tracing for encrypted values

_________________
Learning as I go.
Back to top
View user's profile Send private message
ArdiCamarada
How do I cheat?
Reputation: 0

Joined: 22 Feb 2023
Posts: 7
Location: Spain

PostPosted: Wed Feb 22, 2023 11:41 am    Post subject: Reply with quote

It could very well be that the game logic was running in some sort of interpreter, like python does.

Try looking for the x value in this code with cheat engine, it won't work.

Code:

x = 0
while True:
  # wait for user input
  x += 1
  input(x)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Feb 22, 2023 2:35 pm    Post subject: Reply with quote

can you change the value?

E.g. the current value is 0, and you scan for 11622982758321214820 and then change it to 7337589450990942497 , it changes to 5 ?

if not, then you only found a display value. Perhaps it's even part of a string instead of the actual value

_________________
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
ArdiCamarada
How do I cheat?
Reputation: 0

Joined: 22 Feb 2023
Posts: 7
Location: Spain

PostPosted: Wed Feb 22, 2023 5:27 pm    Post subject: Reply with quote

Yes, I found the true value.
When I inspect the memory only those 8 bytes change.

Browsing what accesses that memory so I can undo the encryption (xor encryption is really easy to undo haha) is tough because attaching a debugger crashes the game immediately and activating the dbvm crashes the game after 5 minutes or so. (even with CE off).

I'm just exploring my options. Maybe they use an interpreter like python for the game logic, maybe they encript their variables, maybe something else I don't know.

_________________
Life is just a monadic bind
Back to top
View user's profile Send private message
Xx XoTiC V1 xX
Cheater
Reputation: 1

Joined: 03 Aug 2012
Posts: 43

PostPosted: Thu Feb 23, 2023 2:26 pm    Post subject: Reply with quote

ArdiCamarada wrote:
Yes, I found the true value.
When I inspect the memory only those 8 bytes change.

Browsing what accesses that memory so I can undo the encryption (xor encryption is really easy to undo haha) is tough because attaching a debugger crashes the game immediately and activating the dbvm crashes the game after 5 minutes or so. (even with CE off).

I'm just exploring my options. Maybe they use an interpreter like python for the game logic, maybe they encript their variables, maybe something else I don't know.


It's either encryption or just how the memory works, I'm not very informed when it comes to interpreters but I have seen experiences of values just being huge and no signs of encryption or anything that would affect it, or just strings being loaded in. Whatever game developers want to do usually.

For the crashing part, there might be some kind of protection to the game you're working with you'd have to solve, there could also be integrity checks which the plugin stealthedit is very useful for getting around, unfortunately that plugin hasn't been updated in a decade so I doubt it works on new Cheat Engines. I think 6.3 or 6.7 somewhere around there I know it works on.

Integrity checks are basically like if you change any bit of opcode that has a check going through it the game will instantly crash. There is ways around that I just don't remember options 100%, think a code cave was one solution.

_________________
Learning as I go.
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