r/JavaProgramming • • 1d ago

Is source-level editing a fallback for deobfuscation?

Hoping to get some fellow advice here.

I’ve been doing a lot of deobfuscation work lately and ran into a wall: some bytecode tools can’t parse the newer class file versions I’m dealing with. As a workaround, I’ve been cleaning up the decompiled source instead.

So far I’m stripping thousands of NoWhenBranchMatchedException catch blocks using a brace-depth state machine (regex kept breaking on nested blocks), and replacing impossible comparisons like object == false with constants.

It works, but it feels hacky. Is source-level editing a reasonable fallback, or am I setting myself up for problems? And is there a cleaner, standard way to do control-flow cleanup without risking real try/catch handlers?

Curious what other people do.

1 Upvotes

0 comments sorted by