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 


Increasing length of array of byte string corrupts memory

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

Joined: 09 Jun 2021
Posts: 1
Location: United States

PostPosted: Wed Jun 09, 2021 9:08 am    Post subject: Increasing length of array of byte string corrupts memory Reply with quote

I've been trying to figure this out for quite a while now.

There's a certain string I want to change in a game's memory. I can make it shorter, as long as I add null bytes (00) to keep it the same length. The problem occurs when I want to make it larger. The reason I can't do this because the next string starts right after the first one, so increasing the length of the first would overwrite part of the second and corrupt the game memory.

It's very important that I find out how to increase this string's length without breaking the game, anyone have any thoughts?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4719

PostPosted: Wed Jun 09, 2021 11:08 am    Post subject: Reply with quote

There's no easy way of doing that.

Best thing you can do is change pointers to that string to your own allocated memory. This might crash the game if it tries to free your memory, so you might need to do a code injection instead. The instructions that access the string's characters are probably generic and access many strings: a better injection point might lie up the callstack.

_________________
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
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Jun 09, 2021 11:13 am    Post subject: Reply with quote

find all references to the start of that string.

then allocate memory, write the string you like there, and then uodate all those references to point to your string

Note though that some stringlist references are indirect so you may have to do some debugging/disassembling to point it to the correct new address

_________________
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
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