Remove automated error reporting code from SA 4.x assemblies
This commit is contained in:
parent
9ed55629e6
commit
b3463a3859
|
@ -96,7 +96,7 @@ namespace de4dot.deobfuscators.SmartAssembly {
|
||||||
bool isAutomatedErrorReportingMethodHelper(MethodDefinition method) {
|
bool isAutomatedErrorReportingMethodHelper(MethodDefinition method) {
|
||||||
if (!method.HasBody || !method.IsStatic || method.Name == ".ctor")
|
if (!method.HasBody || !method.IsStatic || method.Name == ".ctor")
|
||||||
return false;
|
return false;
|
||||||
if (DotNetUtils.hasReturnValue(method))
|
if (DotNetUtils.hasReturnValue(method) && method.MethodReturnType.ReturnType.FullName != "System.Exception")
|
||||||
return false;
|
return false;
|
||||||
if (method.Parameters.Count == 0)
|
if (method.Parameters.Count == 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -112,9 +112,8 @@ namespace de4dot.deobfuscators.SmartAssembly {
|
||||||
bool isAutomatedErrorReportingMethod(MethodDefinition method) {
|
bool isAutomatedErrorReportingMethod(MethodDefinition method) {
|
||||||
if (!method.HasBody || !method.IsStatic || method.Name == ".ctor")
|
if (!method.HasBody || !method.IsStatic || method.Name == ".ctor")
|
||||||
return false;
|
return false;
|
||||||
if (!DotNetUtils.isMethod(method, "System.Void", "(System.Exception,System.Object[])"))
|
return DotNetUtils.isMethod(method, "System.Void", "(System.Exception,System.Object[])") ||
|
||||||
return false;
|
DotNetUtils.isMethod(method, "System.Exception", "(System.Exception,System.Object[])");
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void initUnhandledExceptionFilterMethods() {
|
void initUnhandledExceptionFilterMethods() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user