How to find this code
- Use must have Sothink Decompile (the current portable version is 6.4, google it ^^)
- Save the swf game file and use Sothink Decompile open it.
- Try to find the function you want to hack
Ex: i want to hack energy request and i found this function
Here is a source code of this function
public function lowEnergyNotify(param1:Boolean = false) : void
{
var _loc_2:* = LogicFacade.instance.findUser("Friend");
if (_loc_2 != null)
{
return;
}
if (param1 == true || this.m_lowEnergyAlertEnabled == true)
{
if (this._case0() == true)
{
return;
}
if (this._case1() == true)
{
return;
}
if (this._case2() == true)
{
return;
}
if (this._case4() == true)
{
return;
}
this._case5();
this.m_lowEnergyAlertEnabled = false;
}
return;
}// end function
In this case, you only request energy when case0 case1 case2 case3 case4 = false. If not, this function is return and the case5 will be nerver call. We can hack it if we remove all return statement in this function. Now go to the Raw Data tab of Sothink Decomplie and search this function, we will see
//d0
_as3_getlocal <0>
//46 c8 04 00
_as3_callproperty _case0(param count:0)
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
//26
_as3_pushtrue
//d0
_as3_getlocal <0>
//46 c9 04 00
_as3_callproperty _case1(param count:0)
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
//26
_as3_pushtrue
//d0
_as3_getlocal <0>
//46 ca 04 00
_as3_callproperty _case2(param count:0)
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
//26
_as3_pushtrue
//d0
_as3_getlocal <0>
//46 cc 04 00
_as3_callproperty _case4(param count:0)
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
The opcode of return statement is 47 (_as3_returnvoid). Change it to 02 (NOP - do nothing). (We can see all opcode of AS3 in this link http://www.anotherbigidea.com/javaswf/a ... tions.html)
DONE :twisted: