A fully static devirtualizer for VMProtect .NET (versions 3.4 and 3.5).
Clone and build it yourself:
dotnet build -c Release- Dump target via KsDumper if anti-tamper is present.
- Demutate with DeMutation.
- In CFF Explorer, ensure that the
ILOnlyflag is not set. - Clean it with de4dot so pattern detection actually works.
- Drag and drop the cleaned file into the devirtualizer.
- Clean the file with de4dot to remove junk.
It runs a 3-stage pipeline:
- Function resolution: Scans the .NET module for VM entry calls by matching specific CIL patterns.
- Handler resolution: Locates the VM's handler table and maps the virtual opcodes to known CIL templates.
- Transformation: Translates the virtual bytecode back into valid CIL and recompiles the method bodies.
- Demutation fails: Anti-tamper is probably still active.
- Devirtualization fails: You are either targeting an unsupported version of VMProtect or the target is corrupted.
I made this a long time ago and left zero comments. Don't ask me how it works, because I honestly don't know either. Huge thanks to @Washi1337 for putting up with my never-ending stupid questions.