Warn if an unused string decrypter is found

This commit is contained in:
de4dot 2011-11-14 06:21:43 +01:00
parent cf6387a4c1
commit d7149abe4e

View File

@ -394,11 +394,18 @@ namespace de4dot.deobfuscators.SmartAssembly {
}
if (initdInfo == null)
throw new ApplicationException("Could not initialize all stringDecrypterInfos");
break;
initd[initdInfo] = true;
initStringDecrypter(initdInfo);
}
// Sometimes there could be a string decrypter present that isn't called by anyone.
foreach (var info in stringDecrypterInfos) {
if (initd.ContainsKey(info))
continue;
Log.v("String decrypter not initialized. Token {0:X8}", info.StringsEncodingClass.MetadataToken.ToInt32());
}
}
void initStringDecrypter(StringDecrypterInfo info) {