Change method sig to take a IPEImage instead of a PEImage
This commit is contained in:
parent
d47a03f51a
commit
73e15c0919
|
@ -118,12 +118,12 @@ namespace de4dot.code.deobfuscators.Agile_NET {
|
||||||
base.init(module);
|
base.init(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] unpackNativeFile(PEImage peImage) {
|
public override byte[] unpackNativeFile(IPEImage peImage) {
|
||||||
return unpackNativeFile1(peImage) ?? unpackNativeFile2(peImage);
|
return unpackNativeFile1(peImage) ?? unpackNativeFile2(peImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Old CS versions
|
// Old CS versions
|
||||||
byte[] unpackNativeFile1(PEImage peImage) {
|
byte[] unpackNativeFile1(IPEImage peImage) {
|
||||||
const int dataDirNum = 6; // debug dir
|
const int dataDirNum = 6; // debug dir
|
||||||
const int dotNetDirNum = 14;
|
const int dotNetDirNum = 14;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ namespace de4dot.code.deobfuscators.Agile_NET {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CS 1.x
|
// CS 1.x
|
||||||
byte[] unpackNativeFile2(PEImage peImage) {
|
byte[] unpackNativeFile2(IPEImage peImage) {
|
||||||
var resources = peImage.Win32Resources;
|
var resources = peImage.Win32Resources;
|
||||||
if (resources == null)
|
if (resources == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -112,7 +112,7 @@ namespace de4dot.code.deobfuscators {
|
||||||
DefaultDecrypterType = DecrypterType.Static;
|
DefaultDecrypterType = DecrypterType.Static;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual byte[] unpackNativeFile(PEImage peImage) {
|
public virtual byte[] unpackNativeFile(IPEImage peImage) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace de4dot.code.deobfuscators {
|
||||||
IDeobfuscatedFile DeobfuscatedFile { get; set; }
|
IDeobfuscatedFile DeobfuscatedFile { get; set; }
|
||||||
|
|
||||||
// Returns null or the unpacked .NET PE file
|
// Returns null or the unpacked .NET PE file
|
||||||
byte[] unpackNativeFile(PEImage peImage);
|
byte[] unpackNativeFile(IPEImage peImage);
|
||||||
|
|
||||||
void init(ModuleDefMD module);
|
void init(ModuleDefMD module);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user