diff --git a/de4dot.code/deobfuscators/ILProtector/DynamicMethodsRestorer.cs b/de4dot.code/deobfuscators/ILProtector/DynamicMethodsRestorer.cs index ecbff882..c54f007e 100644 --- a/de4dot.code/deobfuscators/ILProtector/DynamicMethodsRestorer.cs +++ b/de4dot.code/deobfuscators/ILProtector/DynamicMethodsRestorer.cs @@ -19,6 +19,7 @@ using System; using System.Collections.Generic; +using System.IO; using dnlib.DotNet; using AssemblyData; using de4dot.code.AssemblyClient; @@ -31,6 +32,7 @@ namespace de4dot.code.deobfuscators.ILProtector { } protected override void DecryptInternal() { + CheckRuntimeFiles(); IList decryptedData; var serverVersion = NewProcessAssemblyClientFactory.GetServerClrVersion(module); using (var client = new NewProcessAssemblyClientFactory(serverVersion).Create(AssemblyServiceType.Generic)) { @@ -49,6 +51,13 @@ namespace de4dot.code.deobfuscators.ILProtector { methodInfos[info.id] = info; } + void CheckRuntimeFiles() { + foreach (var info in mainType.RuntimeFileInfos) { + if (!File.Exists(info.PathName)) + Logger.w(string.Format("ILProtector runtime file '{0}' is missing.", info.PathName)); + } + } + IList GetMethodIds() { var ids = new List();