Remove module references to the CS RT files
This commit is contained in:
parent
7e5e7ddcd2
commit
7a0804e035
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Mono.Cecil;
|
||||
using de4dot.blocks;
|
||||
|
@ -57,6 +58,22 @@ namespace de4dot.code.deobfuscators.CliSecure {
|
|||
get { return loadMethod; }
|
||||
}
|
||||
|
||||
public IEnumerable<ModuleReference> DecryptModuleReferences {
|
||||
get {
|
||||
var list = new List<ModuleReference>();
|
||||
addModuleReference(list, "_Initialize");
|
||||
addModuleReference(list, "_Initialize64");
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
void addModuleReference(List<ModuleReference> list, string methodName) {
|
||||
var method = DotNetUtils.getPInvokeMethod(cliSecureRtType, methodName);
|
||||
if (method == null)
|
||||
return;
|
||||
list.Add(method.PInvokeInfo.Module);
|
||||
}
|
||||
|
||||
public CliSecureRtType(ModuleDefinition module) {
|
||||
this.module = module;
|
||||
}
|
||||
|
|
|
@ -279,6 +279,7 @@ namespace de4dot.code.deobfuscators.CliSecure {
|
|||
}
|
||||
if (options.DecryptMethods) {
|
||||
addResources("Obfuscator protection files");
|
||||
addModuleReferencesToBeRemoved(cliSecureRtType.DecryptModuleReferences, "Obfuscator protection files");
|
||||
addModuleReferences("Obfuscator protection files");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user