@Test public void test13() { ClassGroup group = ClassGroupFactory.generateGroup(); Code code = group.findClass("test").findMethod("func").getCode(); Instructions ins = code.getInstructions(); code.setMaxStack(2); LDC constant1 = new LDC(ins, -688421113); LDC constant2 = new LDC(ins, -585812297); Instruction body[] = { new SiPush(ins, (short) 512), constant1, new IMul(ins), constant2, new IMul(ins), new VReturn(ins) }; for (Instruction i : body) { ins.addInstruction(i); } Execution e = new Execution(group); e.populateInitialMethods(); e.run(); assert constant1.getConstantAsInt() * constant2.getConstantAsInt() == 1; Deobfuscator d = new MultiplicationDeobfuscator(); d.run(group); Assert.assertEquals(1, constant1.getConstantAsInt()); Assert.assertEquals(1, constant2.getConstantAsInt()); }
@Override public void run(ClassGroup group) { this.group = group; int i; int count = 0; while ((i = runOnce()) > 0) { logger.info("Replaced " + i + " constants"); count += i; } logger.info("Total changed " + count); }
MultiplicationDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { this.group = group; int i; int count = 0; while ((i = runOnce()) > 0) { logger.info("Replaced " + i + " constants"); count += i; } logger.info("Total changed " + count); } }
MultiplicationDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { this.group = group; int i; int count = 0; while ((i = runOnce()) > 0) { logger.info("Replaced " + i + " constants"); count += i; } logger.info("Total changed " + count); }  }
MultiplicationDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { this.group = group; int i; int count = 0; while ((i = runOnce()) > 0) { logger.info("Replaced " + i + " constants"); count += i; } logger.info("Total changed " + count); }  @Override void run(ClassGroup group); static MultiplicationExpression parseExpression(InstructionContext ctx, Class want); static boolean isOnlyPath(InstructionContext ctx, StackContext sctx); }
MultiplicationDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { this.group = group; int i; int count = 0; while ((i = runOnce()) > 0) { logger.info("Replaced " + i + " constants"); count += i; } logger.info("Total changed " + count); }  @Override void run(ClassGroup group); static MultiplicationExpression parseExpression(InstructionContext ctx, Class want); static boolean isOnlyPath(InstructionContext ctx, StackContext sctx);  }