Fixed #1828 AS1/2 deobfuscation removing variable declarations

This commit is contained in:
Jindra Petřík
2022-12-10 18:02:02 +01:00
parent f738acd33a
commit 067ebb6f5d
2 changed files with 13 additions and 10 deletions

View File

@@ -107,16 +107,18 @@ public class ActionDeobfuscator extends SWFDecompilerAdapter {
boolean changed = true;
boolean useVariables = false;
while (changed) {
changed = removeGetTimes(fastActions);
changed |= removeObfuscationIfs(fastActions, fakeFunctions, useVariables);
changed |= removeObfuscatedUnusedVariables(fastActions);
actions.setActions(fastActions.toActionList());
changed |= ActionListReader.fixConstantPools(null, actions);
if (!changed && !useVariables) {
useVariables = true;
changed = true;
while (changed) {
changed = removeGetTimes(fastActions);
changed |= removeObfuscationIfs(fastActions, fakeFunctions, useVariables);
actions.setActions(fastActions.toActionList());
changed |= ActionListReader.fixConstantPools(null, actions);
if (!changed && !useVariables) {
useVariables = true;
changed = true;
}
}
changed = removeObfuscatedUnusedVariables(fastActions);
actions.setActions(fastActions.toActionList());
}
}