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(
|
|
||||||
"Could not find interface method {0} ({1:X8}). Type: {2} ({3:X8})",
|
|
||||||
Utils.removeNewlines(pair.Key.MethodDefinition),
|
|
||||||
pair.Key.MethodDefinition.MetadataToken.ToInt32(),
|
|
||||||
Utils.removeNewlines(TypeDefinition),
|
|
||||||
TypeDefinition.MetadataToken.ToInt32());
|
|
||||||
// Ignore if COM class
|
// Ignore if COM class
|
||||||
if (!TypeDefinition.IsImport &&
|
if (!TypeDefinition.IsImport &&
|
||||||
!hasAttribute("System.Runtime.InteropServices.ComImportAttribute") &&
|
!hasAttribute("System.Runtime.InteropServices.ComImportAttribute") &&
|
||||||
!hasAttribute("System.Runtime.InteropServices.TypeLibTypeAttribute"))
|
!hasAttribute("System.Runtime.InteropServices.TypeLibTypeAttribute")) {
|
||||||
throw new ApplicationException(errMsg);
|
Log.w("Could not find interface method {0} ({1:X8}). Type: {2} ({3:X8})",
|
||||||
Log.w("{0}", errMsg);
|
Utils.removeNewlines(pair.Key.MethodDefinition),
|
||||||
|
pair.Key.MethodDefinition.MetadataToken.ToInt32(),
|
||||||
|
Utils.removeNewlines(TypeDefinition),
|
||||||
|
TypeDefinition.MetadataToken.ToInt32());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user