Washi1337 / OldRod

An automated KoiVM disassembler and devirtualisation utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeAnalysisStage.cs (OldRod.Pipeline) throws InvalidCastException

KNIF opened this issue · comments

Image: https://imgur.com/RxFbvh9

If I try to fix the issue and build it I get this error when trying to devirt an assembly:

17:28:47.538 [Main]: Started devirtualisation.
17:28:47.546 [Main]: Opening target file C:\Users\MauriceHuber\Desktop\DevirtMe.exe...
17:28:47.612 [Main]: Runtime is embedded in the target assembly.
17:28:47.613 [Main]: Executing Constants resolution stage...
17:28:47.674 [Main]: Executing #Koi stream parsing stage...
17:28:47.676 [Main]: Executing Virtualised method detection stage...
17:28:47.716 [Main]: Executing OpCode mapping resolution stage...
17:28:47.736 [Main]: Executing VM code recovery stage...
17:28:48.011 [Main]: Executing Code Analysis Stage...
17:28:48.020 [Main]: Executing IL AST builder stage...
17:28:48.158 [Main]: Executing CIL Recompiler stage...
17:28:48.338 [TUI]: Something went wrong! Try the latest version or report a bug at the repository.
17:28:48.339 [TUI]: InvalidCastException: The object of the type "AsmResolver.Net.Cts.TypeReference" can not be converted to type "AsmResolver.Net.Signatures.ByReferenceTypeSignature".
17:28:48.340 [TUI]: Use --verbose or inspect the full report.log using --log-file for more details.
17:28:48.341 [TUI]: Process finished with 0 warnings and 1 errors.
Press any key to continue...
commented

Make sure you have the correct version of AsmResolver downloaded (such as the dev branch).

I used the dev branch, it built successfully and it devirts crackme's successfully, but when I try to devirt some bigger applications I still get the InvalidCastException.

commented

Seems like a bug then!

In the meantime, try using --salvage to ignore any errors that might occur during the recompilation.

Can you provide your "bigger application" that produced this error?

Can you provide your "bigger application" that produced this error?

I will send you the file in Discord DMs.

commented

I wouldn't mind the sample either ...

I wouldn't mind the sample either ...

Is there a way where I can contact you privately and send the file?
Discord, Skype, Email, etc.?

Edit: I sent you the file via RTN private message.

Please fix this I'm also getting

[TUI]: Something went wrong! Try the latest version or report a bug at the repository.
17:28:48.339 [TUI]: InvalidCastException: The object of the type "AsmResolver.Net.Cts.TypeReference" can not be converted to type "AsmResolver.Net.Signatures.ByReferenceTypeSignature".
17:28:48.340 [TUI]: Use --verbose or inspect the full report.log using --log-

commented

Make sure you're using the latest build 1x37x. If you still get an error like this, please don't hijack the issue and instead create a new one.