Decrypt method is not always present

This commit is contained in:
de4dot 2013-11-24 07:07:05 +01:00
parent 52bf3d43ec
commit a5da42093a

View File

@ -186,7 +186,7 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
return method; return method;
} }
throw new ApplicationException("Could not find decrypt method"); return null;
} }
void UpdateDecrypterType() { void UpdateDecrypterType() {
@ -228,10 +228,12 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
if (!CreateAssemblyInfos()) if (!CreateAssemblyInfos())
throw new ApplicationException("Could not initialize assembly infos"); throw new ApplicationException("Could not initialize assembly infos");
simpleDeobfuscator.Deobfuscate(decryptMethod); if (decryptMethod != null) {
simpleDeobfuscator.DecryptStrings(decryptMethod, deob); simpleDeobfuscator.Deobfuscate(decryptMethod);
if (!CreateDecryptKey()) simpleDeobfuscator.DecryptStrings(decryptMethod, deob);
throw new ApplicationException("Could not initialize decryption key"); if (!CreateDecryptKey())
throw new ApplicationException("Could not initialize decryption key");
}
} }
void FindOtherType() { void FindOtherType() {
@ -274,6 +276,7 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
return true; return true;
} }
decryptKey = null;
return false; return false;
} }