Fixed: #1626 AS3 decompilation - unpopped obfuscated function

This commit is contained in:
Jindra Petřík
2021-02-27 09:49:06 +01:00
parent b08567de7a
commit 79b1e45df3
3 changed files with 16 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.InAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.NewActivationAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.NewFunctionAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.NextNameAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.NextValueAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.ReturnValueAVM2Item;
@@ -2292,4 +2293,17 @@ public class AVM2Graph extends Graph {
}
}
@Override
protected void makeAllCommands(List<GraphTargetItem> commands, TranslateStack stack) {
for (int i = 0; i < stack.size(); i++) {
//These are often obfuscated, so ignore them
if (stack.get(i) instanceof NewFunctionAVM2Item) {
stack.remove(i);
i--;
}
}
super.makeAllCommands(commands, stack);
}
}

View File

@@ -2636,7 +2636,7 @@ public class Graph {
}
}
protected static void makeAllCommands(List<GraphTargetItem> commands, TranslateStack stack) {
protected void makeAllCommands(List<GraphTargetItem> commands, TranslateStack stack) {
int clen = commands.size();
boolean isExit = false;
if (clen > 0) {