I'm attempting to deobfuscate a .jar's code. I've created a module that successfully renames the methods (including return type), the class and its superclass, and its fields.
My issue now is in the actual bytecode. I'm attempting to modify the FieldInsnNode and MethodInsnNode's values in order to change their names. Example: g.y.x();
should be node.next.generateHash()
.
MethodInsnNode min = (MethodInsnNode) insn;
min.name = remappedNames.getOrDefault(min.owner + "." + min.name + min.desc, min.name);
min.owner = remappedNames.getOrDefault(min.owner, min.owner);
min.desc = transformMethodDesc(min.desc);
I think I'm misunderstanding what the name, owner, and desc are. Here's my current understanding:
name = the actual name of the variable. E.g. in my earlier example, next
's field obfuscated name
value is y
.
The owner is a little more confusing, I'm not too sure exactly what that is, I'm guessing its the class that the variable responds to. For example the owner here would be g
.
Would appreciate any clarification, as even when I do something like min.name = "TEST"
I'm not noticing any difference in the decompiled output.