Don't call logger.v() unless verbose log level is enabled
This commit is contained in:
parent
53dd1e3619
commit
c47039c2ef
|
@ -538,22 +538,28 @@ namespace de4dot.code {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isVerbose = !Logger.Instance.IgnoresEvent(LoggerEvent.Verbose);
|
||||||
|
bool isVV = !Logger.Instance.IgnoresEvent(LoggerEvent.VeryVerbose);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Deobfuscating methods");
|
Logger.v("Deobfuscating methods");
|
||||||
var methodPrinter = new MethodPrinter();
|
var methodPrinter = new MethodPrinter();
|
||||||
var cflowDeobfuscator = new BlocksCflowDeobfuscator(deob.BlocksDeobfuscators);
|
var cflowDeobfuscator = new BlocksCflowDeobfuscator(deob.BlocksDeobfuscators);
|
||||||
foreach (var method in getAllMethods()) {
|
foreach (var method in getAllMethods()) {
|
||||||
|
if (isVerbose) {
|
||||||
Logger.v("Deobfuscating {0} ({1:X8})", Utils.removeNewlines(method), method.MDToken.ToUInt32());
|
Logger.v("Deobfuscating {0} ({1:X8})", Utils.removeNewlines(method), method.MDToken.ToUInt32());
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
|
}
|
||||||
|
|
||||||
int oldIndentLevel = Logger.Instance.IndentLevel;
|
int oldIndentLevel = Logger.Instance.IndentLevel;
|
||||||
try {
|
try {
|
||||||
deobfuscate(method, cflowDeobfuscator, methodPrinter);
|
deobfuscate(method, cflowDeobfuscator, methodPrinter, isVerbose, isVV);
|
||||||
}
|
}
|
||||||
catch (ApplicationException) {
|
catch (ApplicationException) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
if (!canLoadMethodBody(method)) {
|
if (!canLoadMethodBody(method)) {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Invalid method body. {0:X8}", method.MDToken.ToInt32());
|
Logger.v("Invalid method body. {0:X8}", method.MDToken.ToInt32());
|
||||||
method.Body = new CilBody();
|
method.Body = new CilBody();
|
||||||
}
|
}
|
||||||
|
@ -568,6 +574,7 @@ namespace de4dot.code {
|
||||||
}
|
}
|
||||||
removeNoInliningAttribute(method);
|
removeNoInliningAttribute(method);
|
||||||
|
|
||||||
|
if (isVerbose)
|
||||||
Logger.Instance.deIndent();
|
Logger.Instance.deIndent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,7 +589,7 @@ namespace de4dot.code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void deobfuscate(MethodDef method, BlocksCflowDeobfuscator cflowDeobfuscator, MethodPrinter methodPrinter) {
|
void deobfuscate(MethodDef method, BlocksCflowDeobfuscator cflowDeobfuscator, MethodPrinter methodPrinter, bool isVerbose, bool isVV) {
|
||||||
if (!hasNonEmptyBody(method))
|
if (!hasNonEmptyBody(method))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -615,17 +622,16 @@ namespace de4dot.code {
|
||||||
blocks.getCode(out allInstructions, out allExceptionHandlers);
|
blocks.getCode(out allInstructions, out allExceptionHandlers);
|
||||||
DotNetUtils.restoreBody(method, allInstructions, allExceptionHandlers);
|
DotNetUtils.restoreBody(method, allInstructions, allExceptionHandlers);
|
||||||
|
|
||||||
if (numRemovedLocals > 0)
|
if (isVerbose && numRemovedLocals > 0)
|
||||||
Logger.v("Removed {0} unused local(s)", numRemovedLocals);
|
Logger.v("Removed {0} unused local(s)", numRemovedLocals);
|
||||||
int numRemovedInstructions = oldNumInstructions - method.Body.Instructions.Count;
|
int numRemovedInstructions = oldNumInstructions - method.Body.Instructions.Count;
|
||||||
if (numRemovedInstructions > 0)
|
if (isVerbose && numRemovedInstructions > 0)
|
||||||
Logger.v("Removed {0} dead instruction(s)", numRemovedInstructions);
|
Logger.v("Removed {0} dead instruction(s)", numRemovedInstructions);
|
||||||
|
|
||||||
const LoggerEvent dumpLogLevel = LoggerEvent.VeryVerbose;
|
if (isVV) {
|
||||||
if (!Logger.Instance.IgnoresEvent(dumpLogLevel)) {
|
Logger.log(LoggerEvent.VeryVerbose, "Deobfuscated code:");
|
||||||
Logger.log(dumpLogLevel, "Deobfuscated code:");
|
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
methodPrinter.print(dumpLogLevel, allInstructions, allExceptionHandlers);
|
methodPrinter.print(LoggerEvent.VeryVerbose, allInstructions, allExceptionHandlers);
|
||||||
Logger.Instance.deIndent();
|
Logger.Instance.deIndent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ namespace de4dot.code.renamer {
|
||||||
MemberInfos memberInfos = new MemberInfos();
|
MemberInfos memberInfos = new MemberInfos();
|
||||||
DerivedFrom isDelegateClass;
|
DerivedFrom isDelegateClass;
|
||||||
MergeStateHelper mergeStateHelper;
|
MergeStateHelper mergeStateHelper;
|
||||||
|
bool isVerbose;
|
||||||
|
|
||||||
static string[] delegateClasses = new string[] {
|
static string[] delegateClasses = new string[] {
|
||||||
"System.Delegate",
|
"System.Delegate",
|
||||||
|
@ -75,6 +76,7 @@ namespace de4dot.code.renamer {
|
||||||
public void rename() {
|
public void rename() {
|
||||||
if (modules.Empty)
|
if (modules.Empty)
|
||||||
return;
|
return;
|
||||||
|
isVerbose = !Logger.Instance.IgnoresEvent(LoggerEvent.Verbose);
|
||||||
Logger.n("Renaming all obfuscated symbols");
|
Logger.n("Renaming all obfuscated symbols");
|
||||||
|
|
||||||
modules.initialize();
|
modules.initialize();
|
||||||
|
@ -113,6 +115,7 @@ namespace de4dot.code.renamer {
|
||||||
var overrideMethod = overrides[i].MethodDeclaration;
|
var overrideMethod = overrides[i].MethodDeclaration;
|
||||||
if (method.MethodDef.Name != overrideMethod.Name)
|
if (method.MethodDef.Name != overrideMethod.Name)
|
||||||
continue;
|
continue;
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Removed useless override from method {0} ({1:X8}), override: {2:X8}",
|
Logger.v("Removed useless override from method {0} ({1:X8}), override: {2:X8}",
|
||||||
Utils.removeNewlines(method.MethodDef),
|
Utils.removeNewlines(method.MethodDef),
|
||||||
method.MethodDef.MDToken.ToInt32(),
|
method.MethodDef.MDToken.ToInt32(),
|
||||||
|
@ -125,6 +128,7 @@ namespace de4dot.code.renamer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void renameTypeDefinitions() {
|
void renameTypeDefinitions() {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Renaming obfuscated type definitions");
|
Logger.v("Renaming obfuscated type definitions");
|
||||||
|
|
||||||
foreach (var module in modules.TheModules) {
|
foreach (var module in modules.TheModules) {
|
||||||
|
@ -163,8 +167,8 @@ namespace de4dot.code.renamer {
|
||||||
const int maxClasses = 1;
|
const int maxClasses = 1;
|
||||||
if (list.Count != maxClasses)
|
if (list.Count != maxClasses)
|
||||||
continue;
|
continue;
|
||||||
var ns = list[0].TypeDef.Namespace;
|
if (isVerbose)
|
||||||
Logger.v("Removing namespace: {0}", Utils.removeNewlines(ns));
|
Logger.v("Removing namespace: {0}", Utils.removeNewlines(list[0].TypeDef.Namespace));
|
||||||
foreach (var type in list)
|
foreach (var type in list)
|
||||||
memberInfos.type(type).newNamespace = "";
|
memberInfos.type(type).newNamespace = "";
|
||||||
}
|
}
|
||||||
|
@ -183,6 +187,7 @@ namespace de4dot.code.renamer {
|
||||||
var typeDefinition = type.TypeDef;
|
var typeDefinition = type.TypeDef;
|
||||||
var info = memberInfos.type(type);
|
var info = memberInfos.type(type);
|
||||||
|
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Type: {0} ({1:X8})", Utils.removeNewlines(typeDefinition.FullName), typeDefinition.MDToken.ToUInt32());
|
Logger.v("Type: {0} ({1:X8})", Utils.removeNewlines(typeDefinition.FullName), typeDefinition.MDToken.ToUInt32());
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
|
|
||||||
|
@ -191,12 +196,14 @@ namespace de4dot.code.renamer {
|
||||||
if (RenameTypes && info.gotNewName()) {
|
if (RenameTypes && info.gotNewName()) {
|
||||||
var old = typeDefinition.Name;
|
var old = typeDefinition.Name;
|
||||||
typeDefinition.Name = new UTF8String(info.newName);
|
typeDefinition.Name = new UTF8String(info.newName);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Name: {0} => {1}", Utils.removeNewlines(old), Utils.removeNewlines(typeDefinition.Name));
|
Logger.v("Name: {0} => {1}", Utils.removeNewlines(old), Utils.removeNewlines(typeDefinition.Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RenameNamespaces && info.newNamespace != null) {
|
if (RenameNamespaces && info.newNamespace != null) {
|
||||||
var old = typeDefinition.Namespace;
|
var old = typeDefinition.Namespace;
|
||||||
typeDefinition.Namespace = new UTF8String(info.newNamespace);
|
typeDefinition.Namespace = new UTF8String(info.newNamespace);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Namespace: {0} => {1}", Utils.removeNewlines(old), Utils.removeNewlines(typeDefinition.Namespace));
|
Logger.v("Namespace: {0} => {1}", Utils.removeNewlines(old), Utils.removeNewlines(typeDefinition.Namespace));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,11 +218,13 @@ namespace de4dot.code.renamer {
|
||||||
if (!info.gotNewName())
|
if (!info.gotNewName())
|
||||||
continue;
|
continue;
|
||||||
param.GenericParam.Name = new UTF8String(info.newName);
|
param.GenericParam.Name = new UTF8String(info.newName);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("GenParam: {0} => {1}", Utils.removeNewlines(info.oldFullName), Utils.removeNewlines(param.GenericParam.FullName));
|
Logger.v("GenParam: {0} => {1}", Utils.removeNewlines(info.oldFullName), Utils.removeNewlines(param.GenericParam.FullName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void renameMemberDefinitions() {
|
void renameMemberDefinitions() {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Renaming member definitions #2");
|
Logger.v("Renaming member definitions #2");
|
||||||
|
|
||||||
var allTypes = new List<MTypeDef>(modules.AllTypes);
|
var allTypes = new List<MTypeDef>(modules.AllTypes);
|
||||||
|
@ -230,6 +239,7 @@ namespace de4dot.code.renamer {
|
||||||
void renameMembers(MTypeDef type) {
|
void renameMembers(MTypeDef type) {
|
||||||
var info = memberInfos.type(type);
|
var info = memberInfos.type(type);
|
||||||
|
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Type: {0}", Utils.removeNewlines(info.type.TypeDef.FullName));
|
Logger.v("Type: {0}", Utils.removeNewlines(info.type.TypeDef.FullName));
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
|
|
||||||
|
@ -249,6 +259,7 @@ namespace de4dot.code.renamer {
|
||||||
if (!fieldInfo.gotNewName())
|
if (!fieldInfo.gotNewName())
|
||||||
continue;
|
continue;
|
||||||
fieldDef.FieldDef.Name = new UTF8String(fieldInfo.newName);
|
fieldDef.FieldDef.Name = new UTF8String(fieldInfo.newName);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Field: {0} ({1:X8}) => {2}",
|
Logger.v("Field: {0} ({1:X8}) => {2}",
|
||||||
Utils.removeNewlines(fieldInfo.oldFullName),
|
Utils.removeNewlines(fieldInfo.oldFullName),
|
||||||
fieldDef.FieldDef.MDToken.ToUInt32(),
|
fieldDef.FieldDef.MDToken.ToUInt32(),
|
||||||
|
@ -264,6 +275,7 @@ namespace de4dot.code.renamer {
|
||||||
if (!propInfo.gotNewName())
|
if (!propInfo.gotNewName())
|
||||||
continue;
|
continue;
|
||||||
propDef.PropertyDef.Name = new UTF8String(propInfo.newName);
|
propDef.PropertyDef.Name = new UTF8String(propInfo.newName);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Property: {0} ({1:X8}) => {2}",
|
Logger.v("Property: {0} ({1:X8}) => {2}",
|
||||||
Utils.removeNewlines(propInfo.oldFullName),
|
Utils.removeNewlines(propInfo.oldFullName),
|
||||||
propDef.PropertyDef.MDToken.ToUInt32(),
|
propDef.PropertyDef.MDToken.ToUInt32(),
|
||||||
|
@ -279,6 +291,7 @@ namespace de4dot.code.renamer {
|
||||||
if (!eventInfo.gotNewName())
|
if (!eventInfo.gotNewName())
|
||||||
continue;
|
continue;
|
||||||
eventDef.EventDef.Name = new UTF8String(eventInfo.newName);
|
eventDef.EventDef.Name = new UTF8String(eventInfo.newName);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Event: {0} ({1:X8}) => {2}",
|
Logger.v("Event: {0} ({1:X8}) => {2}",
|
||||||
Utils.removeNewlines(eventInfo.oldFullName),
|
Utils.removeNewlines(eventInfo.oldFullName),
|
||||||
eventDef.EventDef.MDToken.ToUInt32(),
|
eventDef.EventDef.MDToken.ToUInt32(),
|
||||||
|
@ -291,6 +304,7 @@ namespace de4dot.code.renamer {
|
||||||
return;
|
return;
|
||||||
foreach (var methodDef in info.type.AllMethodsSorted) {
|
foreach (var methodDef in info.type.AllMethodsSorted) {
|
||||||
var methodInfo = memberInfos.method(methodDef);
|
var methodInfo = memberInfos.method(methodDef);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Method {0} ({1:X8})", Utils.removeNewlines(methodInfo.oldFullName), methodDef.MethodDef.MDToken.ToUInt32());
|
Logger.v("Method {0} ({1:X8})", Utils.removeNewlines(methodInfo.oldFullName), methodDef.MethodDef.MDToken.ToUInt32());
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
|
|
||||||
|
@ -298,6 +312,7 @@ namespace de4dot.code.renamer {
|
||||||
|
|
||||||
if (RenameMethods && methodInfo.gotNewName()) {
|
if (RenameMethods && methodInfo.gotNewName()) {
|
||||||
methodDef.MethodDef.Name = new UTF8String(methodInfo.newName);
|
methodDef.MethodDef.Name = new UTF8String(methodInfo.newName);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Name: {0} => {1}", Utils.removeNewlines(methodInfo.oldFullName), Utils.removeNewlines(methodDef.MethodDef.FullName));
|
Logger.v("Name: {0} => {1}", Utils.removeNewlines(methodInfo.oldFullName), Utils.removeNewlines(methodDef.MethodDef.FullName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,21 +323,24 @@ namespace de4dot.code.renamer {
|
||||||
continue;
|
continue;
|
||||||
param.ParameterDefinition.CreateParamDef();
|
param.ParameterDefinition.CreateParamDef();
|
||||||
param.ParameterDefinition.Name = paramInfo.newName;
|
param.ParameterDefinition.Name = paramInfo.newName;
|
||||||
|
if (isVerbose) {
|
||||||
if (param.IsReturnParameter)
|
if (param.IsReturnParameter)
|
||||||
Logger.v("RetParam: {0} => {1}", Utils.removeNewlines(paramInfo.oldName), Utils.removeNewlines(paramInfo.newName));
|
Logger.v("RetParam: {0} => {1}", Utils.removeNewlines(paramInfo.oldName), Utils.removeNewlines(paramInfo.newName));
|
||||||
else
|
else
|
||||||
Logger.v("Param ({0}/{1}): {2} => {3}", param.ParameterDefinition.MethodSigIndex + 1, methodDef.MethodDef.MethodSig.GetParamCount(), Utils.removeNewlines(paramInfo.oldName), Utils.removeNewlines(paramInfo.newName));
|
Logger.v("Param ({0}/{1}): {2} => {3}", param.ParameterDefinition.MethodSigIndex + 1, methodDef.MethodDef.MethodSig.GetParamCount(), Utils.removeNewlines(paramInfo.oldName), Utils.removeNewlines(paramInfo.newName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Instance.deIndent();
|
Logger.Instance.deIndent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void renameMemberReferences() {
|
void renameMemberReferences() {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Renaming references to other definitions");
|
Logger.v("Renaming references to other definitions");
|
||||||
foreach (var module in modules.TheModules) {
|
foreach (var module in modules.TheModules) {
|
||||||
if (modules.TheModules.Count > 1)
|
if (modules.TheModules.Count > 1 && isVerbose)
|
||||||
Logger.v("Renaming references to other definitions ({0})", module.Filename);
|
Logger.v("Renaming references to other definitions ({0})", module.Filename);
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
foreach (var refToDef in module.MethodRefsToRename)
|
foreach (var refToDef in module.MethodRefsToRename)
|
||||||
|
@ -338,9 +356,10 @@ namespace de4dot.code.renamer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void renameResources() {
|
void renameResources() {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Renaming resources");
|
Logger.v("Renaming resources");
|
||||||
foreach (var module in modules.TheModules) {
|
foreach (var module in modules.TheModules) {
|
||||||
if (modules.TheModules.Count > 1)
|
if (modules.TheModules.Count > 1 && isVerbose)
|
||||||
Logger.v("Renaming resources ({0})", module.Filename);
|
Logger.v("Renaming resources ({0})", module.Filename);
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
renameResources(module);
|
renameResources(module);
|
||||||
|
@ -387,10 +406,11 @@ namespace de4dot.code.renamer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void renameTypeReferences() {
|
void renameTypeReferences() {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Renaming references to type definitions");
|
Logger.v("Renaming references to type definitions");
|
||||||
var theModules = modules.TheModules;
|
var theModules = modules.TheModules;
|
||||||
foreach (var module in theModules) {
|
foreach (var module in theModules) {
|
||||||
if (theModules.Count > 1)
|
if (theModules.Count > 1 && isVerbose)
|
||||||
Logger.v("Renaming references to type definitions ({0})", module.Filename);
|
Logger.v("Renaming references to type definitions ({0})", module.Filename);
|
||||||
Logger.Instance.indent();
|
Logger.Instance.indent();
|
||||||
foreach (var refToDef in module.TypeRefsToRename) {
|
foreach (var refToDef in module.TypeRefsToRename) {
|
||||||
|
@ -581,6 +601,7 @@ namespace de4dot.code.renamer {
|
||||||
return null;
|
return null;
|
||||||
if (propDef.GetMethod != null)
|
if (propDef.GetMethod != null)
|
||||||
return null;
|
return null;
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Restoring property getter {0} ({1:X8}), Property: {2} ({3:X8})",
|
Logger.v("Restoring property getter {0} ({1:X8}), Property: {2} ({3:X8})",
|
||||||
Utils.removeNewlines(propMethod),
|
Utils.removeNewlines(propMethod),
|
||||||
propMethod.MethodDef.MDToken.ToInt32(),
|
propMethod.MethodDef.MDToken.ToInt32(),
|
||||||
|
@ -610,6 +631,7 @@ namespace de4dot.code.renamer {
|
||||||
return null;
|
return null;
|
||||||
if (propDef.SetMethod != null)
|
if (propDef.SetMethod != null)
|
||||||
return null;
|
return null;
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Restoring property setter {0} ({1:X8}), Property: {2} ({3:X8})",
|
Logger.v("Restoring property setter {0} ({1:X8}), Property: {2} ({3:X8})",
|
||||||
Utils.removeNewlines(propMethod),
|
Utils.removeNewlines(propMethod),
|
||||||
propMethod.MethodDef.MDToken.ToInt32(),
|
propMethod.MethodDef.MDToken.ToInt32(),
|
||||||
|
@ -636,6 +658,7 @@ namespace de4dot.code.renamer {
|
||||||
|
|
||||||
propDef = ownerType.create(newProp);
|
propDef = ownerType.create(newProp);
|
||||||
memberInfos.add(propDef);
|
memberInfos.add(propDef);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Restoring property: {0}", Utils.removeNewlines(newProp));
|
Logger.v("Restoring property: {0}", Utils.removeNewlines(newProp));
|
||||||
return propDef;
|
return propDef;
|
||||||
}
|
}
|
||||||
|
@ -805,6 +828,7 @@ namespace de4dot.code.renamer {
|
||||||
return null;
|
return null;
|
||||||
if (eventDef.AddMethod != null)
|
if (eventDef.AddMethod != null)
|
||||||
return null;
|
return null;
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Restoring event adder {0} ({1:X8}), Event: {2} ({3:X8})",
|
Logger.v("Restoring event adder {0} ({1:X8}), Event: {2} ({3:X8})",
|
||||||
Utils.removeNewlines(eventMethod),
|
Utils.removeNewlines(eventMethod),
|
||||||
eventMethod.MethodDef.MDToken.ToInt32(),
|
eventMethod.MethodDef.MDToken.ToInt32(),
|
||||||
|
@ -831,6 +855,7 @@ namespace de4dot.code.renamer {
|
||||||
return null;
|
return null;
|
||||||
if (eventDef.RemoveMethod != null)
|
if (eventDef.RemoveMethod != null)
|
||||||
return null;
|
return null;
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Restoring event remover {0} ({1:X8}), Event: {2} ({3:X8})",
|
Logger.v("Restoring event remover {0} ({1:X8}), Event: {2} ({3:X8})",
|
||||||
Utils.removeNewlines(eventMethod),
|
Utils.removeNewlines(eventMethod),
|
||||||
eventMethod.MethodDef.MDToken.ToInt32(),
|
eventMethod.MethodDef.MDToken.ToInt32(),
|
||||||
|
@ -861,11 +886,13 @@ namespace de4dot.code.renamer {
|
||||||
|
|
||||||
eventDef = ownerType.create(newEvent);
|
eventDef = ownerType.create(newEvent);
|
||||||
memberInfos.add(eventDef);
|
memberInfos.add(eventDef);
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Restoring event: {0}", Utils.removeNewlines(newEvent));
|
Logger.v("Restoring event: {0}", Utils.removeNewlines(newEvent));
|
||||||
return eventDef;
|
return eventDef;
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepareRenameMemberDefinitions(MethodNameGroups groups) {
|
void prepareRenameMemberDefinitions(MethodNameGroups groups) {
|
||||||
|
if (isVerbose)
|
||||||
Logger.v("Renaming member definitions #1");
|
Logger.v("Renaming member definitions #1");
|
||||||
|
|
||||||
prepareRenameEntryPoints();
|
prepareRenameEntryPoints();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user