Remove ILP detection

This commit is contained in:
de4dot 2012-06-27 15:19:09 +02:00
parent 4236514691
commit 4c5fa3e809

View File

@ -98,8 +98,6 @@ namespace de4dot.code.deobfuscators.Unknown {
}
string scanTypes() {
if (checkILProtector())
return "ILProtector";
foreach (var type in module.Types) {
if (type.FullName == "ZYXDNGuarder")
return "DNGuard HVM";
@ -113,27 +111,6 @@ namespace de4dot.code.deobfuscators.Unknown {
return null;
}
static string[] ilpLocals = new string[] {
"System.Boolean",
"System.IntPtr",
"System.Object[]",
};
bool checkILProtector() {
var cctor = DotNetUtils.getModuleTypeCctor(module);
if (cctor == null)
return false;
if (!new LocalTypes(cctor).exactly(ilpLocals))
return false;
var type = cctor.DeclaringType;
if (!DotNetUtils.hasPinvokeMethod(type, "Protect") && !DotNetUtils.hasPinvokeMethod(type, "P0"))
return false;
if (type.Fields.Count != 1)
return false;
return true;
}
public override IEnumerable<int> getStringDecrypterMethods() {
return new List<int>();
}