dnSpyEx/dnSpy

How to decompile AOT .net assemblies

Bluscream opened this issue · 5 comments

Description

They always just show up as "PE" but don't give any usable code?

If these can't be decompiled with dnSpy anymore, is this more or less the end of dnSpy because every app will use it in the future?

Ref: Ahead-of-time compilation

because every app will use it in the future?

i highly doubt that but yeah there's no way to get IL / C# back out of NativeAOT compiled apps, see also https://migeel.sk/blog/2023/09/15/reverse-engineering-natively-compiled-dotnet-apps/ from the primary developer of NativeAOT

Damn, this is a bummer. IL2Cpp is already a pain in unity apps, but now Unity is probably getting built-in AOT support and later on it's going to be the default. RIP tools like MelonLoader/BepInEx 🪦

Thanks anyway for the heads up.

IL2Cpp is already a pain in unity apps,

IL2Cpp is literally paradise for people modding games; if that is the intent.

You get all of the symbol information, including structure info completely for free; whereas with native games you have to reverse engineer these things from scratch.

I would not be really complaining about getting knowledge that will save you 1000+ hours of reversing for free. At least while you still have it.

NativeAOT also has metadata, unless its stripped with reflection free mode

Decompiling NativeAOT or IL2CPP will never be available in dnSpy. Those files do not have regular .NET metadata and they also do not have any IL code. All the code is in an unmanaged assembly language (depending on the target platform).