mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-02 15:24:31 +00:00
AS1/2 better deobfuscation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user