Fixed: #2477 AS1/2 deobfuscation - and/or operators, jumps before function start,

jumps to function end, jumps in for..in return/break
This commit is contained in:
Jindra Petřík
2025-07-11 19:51:18 +02:00
parent 24566d609f
commit 7b948f92a3
18 changed files with 511 additions and 59 deletions

View File

@@ -32,6 +32,11 @@ import java.util.Set;
*/
public abstract class GraphSource implements Serializable {
/**
* Start IP
*/
protected int startIp = 0;
/**
* Gets the size of the graph source
*
@@ -84,7 +89,7 @@ public abstract class GraphSource implements Serializable {
* @param pos Position of the instruction
* @return Instruction as string
*/
public abstract String insToString(int pos);
public abstract String insToString(int pos);
/**
* Visits the code
@@ -162,7 +167,7 @@ public abstract class GraphSource implements Serializable {
for (int i = 0; i < siz; i++) {
refs.put(i, new ArrayList<>());
}
visitCode(0, 0, refs, -1);
visitCode(startIp, 0, refs, -1);
int pos = 0;
for (int e : alternateEntries) {
pos++;