Write a message if decryption probably failed

This commit is contained in:
de4dot 2013-10-21 07:29:20 +02:00
parent 8808c049f1
commit 730505fd4f

View File

@ -255,15 +255,25 @@ namespace de4dot.code.deobfuscators.MaxtoCode {
} }
} }
Dictionary<uint, DecryptedMethodInfo> savedInfos = null;
foreach (var decrypter in decrypters) { foreach (var decrypter in decrypters) {
try { try {
if (InitializeInfos2(decrypter)) if (InitializeInfos2(decrypter)) {
return true; if (savedInfos != null) {
Logger.w("Decryption probably failed. Make sure the correct MaxtoCode runtime file is present.");
break;
}
savedInfos = infos;
infos = new Dictionary<uint, DecryptedMethodInfo>();
}
} }
catch { catch {
} }
} }
return false; if (savedInfos == null)
return false;
infos = savedInfos;
return true;
} }
IDecrypter GetCorrectDecrypter(uint timeStamp) { IDecrypter GetCorrectDecrypter(uint timeStamp) {