@Test public void testDir() { ClassGroup group = ClassGroupFactory.generateGroup(); Code code = group.findClass("test").findMethod("func").getCode(); Instructions ins = code.getInstructions(); code.setMaxStack(2); Instruction[] prepareVariables = { new LDC(ins, 3), new IStore(ins, 0) }; for (Instruction i : prepareVariables) ins.addInstruction(i); Label label = new Label(ins), label2 = new Label(ins); LDC one = new LDC(ins, 1); Instruction body[] = { new SiPush(ins, (short) 256), new ILoad(ins, 0), new IfEq(ins, label), new LDC(ins, 2), new Goto(ins, label2), label, one, label2, new IMul(ins), new VReturn(ins) }; for (Instruction i : body) ins.addInstruction(i); Execution e = new Execution(group); e.populateInitialMethods(); e.run(); Deobfuscator d = new MultiplyOneDeobfuscator(false); d.run(group); Assert.assertTrue(one.getInstructions() != null); }
@Override public void run(ClassGroup group) { Execution e = new Execution(group); e.addMethodContextVisitor(i -> visit(i)); e.populateInitialMethods(); e.run(); logger.info("Removed " + count + " 1 multiplications"); }
MultiplyOneDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { Execution e = new Execution(group); e.addMethodContextVisitor(i -> visit(i)); e.populateInitialMethods(); e.run(); logger.info("Removed " + count + " 1 multiplications"); } }
MultiplyOneDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { Execution e = new Execution(group); e.addMethodContextVisitor(i -> visit(i)); e.populateInitialMethods(); e.run(); logger.info("Removed " + count + " 1 multiplications"); } MultiplyOneDeobfuscator(boolean onlyConstants); }
MultiplyOneDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { Execution e = new Execution(group); e.addMethodContextVisitor(i -> visit(i)); e.populateInitialMethods(); e.run(); logger.info("Removed " + count + " 1 multiplications"); } MultiplyOneDeobfuscator(boolean onlyConstants); @Override void run(ClassGroup group); }
MultiplyOneDeobfuscator implements Deobfuscator { @Override public void run(ClassGroup group) { Execution e = new Execution(group); e.addMethodContextVisitor(i -> visit(i)); e.populateInitialMethods(); e.run(); logger.info("Removed " + count + " 1 multiplications"); } MultiplyOneDeobfuscator(boolean onlyConstants); @Override void run(ClassGroup group);  }