If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.

#243 method is partially decompiled
Author:
honfika

Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS1/2AS3Obfuscated
State: closed 

> What steps will reproduce the problem?
Open attached swf
Find com\common\cursor\cursors\HammerCursor class
Find downHandler method
> What is the expected output? What do you see instead?
Current:
if((this.clickTarget) && ((_loc2_) || (_loc3_)))
{
_loc4_=this.clickTarget as DragItem;
if(_loc4_)
{
_loc5_=_loc4_.data as EquipVO;
}
this.hide();
}
Expected: attached
> What version of the product are you using? On what operating system?
1.6.6u2, win7 x64
> Please provide any additional information below. Attach the file you have problem with
if neccessary. If you do not want to publish files YOU CAN CHANGE VISIBILITY TO PRIVATE
Wring since 1.6.5. In 1.6.4u1 and 1.6.3u2 it was OK.


Another example
Class: syscode\AdventuresRequestWindowMov
Method: Show
Current:
for each (_loc3_ in param1)
{
this.AddUser(_loc3_);
_loc2_=_loc2_ + _loc3_.NAME;
}
Expected:
for each (_loc3_ in param1)
{
this.AddUser(_loc3_);
if(_loc2_!="")
{
_loc2_=_loc2_+", ";
}
_loc2_=_loc2_+_loc3_.NAME;
}

State: new→opened
version 1.6.7 released
the first one should be fixed, try it
the second one still not I think
State: opened→new
When automatic deobfustacion is on, the first is still wrong. Is it ok?
It is the same with the 2nd (only works with automatic deobfustacion = off)
State: new→returned
State: returned→opened
version 1.7.0 was released
this should be fixed, try it
State: opened→upgraded
Yes, the previous problems was fixed, but i found new problem in the new version:)
2.swf\scripts\DefineSprite_4\frame 1\DoAction.as
Current:
if(klist_scroll == true)
{
}
Expected:
if(klist_scroll == true)
{
if(klist_scroll_vt == "dong")
{
switch(klist_scroll_align)
{
case "l":
this._x=klist_x - w_bg + klist_scroll_close_missx;
this._y=klist_y;
break;
case "r":
this._x=klist_x + w_bg - klist_scroll_close_missx;
this._y=klist_y;
break;
case "t":
this._x=klist_x;
this._y=klist_y - h_bg + klist_scroll_close_missy;
break;
case "b":
this._x=klist_x;
this._y=klist_y + h_bg + klist_scroll_close_missy;
break;
}
}
}

2.swf\scripts\DefineSprite_57_player\frame 1\DoAction.as
Current:
for(i in show_phim.ytplayer.getAvailableQualityLevels())
{
_loc3_ = _loc3_ + 1;
_loc2_ = "medium";
}
Expeced:
for(i in show_phim.ytplayer.getAvailableQualityLevels())
{
_loc3_=_loc3_+1;
switch(_loc3_)
{
case 1:
_loc2_="medium";
break;
case 2:
_loc2_="medium,large";
break;
case 3:
_loc2_="medium,large,hd720";
break;
case 4:
_loc2_="medium,large,hd720,hd1080";
break;
}
}
In bezierMaker.swf\scripts\__Packages\caurina\transitions\Tweener.as
at the tnd of method addTween
Current:
_loc17_ == 0;
_loc16_ = caurina.transitions.Tweener._tweenList.length - 1;
caurina.transitions.Tweener.updateTweenByIndex(_loc16_);
caurina.transitions.Tweener.removeTweenByIndex(_loc16_);
_loc3_ = _loc3_ + 1;
in 1.6.7 was:
if(_loc17_ == 0 && _loc15_ == 0)
{
_loc16_=caurina.transitions.Tweener._tweenList.length - 1;
caurina.transitions.Tweener.updateTweenByIndex(_loc16_);
caurina.transitions.Tweener.removeTweenByIndex(_loc16_);
}
_loc3_=_loc3_+1;
The "equal condition statement" is not ok.

State: upgraded→opened
version 1.7.0u1 was released.
this should be fixed
State: opened→upgraded
First 2 problems were fixed, but
bezierMaker.swf\scripts\__Packages\caurina\transitions\Tweener.as is not exported:
StackOverflowError (same as in #327)
In 2.swf there is a new problem.
Lot of functions are missing from
scripts\DefineSprite_86_klist_kitem3d\frame1\DoAction.as
I've attached the export from 1.7.0 and 1.7.0u1


First issue still exists, but 2nd (2.swf missing functions) was solved with changeset
6454ab87f344.
State: upgraded→returned
4.0.5 problem comes back at bezierMaker, try fixing it:
/*
* Decompilation error
* Code may be obfuscated
* Tip: You can try enabling "Automatic deobfucation" in Settings
* Error type: EmptyStackException
*/
throw new flash.errors.IllegalOperationError("Not decompiled due to error");
-----
P-Code works.
True, bezierMaker/Tweener is wrong with the latest version of FFDec. JPEXS, please fix it
when you have time.
Fixed by Jackkal. Thank you.
State: returned→closed