AS1/2 deobfuscation - do not remove unused obfuscated variables - we are unable to properly determine if the variable is unused.

This commit is contained in:
Jindra Petřík
2022-12-18 23:10:24 +01:00
parent 067ebb6f5d
commit 54b6153b82
@@ -117,8 +117,9 @@ public class ActionDeobfuscator extends SWFDecompilerAdapter {
changed = true;
}
}
changed = removeObfuscatedUnusedVariables(fastActions);
actions.setActions(fastActions.toActionList());
//Commented out, as it may remove variables used in another DoAction or inside functions.
//changed = removeObfuscatedUnusedVariables(fastActions);
//actions.setActions(fastActions.toActionList());
}
}
@@ -320,6 +321,7 @@ public class ActionDeobfuscator extends SWFDecompilerAdapter {
return ret;
}
//currently unused
private boolean removeObfuscatedUnusedVariables(FastActionList actions) throws InterruptedException {
if (actions.isEmpty()) {
return false;