Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeAnalysisStage.cs (OldRod.Pipeline) throws InvalidCastException #6

Closed
KNIF opened this issue Aug 29, 2019 · 9 comments
Closed

CodeAnalysisStage.cs (OldRod.Pipeline) throws InvalidCastException #6

KNIF opened this issue Aug 29, 2019 · 9 comments
Labels
bug Something isn't working

Comments

@KNIF
Copy link

KNIF commented Aug 29, 2019

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...
@Washi1337
Copy link
Owner

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

@KNIF
Copy link
Author

KNIF commented Aug 29, 2019

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.

@Washi1337
Copy link
Owner

Seems like a bug then!

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

@Washi1337 Washi1337 added the bug Something isn't working label Aug 29, 2019
@KNIF KNIF changed the title CodeAnalysisStage.cs in OldRod.Pipeline => InvalidCastException CodeAnalysisStage.cs (OldRod.Pipeline) throws InvalidCastException Aug 29, 2019
@zsr2531
Copy link

zsr2531 commented Aug 29, 2019

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

@KNIF
Copy link
Author

KNIF commented Aug 29, 2019

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

I will send you the file in Discord DMs.

@Washi1337
Copy link
Owner

I wouldn't mind the sample either ...

@KNIF
Copy link
Author

KNIF commented Aug 30, 2019

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.

@1x37x
Copy link

1x37x commented Jan 23, 2020

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-

@Washi1337
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants