Warn if method isn't found since some obfuscators are buggy.
This commit is contained in:
parent
788488dffa
commit
a92bbbe9c3
|
@ -607,18 +607,16 @@ namespace de4dot.code.renamer.asmmodules {
|
||||||
continue;
|
continue;
|
||||||
if (!resolvedAllInterfaces() || !resolvedBaseClasses())
|
if (!resolvedAllInterfaces() || !resolvedBaseClasses())
|
||||||
continue;
|
continue;
|
||||||
string errMsg = string.Format(
|
// Ignore if COM class
|
||||||
"Could not find interface method {0} ({1:X8}). Type: {2} ({3:X8})",
|
if (!TypeDefinition.IsImport &&
|
||||||
|
!hasAttribute("System.Runtime.InteropServices.ComImportAttribute") &&
|
||||||
|
!hasAttribute("System.Runtime.InteropServices.TypeLibTypeAttribute")) {
|
||||||
|
Log.w("Could not find interface method {0} ({1:X8}). Type: {2} ({3:X8})",
|
||||||
Utils.removeNewlines(pair.Key.MethodDefinition),
|
Utils.removeNewlines(pair.Key.MethodDefinition),
|
||||||
pair.Key.MethodDefinition.MetadataToken.ToInt32(),
|
pair.Key.MethodDefinition.MetadataToken.ToInt32(),
|
||||||
Utils.removeNewlines(TypeDefinition),
|
Utils.removeNewlines(TypeDefinition),
|
||||||
TypeDefinition.MetadataToken.ToInt32());
|
TypeDefinition.MetadataToken.ToInt32());
|
||||||
// Ignore if COM class
|
}
|
||||||
if (!TypeDefinition.IsImport &&
|
|
||||||
!hasAttribute("System.Runtime.InteropServices.ComImportAttribute") &&
|
|
||||||
!hasAttribute("System.Runtime.InteropServices.TypeLibTypeAttribute"))
|
|
||||||
throw new ApplicationException(errMsg);
|
|
||||||
Log.w("{0}", errMsg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user