0

I heard about dnSpy or ILSpy for decompiling .net files.

But how about those files that was NOT written by .net!?

Probably those files previous to XP.

Is there any tools to decompile it to, preferably, C#!?

Much appreciated!

6
  • 1
    If they were not written in C#/.NET why would they decompile to .net? Those old files are regular native binaries and you can use any decompiler. Apr 25, 2020 at 20:13
  • @PawełŁukasik Well, that's the thing, fundamentally they're both Assembly, so I thought that they should be interchangeable into one another. Maybe I was wrong!? Apr 25, 2020 at 23:17
  • Well not really. .NET are IL with a lot of metadata before they get JITed. That's why it's easy to see managed code in tools like dnSpy. After they are JITed they are compiled to native binary and it's no longer a C# code so it's hard to extract it's original C# code at that time. Apr 25, 2020 at 23:20
  • @PawełŁukasik So since we know that the non-.net files don't have those metadata and probably AOT, can't we just "make up" those metadata and plug the code in C# into its body!? Just a thought. Apr 25, 2020 at 23:42
  • It's an interesting thought. Don't want to diminish the idea but I think it's not possible Apr 26, 2020 at 7:12

1 Answer 1

2

You can use Hex Rays decompiler. But you won't get C# code.

1
  • Or any free decompiler... Apr 27, 2020 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.