If we implement tracking local vars too, we can use it to implement new bytecode-based deobfuscation techniques without losing all the names.
We could distribute the mapping file to users (as I think it'd be hard to argue it contains Jagex's IP) and they could apply it to their local deobs.
Similarly, users could contribute additional mappings back to the 'canonical' copy. We'd need some sort of incremental support for this (probably writing a JavaParser-based tool to apply the mapping to an exist set of .java files, in addition to the bytecode deobfuscator accepting a mapping file).
There are lots of interesting use cases for this:
* If we implement tracking local vars too, we can use it to implement new bytecode-based deobfuscation techniques without losing all the names.
* We could distribute the mapping file to users (as I think it'd be hard to argue it contains Jagex's IP) and they could apply it to their local deobs.
* Similarly, users could contribute additional mappings back to the 'canonical' copy. We'd need some sort of incremental support for this (probably writing a JavaParser-based tool to apply the mapping to an exist set of .java files, in addition to the bytecode deobfuscator accepting a mapping file).
This now works for class names, method/field names and method/field owners.
We still need to add:
method argument names
method argument order (blocked on the IR)
local variable names (blocked on Fernflower patches + adjustments to our custom .class file attribute)
This now works for class names, method/field names and method/field owners.
We still need to add:
* method argument names
* method argument order (blocked on the IR)
* local variable names (blocked on Fernflower patches + adjustments to our custom .class file attribute)
Argument order is the only thing that is left. It's blocked on the IR. I might open a separate issue for it, and close this one.
Argument and local variable names are done.
Argument order is the only thing that is left. It's blocked on the IR. I might open a separate issue for it, and close this one.
There are lots of interesting use cases for this:
This now works for class names, method/field names and method/field owners.
We still need to add:
Argument and local variable names are done.
Argument order is the only thing that is left. It's blocked on the IR. I might open a separate issue for it, and close this one.
It'd be good to preserve the order of fields/methods within a class.