AS1/2 better deobfuscation

This commit is contained in:
Jindra Petk
2013-03-10 19:17:15 +01:00
parent 49ba85f21f
commit 803cf80b1d
9 changed files with 194 additions and 33 deletions

View File

@@ -21,5 +21,44 @@ import java.util.List;
public class ConstantPool {
public List<List<String>> archive = new ArrayList<List<String>>();
public List<Integer> archiveCounts = new ArrayList<Integer>();
public List<String> constants = new ArrayList<String>();
public int count;
public ConstantPool() {
}
public ConstantPool(List<String> constants) {
this.constants = constants;
}
public void setNew(List<String> constants) {
archive.add(this.constants);
this.constants = constants;
archiveCounts.add(count);
count = 0;
}
@Override
public String toString() {
return "" + count + "x " + constants.toString();
}
public boolean isEmpty() {
return constants.isEmpty();
}
public void getLastUsed() {
if (count > 0) {
return;
}
for (int i = archive.size() - 1; i >= 0; i--) {
if (archiveCounts.get(i) > 0) {
count = archiveCounts.get(i);
constants = archive.get(i);
break;
}
}
}
}