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!

  • 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. – Paweł Łukasik Apr 25 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!? – PiggyChu001 Apr 25 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. – Paweł Łukasik Apr 25 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. – PiggyChu001 Apr 25 at 23:42
  • It's an interesting thought. Don't want to diminish the idea but I think it's not possible – Paweł Łukasik Apr 26 at 7:12
2

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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