: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.

List of issuesList of issues

#1070 Incorrect decompilation of switch statement
Author: user Brandon
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

> What steps will reproduce the problem? issues/1060-wrong-and-or-when-compiled-as-push-false-push-true Get swf from this ticket. Open it. Go to match.Amy.AmyLevel (line 1215) You will see if(param1 >= 61 && param1 <= 66 || param1 >= 81 && param1 <= 82) { _loc23_ = new ToyTile(param1); switch(param1) { case 0: if(_collectGoalArr[0] > 0) { _loc23_.collectBehaviourId = 0; } break; case 1: ... > What is the expected output? What do you see instead? expected something like: if(param1 >= 61 && param1 <= 66 || param1 >= 81 && param1 <= 82) { _loc23_ = new ToyTile(param1); switch(param1) { case 61: if(_collectGoalArr[0] > 0) { _loc23_.collectBehaviourId = 0; } break; case 62: ... > What version of the product are you using? Is it "nightly build"? Which operating system do you have? 6.0.1.994 nightly > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. issues/1060-wrong-and-or-when-compiled-as-push-false-push-true Get swf from this ticket.
developer
Also can be reproduced with our as3.swf file. Current: public function testSwitch() : * { switch(4) { case 0: trace("fiftyseven multiply a"); break; case 1: trace("thirteen"); case 2: trace("fourteen"); break; case 3: trace("eightynine"); break; } } Expected: public function testSwitch() : * { var a:* = 5; switch(a) { case 57 * a: trace("fiftyseven multiply a"); break; case 13: trace("thirteen"); case 14: trace("fourteen"); break; case 89: trace("eightynine"); break; } } Only with enabled deobfuscation.
developer
However this can be ok, because "a" is constant so the deobfuscated code is equivalent with the orginal:) Deobfuscator should remove the deterministic lookupswitch instructions.
developer
Fixed in the latest nightly build.
State: new→upgraded
developer
I close this issue due to inactivity. Please create new issue if problem still exists.
State: upgraded→closed
 
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic