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 change a pushstring...

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

Joined: 09 Mar 2015
Posts: 71

PostPosted: Fri Nov 09, 2018 4:06 am    Post subject: How to change a pushstring... Reply with quote

I would like to change this pushstring in a game, but I don't know how...

Code:
; 2c a7 26
ofs01af:pushstring "<room tmp=\'1\' gam=\'"


Since there is no pushtring in the code for room tpm with value 0, which is what I need... I tried to change the string in the code, before jit compilation but that didn't work. Is there a way I can do this?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Fri Nov 09, 2018 9:43 am    Post subject: Reply with quote

In an swf, all the strings are stored in a pool that code indexes into. a7 26 corresponds to index 4903 if I'm not mistaken (most significant bit variable length little endian encoding). Go there and change the string when the swf is loaded. That will also change any other code that accesses the string, but that's probably what you want anyways.
_________________
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
LtO
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2015
Posts: 71

PostPosted: Fri Nov 09, 2018 10:45 am    Post subject: Reply with quote

ParkourPenguin wrote:
In an swf, all the strings are stored in a pool that code indexes into. a7 26 corresponds to index 4903 if I'm not mistaken (most significant bit variable length little endian encoding). Go there and change the string when the swf is loaded. That will also change any other code that accesses the string, but that's probably what you want anyways.


Yes, but how does this practically work? Cuz I already changed that string and that didn't make it work, so how do I do this (With CE)?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Fri Nov 09, 2018 10:54 am    Post subject: Reply with quote

Use a breakpoint to stop flash from loading that swf as it is, make any changes you want, and then let it load the swf.

Redirecting the swf request to a modified local copy would also work, but that doesn't use CE. There are some browser extensions that makes this easier.

_________________
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
LtO
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2015
Posts: 71

PostPosted: Fri Nov 09, 2018 10:59 am    Post subject: Reply with quote

ParkourPenguin wrote:
Use a breakpoint to stop flash from loading that swf as it is, make any changes you want, and then let it load the swf.

Redirecting the swf request to a modified local copy would also work, but that doesn't use CE. There are some browser extensions that makes this easier.


You mean before jit compilation? But I already do that, I just don't know what to change lol... That was my question pretty much, I would change that bytecode to what I want but I have no sample of the bytecode I'd need...

Or do you mean editing the swf before it's even bytecode (in your memory)? Sorry I'm just not very expierenced with this Smile
Before I did anything much with CE I did use a webproxy too, and in theory you could let it use your own copy of the game but there is a protection for that "cross domain".
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Fri Nov 09, 2018 11:53 am    Post subject: Reply with quote

You change the string the same way you'd change AS3 bytecode. Search for it and change it. All modern swf versions use UTF-8, so unless it's a non-ascii character, it shouldn't be hard to find and change.

LtO wrote:
Or do you mean editing the swf before it's even bytecode (in your memory)?
That doesn't make sense. "Bytecode" is just a term used to classify certain parts of an swf.

Adobe's AVM2 Overview and (to a lesser extent) SWF File Format Specification have all the information you could ever want about how SWFs and the AVM work.

_________________
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