action deobfuscator improved

This commit is contained in:
honfika@gmail.com
2015-09-24 11:38:09 +02:00
parent cf30e3a38b
commit 55edca7d2b
2 changed files with 4 additions and 4 deletions

View File

@@ -342,7 +342,7 @@ public class ActionList extends ArrayList<Action> {
return -1;
}
public int getContainerIndex(int idx) {
public int getContainerEndIndex(int idx) {
Action action = get(idx);
int i = idx - 1;
while (i >= 0) {
@@ -351,7 +351,7 @@ public class ActionList extends ArrayList<Action> {
List<Action> lastActions = getContainerLastActions(a);
Action lastAction = lastActions.get(lastActions.size() - 1);
if (lastAction.getAddress() >= action.getAddress()) {
return i;
return getIndexByAddress(lastAction.getAddress());
}
}

View File

@@ -154,7 +154,7 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
ActionConstantPool cPool = getConstantPool(actions);
for (int i = 0; i < actions.size(); i++) {
int idx = actions.size() - 1;
int containerIndex = actions.getContainerIndex(i);
int containerIndex = actions.getContainerEndIndex(i);
if (containerIndex != -1) {
idx = Math.min(idx, containerIndex - 1);
}
@@ -180,7 +180,7 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
}
}
if (allValueValid && newIstructionCount * 2 < result.instructionsProcessed) {
if (allValueValid && newIstructionCount * 5 < result.instructionsProcessed) {
Action target = actions.get(result.idx);
Action prevAction = actions.get(i);