mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-03 18:54:28 +00:00
Issue #266 AS3 deobfuscation fix
This commit is contained in:
@@ -82,7 +82,7 @@ import java.util.logging.Logger;
|
||||
public class AVM2Code implements Serializable {
|
||||
|
||||
public static final long serialVersionUID = 1L;
|
||||
private static final boolean DEBUG_MODE = false;
|
||||
private static final boolean DEBUG_MODE = true;
|
||||
public static int toSourceLimit = -1;
|
||||
public ArrayList<AVM2Instruction> code = new ArrayList<>();
|
||||
public static boolean DEBUG_REWRITE = false;
|
||||
@@ -2105,6 +2105,9 @@ public class AVM2Code implements Serializable {
|
||||
}
|
||||
|
||||
private static boolean isDirectAncestor(int currentIp, int ancestor, HashMap<Integer, List<Integer>> refs, List<Integer> visited) {
|
||||
if (currentIp == -1) {
|
||||
return true;
|
||||
}
|
||||
do {
|
||||
if (currentIp == ancestor) {
|
||||
return true;
|
||||
@@ -2163,7 +2166,7 @@ public class AVM2Code implements Serializable {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static int removeTraps(HashMap<Integer, List<Integer>> refs, boolean secondPass, boolean useVisited, List<Object> localData, Stack<GraphTargetItem> stack, List<GraphTargetItem> output, AVM2GraphSource code, int ip, HashMap<Integer, Integer> visited, HashMap<Integer, HashMap<Integer, GraphTargetItem>> visitedStates, HashMap<GraphSourceItem, Decision> decisions, String path) {
|
||||
boolean debugMode = false;
|
||||
boolean debugMode = true;
|
||||
int ret = 0;
|
||||
iploop:
|
||||
while ((ip > -1) && ip < code.size()) {
|
||||
@@ -2221,6 +2224,9 @@ public class AVM2Code implements Serializable {
|
||||
ip++;
|
||||
continue;
|
||||
}
|
||||
if (ip == 131) {
|
||||
System.err.println("debug");
|
||||
}
|
||||
if (debugMode) {
|
||||
System.out.println((useVisited ? "useV " : "") + (secondPass ? "secondPass " : "") + "Visit " + ip + ": " + ins + " stack:" + Highlighting.stripHilights(stack.toString()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user