Some help for bytecode hacking
-migrated-
Some help for bytecode hacking Posted on: 04/24/2012 6:17pm
Quote Post
Since im new to this, im having some trouble with editing variable's values, i.e.:
Code: [Select]
_as3_callpropvoid playerHit(param count:2)
//62 06
_as3_getlocal <6>
//d0
_as3_getlocal <0>
//66 87 05
_as3_getproperty containerType_
//62 08
_as3_getlocal <8>
//d0
_as3_getlocal <0>
//66 a4 02
_as3_getproperty _-Il
//66 b7 03
_as3_getproperty effects_
//27
_as3_pushfalse
//d0
_as3_getlocal <0>
//4f b6 0a 05
_as3_callpropvoid damage(param count:5)
Searching for the source:
Code: [Select]
map_.gs_.gsc_.playerHit(this.bulletId_, this.ownerId_);
                    _loc_6.damage(this.containerType_, _loc_8, this._-Il.effects_, false, this);
Is there a way to set a value for those locals, or to change the getlocal/getproperty for an specific value? So i could, for exemple, set the damage to 1, or the effect to "stun" or w/e i want... (there is the same script for enemyhit, so i could add like 10000 damage or a stun to my attacks)
Re: Some help for bytecode hacking Posted on: 04/24/2012 7:06pm
Quote Post
The getlocal <0> is equivalent to "this", so it just causes whatever opcode comes next to be executed in that scope. I'm not sure if that was clear or not.

You don't need to use it at all. Just replace whatever it is with push 1 or whatever. I don't really know which of those parameters is the damage, but supposing it's this.containerType_ you just to need to replace those 2 lines, getlocal<0> getproperty containerType_ with push 1, or push 0 or push whatever value you want.
Re: Some help for bytecode hacking Posted on: 04/24/2012 8:07pm
Quote Post
Never let a computer tell me shit.
I would argue that the dam,age is probably local 8. so change 62 08 to 24 00 for no damage



I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

Re: Some help for bytecode hacking Posted on: 04/24/2012 11:31pm
Quote Post
Changed the loc_8 to push 0, it doesnt show any dmg, but i still take the damage i was supposed to...
Im guessing the loc_0 is something like the projectile id, so the getproperty for like effects, etc are stored into it.
Re: Some help for bytecode hacking Posted on: 04/26/2012 12:00am
Quote Post
Try the other variables, one by one. That's how it goes. I don't think it's "false" and "this" is too vague, so my bet now is in this.-Il.effects
Re: Some help for bytecode hacking Posted on: 04/26/2012 3:43am
Quote Post
When i change the loc_8 to like 1, whenever i got hit it shows "-1" but the damage i was supposed to take is substracted from my current health...
Will try the other variables then update here... Just another question, when a setlocal/setproperty is called, the value set comes after or before?
i mean like
Code: [Select]
pushbyte 10
setlocal 8
or
Code: [Select]
setlocal 8
pushbyte 10
Re: Some help for bytecode hacking Posted on: 04/26/2012 6:43pm
Quote Post
Well, Flash is stack-based, so in order to set a property the value must be in the stack. In your example, you first need to push 10 then setlocal
Re: Some help for bytecode hacking Posted on: 04/26/2012 7:06pm
Quote Post
Got it. Thx for all the help so far (broken image removed)