recomment
This commit is contained in:
@@ -39,72 +39,72 @@ public class Deob
|
|||||||
|
|
||||||
ClassGroup group = loadJar(args[0]);
|
ClassGroup group = loadJar(args[0]);
|
||||||
|
|
||||||
run(group, new RenameUnique());
|
// run(group, new RenameUnique());
|
||||||
|
|
||||||
// remove except RuntimeException
|
|
||||||
run(group, new RuntimeExceptions());
|
|
||||||
|
|
||||||
// remove unused methods
|
|
||||||
run(group, new UnusedMethods());
|
|
||||||
|
|
||||||
run(group, new UnreachedCode());
|
|
||||||
|
|
||||||
// remove illegal state exceptions, frees up some parameters
|
|
||||||
run(group, new IllegalStateExceptions());
|
|
||||||
|
|
||||||
// remove constant logically dead parameters
|
|
||||||
run(group, new ConstantParameter());
|
|
||||||
|
|
||||||
// remove unhit blocks
|
|
||||||
run(group, new UnreachedCode());
|
|
||||||
run(group, new UnusedMethods());
|
|
||||||
|
|
||||||
// remove unused parameters
|
|
||||||
run(group, new UnusedParameters());
|
|
||||||
|
|
||||||
// remove jump obfuscation
|
|
||||||
//new Jumps().run(group);
|
|
||||||
|
|
||||||
// remove unused fields
|
|
||||||
run(group, new UnusedFields());
|
|
||||||
|
|
||||||
// remove unused methods, again?
|
|
||||||
run(group, new UnusedMethods());
|
|
||||||
|
|
||||||
run(group, new MethodInliner());
|
|
||||||
|
|
||||||
// broken because rename was removed
|
|
||||||
//run(group, new MethodMover());
|
|
||||||
|
|
||||||
run(group, new FieldInliner());
|
|
||||||
|
|
||||||
// XXX this is broken because when moving clinit around, some fields can depend on other fields
|
|
||||||
// (like multianewarray)
|
|
||||||
//new FieldMover().run(group);
|
|
||||||
|
|
||||||
run(group, new UnusedClass());
|
|
||||||
|
|
||||||
// ModArith mod = new ModArith();
|
|
||||||
// mod.run(group);
|
|
||||||
//
|
//
|
||||||
// int last = -1, cur;
|
// // remove except RuntimeException
|
||||||
// while ((cur = mod.runOnce()) > 0)
|
// run(group, new RuntimeExceptions());
|
||||||
// {
|
|
||||||
// new MultiplicationDeobfuscator().run(group);
|
|
||||||
//
|
//
|
||||||
// new MultiplyOneDeobfuscator().run(group);
|
// // remove unused methods
|
||||||
|
// run(group, new UnusedMethods());
|
||||||
//
|
//
|
||||||
// new MultiplyZeroDeobfuscator().run(group);
|
// run(group, new UnreachedCode());
|
||||||
//
|
//
|
||||||
// if (last == cur)
|
// // remove illegal state exceptions, frees up some parameters
|
||||||
// {
|
// run(group, new IllegalStateExceptions());
|
||||||
// System.out.println("break");
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//
|
//
|
||||||
// last = cur;
|
// // remove constant logically dead parameters
|
||||||
// //break;
|
// run(group, new ConstantParameter());
|
||||||
// }
|
//
|
||||||
|
// // remove unhit blocks
|
||||||
|
// run(group, new UnreachedCode());
|
||||||
|
// run(group, new UnusedMethods());
|
||||||
|
//
|
||||||
|
// // remove unused parameters
|
||||||
|
// run(group, new UnusedParameters());
|
||||||
|
//
|
||||||
|
// // remove jump obfuscation
|
||||||
|
// //new Jumps().run(group);
|
||||||
|
//
|
||||||
|
// // remove unused fields
|
||||||
|
// run(group, new UnusedFields());
|
||||||
|
//
|
||||||
|
// // remove unused methods, again?
|
||||||
|
// run(group, new UnusedMethods());
|
||||||
|
//
|
||||||
|
// run(group, new MethodInliner());
|
||||||
|
//
|
||||||
|
// // broken because rename was removed
|
||||||
|
// //run(group, new MethodMover());
|
||||||
|
//
|
||||||
|
// run(group, new FieldInliner());
|
||||||
|
//
|
||||||
|
// // XXX this is broken because when moving clinit around, some fields can depend on other fields
|
||||||
|
// // (like multianewarray)
|
||||||
|
// //new FieldMover().run(group);
|
||||||
|
//
|
||||||
|
// run(group, new UnusedClass());
|
||||||
|
|
||||||
|
ModArith mod = new ModArith();
|
||||||
|
mod.run(group);
|
||||||
|
|
||||||
|
int last = -1, cur;
|
||||||
|
while ((cur = mod.runOnce()) > 0)
|
||||||
|
{
|
||||||
|
new MultiplicationDeobfuscator().run(group);
|
||||||
|
|
||||||
|
new MultiplyOneDeobfuscator().run(group);
|
||||||
|
|
||||||
|
new MultiplyZeroDeobfuscator().run(group);
|
||||||
|
|
||||||
|
if (last == cur)
|
||||||
|
{
|
||||||
|
System.out.println("break");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
last = cur;
|
||||||
|
//break;
|
||||||
|
}
|
||||||
|
|
||||||
// eval constant fields (only set once to a constant in ctor) maybe just inline them
|
// eval constant fields (only set once to a constant in ctor) maybe just inline them
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user