View previous topic :: View next topic |
Author |
Message |
LtO Advanced Cheater Reputation: 0
Joined: 09 Mar 2015 Posts: 71
|
Posted: Fri Nov 09, 2018 4:06 am Post subject: How to change a pushstring... |
|
|
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 |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Fri Nov 09, 2018 9:43 am Post subject: |
|
|
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 |
|
|
LtO Advanced Cheater Reputation: 0
Joined: 09 Mar 2015 Posts: 71
|
Posted: Fri Nov 09, 2018 10:45 am Post subject: |
|
|
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 |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Fri Nov 09, 2018 10:54 am Post subject: |
|
|
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 |
|
|
LtO Advanced Cheater Reputation: 0
Joined: 09 Mar 2015 Posts: 71
|
Posted: Fri Nov 09, 2018 10:59 am Post subject: |
|
|
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
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 |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Fri Nov 09, 2018 11:53 am Post subject: |
|
|
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 |
|
|
|