Skip to content

Commit f2fda40

Browse files
committed
I forgot to put in cache
1 parent 72bc5e5 commit f2fda40

File tree

14 files changed

+45
-42
lines changed

14 files changed

+45
-42
lines changed

deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/branchlock/BranchlockCompabilityStringTransformer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ protected void transform() throws Exception {
186186
}
187187
decryptedStrings[decStrIndex++] = new String(toDecrypt).intern();
188188
}
189+
190+
decryptedDataMap.put(classWrapper, new DecryptedStringData(stringArray, decryptedStrings));
191+
189192
Set<LabelNode> labelsInStringDecryption = new HashSet<>();
190193
Set<AbstractInsnNode> toRemove = new HashSet<>();
191194
AbstractInsnNode firstNode = encryptedStringInsn;

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/basics/accu/Digi.dec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ public class Digi {
1111
int var4 = 0;
1212

1313
do {
14-
var2 += Double.longBitsToDouble(4337655139195544067L + (-806592087L << Integer.parseInt(d[1], 32)));
14+
var2 += 1.0E-18;
1515
} while (++var4 <= 100 && (float)var2 != 2.0E-17F);
1616

1717
if (var4 == 20) {
18-
System.out.println(d[0]);
18+
System.out.println("PASS");
1919
} else {
20-
System.out.println(d[2]);
20+
System.out.println("FAIL");
2121
}
2222
}
2323
}

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/basics/ctrl/Ctrl.dec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package pack.tests.basics.ctrl;
22

33
public class Ctrl {
4-
private String ret = d[3];
4+
private String ret = "FAIL";
55
public int BRANCHLOCK_DOT_NET_DEMO;
66

77
public Ctrl(int var1) {
88
}
99

1010
public void runt(int var1) {
11-
if (!d[1].equals(d[0])) {
11+
if (!"a".equals("b")) {
1212
throw new UnsupportedOperationException();
1313
}
1414
}
@@ -17,12 +17,12 @@ public class Ctrl {
1717
try {
1818
this.runt(8206);
1919
} catch (RuntimeException var3) {
20-
this.ret = d[2];
20+
this.ret = "PASS";
2121
}
2222

2323
try {
2424
this.runt(8206);
25-
this.ret = d[3];
25+
this.ret = "FAIL";
2626
} catch (Exception var2) {
2727
}
2828
}

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/basics/inner/Test.dec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ public class Test {
1313
Exec.Inner var4 = var2.new Inner(var2, 100, 14056);
1414
var4.doAdd(15081);
1515
if (var2.fuss == 108) {
16-
System.out.println(d[1]);
16+
System.out.println("PASS");
1717
} else {
18-
System.out.println(d[0]);
18+
System.out.println("ERROR");
1919
}
2020
}
2121
}

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/basics/runable/Task.dec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public class Task {
3535

3636
Thread.sleep(300L);
3737
if (Exec.i == 30) {
38-
System.out.println(d[1]);
38+
System.out.println("PASS");
3939
} else {
40-
System.out.println(d[0]);
40+
System.out.println("FAIL");
4141
}
4242
}
4343

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/basics/sub/Solver.dec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ public class Solver {
55

66
public Solver(int var1) {
77
if (SolAdd.get(3122) == 3) {
8-
System.out.println(d[1]);
8+
System.out.println("PASS");
99
} else {
10-
System.out.println(d[0]);
10+
System.out.println("FAIL");
1111
}
1212
}
1313
}

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/bench/Calc.dec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public class Calc {
1616
runStr(31405);
1717
}
1818

19-
System.out.println(d[6] + (System.currentTimeMillis() - var1) + d[1]);
19+
System.out.println("Calc: " + (System.currentTimeMillis() - var1) + "ms");
2020
if (count != 30000) {
21-
throw new RuntimeException(d[4]);
21+
throw new RuntimeException("[ERROR]: Errors occurred in calc!");
2222
}
2323
}
2424

@@ -33,18 +33,18 @@ public class Calc {
3333
private static void runAdd(int var0) {
3434
double var1 = 0.0;
3535

36-
while (var1 < Double.longBitsToDouble(-292662827L + (Long.parseLong(d[3], 25) ^ 4636744327457716328L))) {
37-
var1 += Double.longBitsToDouble((4607092347051790635L ^ Long.parseLong(d[2], 27)) - 824017068L);
36+
while (var1 < 100.1) {
37+
var1 += 0.99;
3838
}
3939

4040
count++;
4141
}
4242

4343
private static void runStr(int var0) {
44-
String var1 = d[5];
44+
String var1 = "";
4545

4646
while (var1.length() < 101) {
47-
var1 = var1 + d[0];
47+
var1 = var1 + "ax";
4848
}
4949

5050
count++;

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/reflects/annot/annot.dec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class annot {
1414
for (Method var6 : annoe.class.getDeclaredMethods()) {
1515
var6.setAccessible(true);
1616
anno var7 = var6.getAnnotation(anno.class);
17-
if (var7 != null && var7.val().equals(d[0])) {
17+
if (var7 != null && var7.val().equals("yes")) {
1818
var6.invoke(var2);
1919
}
2020
}

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/reflects/counter/Count.dec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public class Count {
1111
&& Countee.class.getDeclaredFields().length == 4
1212
&& Countee.class.getMethods().length > 4
1313
&& Countee.class.getDeclaredMethods().length == 4) {
14-
System.out.println(d[0]);
14+
System.out.println("PASS");
1515
} else {
16-
System.out.println(d[1]);
16+
System.out.println("FAIL");
1717
}
1818
}
1919
}

testData/results/custom-jars/branchlock/branchlock-string-salting-number/pack/tests/reflects/field/FTest.dec

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ public class FTest {
1313
public void run(int var1) {
1414
Constructor var2 = FObject.class.getDeclaredConstructor(int.class);
1515
if (var2.isAccessible()) {
16-
System.out.println(d[1]);
16+
System.out.println("FAIL");
1717
} else {
1818
var2.setAccessible(true);
1919
FObject var3 = (FObject)var2.newInstance(1);
20-
Method var4 = FObject.class.getDeclaredMethod(d[2], null);
20+
Method var4 = FObject.class.getDeclaredMethod("add", null);
2121
if (var4.isAccessible()) {
22-
System.out.println(d[1]);
22+
System.out.println("FAIL");
2323
} else {
2424
var4.setAccessible(true);
2525
var4.invoke(var3);
26-
Field var5 = FObject.class.getDeclaredField(d[3]);
26+
Field var5 = FObject.class.getDeclaredField("i");
2727
if (var5.isAccessible()) {
28-
System.out.println(d[1]);
28+
System.out.println("FAIL");
2929
} else {
3030
var5.setAccessible(true);
3131
if (var5.getInt(var3) != 4) {
32-
System.out.println(d[1]);
32+
System.out.println("FAIL");
3333
} else {
34-
System.out.println(d[0]);
34+
System.out.println("PASS");
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)