Rename method. Ignore generic methods.

This commit is contained in:
de4dot 2012-02-03 16:21:59 +01:00
parent 3caad72275
commit 84f322dbcf

View File

@ -55,10 +55,10 @@ namespace de4dot.code.deobfuscators.Spices_Net {
public void initialize() {
initializeMethodsTypes();
restoreInstanceMethods();
restoreMethodBodies();
}
void restoreInstanceMethods() {
void restoreMethodBodies() {
var methodToOrigMethods = new MethodDefinitionAndDeclaringTypeDict<List<MethodDefinition>>();
foreach (var t in module.Types) {
var types = new List<TypeDefinition>(TypeDefinition.GetTypes(new List<TypeDefinition> { t }));
@ -114,6 +114,8 @@ namespace de4dot.code.deobfuscators.Spices_Net {
return false;
if (!calledMethod.IsStatic)
return false;
if (calledMethod.GenericParameters.Count > 0)
return false;
if (calledMethod.Body == null || calledMethod.Body.Instructions.Count == 0)
return false;