`Agile_NET.ProxyCallFixer.FindDelegateCreator()` (`de4dot.code/deobfuscators/Agile_NET/ProxyCallFixer.cs:47`) accesses `method.Body.Instructions` for any static method matching `void(int32)`, without checking `method.HasBody`. A `static extern void(int32)` P/Invoke method with that signature causes a `NullReferenceException` during obfuscator detection (before any actual deobfuscation), aborting processing of the whole file — even though the file legitimately is Dotfuscator-protected (confirmed via the `DotfuscatorAttribute`).
Repro: any assembly containing a P/Invoke `static extern void Foo(int)` alongside Agile_NET/Dotfuscator protection.
Fix: guard with `method.HasBody`:
```csharp
if (method.IsStatic && method.HasBody && !method.IsStaticConstructor && DotNetUtils.IsMethod(method, "System.Void", "(System.Int32)")) {
```
Happy to submit this as a PR if useful.
`Agile_NET.ProxyCallFixer.FindDelegateCreator()` (`de4dot.code/deobfuscators/Agile_NET/ProxyCallFixer.cs:47`) accesses `method.Body.Instructions` for any static method matching `void(int32)`, without checking `method.HasBody`. A `static extern void(int32)` P/Invoke method with that signature causes a `NullReferenceException` during obfuscator detection (before any actual deobfuscation), aborting processing of the whole file — even though the file legitimately is Dotfuscator-protected (confirmed via the `DotfuscatorAttribute`).
Repro: any assembly containing a P/Invoke `static extern void Foo(int)` alongside Agile_NET/Dotfuscator protection.
Fix: guard with `method.HasBody`:
```csharp
if (method.IsStatic && method.HasBody && !method.IsStaticConstructor && DotNetUtils.IsMethod(method, "System.Void", "(System.Int32)")) {
```
Happy to submit this as a PR if useful.