java-deobfuscator / deobfuscator

The real deal
https://javadeobfuscator.com
Apache License 2.0
1.54k stars 288 forks source link

Writing a transformer for branchlock #949

Open bjedev opened 1 year ago

bjedev commented 1 year ago

I'm trying to make the VM execute the <clinit> method, and extract data at the end of it... but i get this error. image image There is the error and my (bad) code so far.

Janmm14 commented 1 year ago

It looks to me like the executed code caused this illegalmonitorstate exception. if it runs fine if you start the program regulary with the executed clinit, the branchlock code mightve done some unknown stuff to detect javavm.

bjedev commented 1 year ago

Ok... that sucks, would there be any way to get around this?

Janmm14 commented 1 year ago

you could try using ssvm as alternative execution engine. or you can try debugging javavm (or add features and debug the methodexecutor, see #873 ).

bjedev commented 1 year ago

Ok, the reason I'm using javavm is because I need to support libraries. I think SSVM supports them also, but could you confirm that? Thanks!

Janmm14 commented 1 year ago

libraries are just also java code so ofc