Use getModuleTypeCctor()

This commit is contained in:
de4dot 2012-03-15 09:35:44 +01:00
parent 67cb85e7ce
commit 0537a2edce
5 changed files with 5 additions and 8 deletions

View File

@ -63,7 +63,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
}
public void find() {
var cctor = DotNetUtils.getMethod(DotNetUtils.getModuleType(module), ".cctor");
var cctor = DotNetUtils.getModuleTypeCctor(module);
if (cctor == null)
return;

View File

@ -51,7 +51,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
}
public void find() {
var cctor = DotNetUtils.getMethod(DotNetUtils.getModuleType(module), ".cctor");
var cctor = DotNetUtils.getModuleTypeCctor(module);
if (cctor == null)
return;

View File

@ -317,7 +317,7 @@ namespace de4dot.code.deobfuscators {
}
public void addModuleCctorInitCallToBeRemoved(MethodDefinition methodToBeRemoved) {
methodCallRemover.add(DotNetUtils.getMethod(DotNetUtils.getModuleType(module), ".cctor"), methodToBeRemoved);
methodCallRemover.add(DotNetUtils.getModuleTypeCctor(module), methodToBeRemoved);
}
public void addCtorInitCallToBeRemoved(MethodDefinition methodToBeRemoved) {

View File

@ -266,10 +266,7 @@ namespace de4dot.code.deobfuscators.SmartAssembly {
}
bool hasModuleCctor() {
var type = DotNetUtils.getModuleType(module);
if (type == null)
return false;
return DotNetUtils.getMethod(type, ".cctor") != null;
return DotNetUtils.getModuleTypeCctor(module) != null;
}
bool hasEmptyClassesInEveryNamespace() {

View File

@ -46,7 +46,7 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
}
public void find(ISimpleDeobfuscator simpleDeobfuscator, IDeobfuscator deob) {
if (checkInitMethod(DotNetUtils.getMethod(DotNetUtils.getModuleType(module), ".cctor"), simpleDeobfuscator, deob))
if (checkInitMethod(DotNetUtils.getModuleTypeCctor(module), simpleDeobfuscator, deob))
return;
if (checkInitMethod(module.EntryPoint, simpleDeobfuscator, deob))
return;