Use getModuleTypeCctor()
This commit is contained in:
parent
67cb85e7ce
commit
0537a2edce
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user