Use new FieldTypes code
This commit is contained in:
parent
fec1ec7e35
commit
0f627d728c
|
@ -132,23 +132,10 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
|
||||||
if (fields.Count != 2)
|
if (fields.Count != 2)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int fieldAssembly = 0, fieldBool = 0;
|
var fieldTypes = new FieldTypes(fields);
|
||||||
foreach (var field in fields) {
|
return fieldTypes.count("System.Boolean") == 1 &&
|
||||||
switch (field.FieldType.FullName) {
|
(fieldTypes.count("System.Collections.Hashtable") == 1 ||
|
||||||
case "System.Collections.Hashtable":
|
fieldTypes.count("System.Object") == 1);
|
||||||
case "System.Object":
|
|
||||||
fieldAssembly++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "System.Boolean":
|
|
||||||
fieldBool++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fieldAssembly == 1 && fieldBool == 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static MethodDefinition findAssemblyResolveMethod(TypeDefinition type) {
|
static MethodDefinition findAssemblyResolveMethod(TypeDefinition type) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user