diff --git a/de4dot.code/deobfuscators/MaxtoCode/MethodsDecrypter.cs b/de4dot.code/deobfuscators/MaxtoCode/MethodsDecrypter.cs index ea296afc..27cfb8b8 100644 --- a/de4dot.code/deobfuscators/MaxtoCode/MethodsDecrypter.cs +++ b/de4dot.code/deobfuscators/MaxtoCode/MethodsDecrypter.cs @@ -255,15 +255,25 @@ namespace de4dot.code.deobfuscators.MaxtoCode { } } + Dictionary savedInfos = null; foreach (var decrypter in decrypters) { try { - if (InitializeInfos2(decrypter)) - return true; + if (InitializeInfos2(decrypter)) { + if (savedInfos != null) { + Logger.w("Decryption probably failed. Make sure the correct MaxtoCode runtime file is present."); + break; + } + savedInfos = infos; + infos = new Dictionary(); + } } catch { } } - return false; + if (savedInfos == null) + return false; + infos = savedInfos; + return true; } IDecrypter GetCorrectDecrypter(uint timeStamp) {