diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt index 57dfafb0a3..4369851695 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt @@ -9,6 +9,7 @@ import com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSol import com.github.javaparser.symbolsolver.resolution.typesolvers.JavaParserTypeSolver import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver import com.github.javaparser.utils.SourceRoot +import com.github.michaelbull.logging.InlineLogger import dev.openrs2.deob.ast.transform.AddSubTransformer import dev.openrs2.deob.ast.transform.BinaryExprOrderTransformer import dev.openrs2.deob.ast.transform.BitMaskTransformer @@ -50,6 +51,7 @@ class AstDeobfuscator(private val modules: List) { val units = mutableMapOf() for (root in roots) { + logger.info { "Parsing root ${root.root}" } val results = root.tryToParseParallelized() for (result in results) { require(result.isSuccessful) { result } @@ -62,16 +64,20 @@ class AstDeobfuscator(private val modules: List) { } for (transformer in TRANSFORMERS) { + logger.info { "Running transformer ${transformer.javaClass.simpleName}" } transformer.transform(units) } for (root in roots) { + logger.info { "Saving root ${root.root}" } root.printer = Function(printer::print).andThen(::stripNewlineAfterPcAnnotation) root.saveAll() } } companion object { + private val logger = InlineLogger() + private val TRANSFORMERS = listOf( UnencloseTransformer(), NegativeLiteralTransformer(),