diff --git a/CHANGELOG.md b/CHANGELOG.md index 65f473a73..7f77caa67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ### Fixed - #1623 Right side marker (gray line) in P-code - #1622 Slow scrolling (search results, advanced settings and others) +- #1626 AS3 decompilation - unpopped obfuscated function ## [14.0.1] - 2021-02-26 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 596bdb069..5784cb904 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -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 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); + } + + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index 475743f17..0c3eaa672 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -2636,7 +2636,7 @@ public class Graph { } } - protected static void makeAllCommands(List commands, TranslateStack stack) { + protected void makeAllCommands(List commands, TranslateStack stack) { int clen = commands.size(); boolean isExit = false; if (clen > 0) {