Update code since EntryPoint was renamed ManagedEntryPoint
This commit is contained in:
parent
427ea38595
commit
6efb96740d
|
@ -228,7 +228,7 @@ namespace de4dot.code.deobfuscators {
|
|||
if (cctor != null)
|
||||
yield return cctor;
|
||||
|
||||
var entryPoint = module.EntryPoint as MethodDef;
|
||||
var entryPoint = module.EntryPoint;
|
||||
if (entryPoint != null) {
|
||||
cctor = entryPoint.DeclaringType.FindClassConstructor();
|
||||
if (cctor != null)
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace de4dot.code.deobfuscators.MPRESS {
|
|||
new MethodInfo("System.Int32", "(System.String[])"),
|
||||
};
|
||||
Version detectVersion() {
|
||||
var ep = module.EntryPoint as MethodDef;
|
||||
var ep = module.EntryPoint;
|
||||
if (ep == null || ep.Body == null)
|
||||
return Version.Unknown;
|
||||
var type = ep.DeclaringType;
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace de4dot.code.deobfuscators {
|
|||
this.module = module;
|
||||
this.removedMethods = removedMethods;
|
||||
foreach (var method in possiblyUnusedMethods) {
|
||||
if (method != module.EntryPoint && !removedMethods.exists(method))
|
||||
if (method != module.ManagedEntryPoint && !removedMethods.exists(method))
|
||||
this.possiblyUnusedMethods[method] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1574,7 +1574,7 @@ namespace de4dot.code.renamer {
|
|||
|
||||
void prepareRenameEntryPoints() {
|
||||
foreach (var module in modules.TheModules) {
|
||||
var entryPoint = module.ModuleDefMD.EntryPoint as MethodDef;
|
||||
var entryPoint = module.ModuleDefMD.EntryPoint;
|
||||
if (entryPoint == null)
|
||||
continue;
|
||||
var methodDef = modules.resolveMethod(entryPoint);
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace de4dot.code.renamer.asmmodules {
|
|||
}
|
||||
|
||||
void add(ModuleDef mod) {
|
||||
push(mod.EntryPoint);
|
||||
push(mod.ManagedEntryPoint);
|
||||
add(mod.CustomAttributes);
|
||||
add(mod.Types);
|
||||
add(mod.ExportedTypes);
|
||||
|
|
2
dot10
2
dot10
|
@ -1 +1 @@
|
|||
Subproject commit 71e94c79a8271bbd0abb614ac8b79d31e98674b4
|
||||
Subproject commit c0e5b8b8ef7c5f3ad8cb9fb82f806f016572816e
|
Loading…
Reference in New Issue
Block a user