diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index e3e6f65b2..b002358da 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -76,8 +76,6 @@ import java.util.logging.Logger; */ public class Action implements GraphSourceItem { - public Action beforeInsert; - public Action afterInsert; public Action replaceWith; private boolean ignored = false; /** @@ -198,15 +196,8 @@ public class Action implements GraphSourceItem { a.replaceWith.setAddress(a.getAddress(), version, false); ret.addAll(a.replaceWith.getAllRefs(version)); } - if (a.beforeInsert != null) { - a.beforeInsert.setAddress(a.getAddress(), version, false); - ret.addAll(a.beforeInsert.getAllRefs(version)); - } List part = a.getAllRefs(version); ret.addAll(part); - if (a.afterInsert != null) { - ret.addAll(a.afterInsert.getAllRefs(version)); - } } return ret; } @@ -515,14 +506,6 @@ public class Action implements GraphSourceItem { } } } else { - if (a.beforeInsert != null) { - if (lastPush) { - writer.newLine(); - lastPush = false; - } - writer.appendNoHilight(a.beforeInsert.getASMSource(list, importantOffsets, constantPool, version, exportMode)); - writer.newLine(); - } //if (!(a instanceof ActionNop)) { String add = ""; if (a instanceof ActionIf) { @@ -580,14 +563,6 @@ public class Action implements GraphSourceItem { lastPush = false; } //} - if (a.afterInsert != null) { - if (lastPush) { - writer.newLine(); - lastPush = false; - } - writer.appendNoHilight(a.afterInsert.getASMSource(list, importantOffsets, constantPool, version, exportMode)); - writer.newLine(); - } } offset += a.getBytes(version).length; } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java index ddfed86a0..f014ae2c8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -649,7 +649,6 @@ public class ActionListReader { boolean debugMode = false; boolean decideBranch = false; - boolean deobfuscate = Configuration.getConfig("autoDeobfuscate", true); pos = ip; Action a; Scanner sc = new Scanner(System.in, "utf-8"); @@ -669,7 +668,6 @@ public class ActionListReader { if ((ip < ret.size()) && (!(ret.get(ip) instanceof ActionNop))) { a = ret.get(ip); } - a.containerSWFOffset = containerSWFOffset; int info = a.actionLength + 1 + ((a.actionCode >= 0x80) ? 2 : 0); if (a instanceof ActionPush) { @@ -722,10 +720,7 @@ public class ActionListReader { if (a instanceof ActionIf) { aif = (ActionIf) a; - GraphTargetItem top = null; - if (deobfuscate) { - top = stack.pop(); - } + GraphTargetItem top = stack.pop(); int nip = pos + aif.getJumpOffset(); if (decideBranch) { @@ -740,7 +735,7 @@ public class ActionListReader { } else if (next.equals("c")) { goaif = true; } - } else if (deobfuscate && top.isCompileTime() && (!top.hasSideEffect())) { + } else if (top.isCompileTime() && (!top.hasSideEffect())) { ((ActionIf) a).compileTime = true; if (debugMode) { System.err.print("is compiletime -> "); @@ -772,16 +767,14 @@ public class ActionListReader { } else if (a instanceof ActionJump) { newip = pos + ((ActionJump) a).getJumpOffset(); } else if (!(a instanceof GraphSourceItemContainer)) { - if (deobfuscate) { - //return in for..in, TODO:Handle this better way - if (((a instanceof ActionEquals) || (a instanceof ActionEquals2)) && (stack.size() == 1) && (stack.peek() instanceof DirectValueActionItem)) { - stack.push(new DirectValueActionItem(null, 0, new Null(), new ArrayList())); - } - if ((a instanceof ActionStoreRegister) && stack.isEmpty()) { - stack.push(new DirectValueActionItem(null, 0, new Null(), new ArrayList())); - } - a.translate(localData, stack, output, Graph.SOP_USE_STATIC/*Graph.SOP_SKIP_STATIC*/, path); + //return in for..in, TODO:Handle this better way + if (((a instanceof ActionEquals) || (a instanceof ActionEquals2)) && (stack.size() == 1) && (stack.peek() instanceof DirectValueActionItem)) { + stack.push(new DirectValueActionItem(null, 0, new Null(), new ArrayList())); } + if ((a instanceof ActionStoreRegister) && stack.isEmpty()) { + stack.push(new DirectValueActionItem(null, 0, new Null(), new ArrayList())); + } + a.translate(localData, stack, output, Graph.SOP_USE_STATIC/*Graph.SOP_SKIP_STATIC*/, path); } } catch (RuntimeException ex) { log.log(Level.SEVERE, "Disassembly exception", ex); @@ -833,9 +826,7 @@ public class ActionListReader { output2s.add(output2); endAddr += size; } - if (deobfuscate) { - cnt.translateContainer(output2s, stack, output, (HashMap) localData.get(0), (HashMap) localData.get(1), (HashMap) localData.get(2)); - } + cnt.translateContainer(output2s, stack, output, (HashMap) localData.get(0), (HashMap) localData.get(1), (HashMap) localData.get(2)); ip = (int) endAddr; pos = ip; continue;