Use IPEImage.FindWin32ResourceData()
This commit is contained in:
parent
832fb849ba
commit
ac9168599b
|
@ -146,15 +146,7 @@ namespace de4dot.code.deobfuscators.Agile_NET {
|
||||||
|
|
||||||
// CS 1.x
|
// CS 1.x
|
||||||
byte[] unpackNativeFile2(IPEImage peImage) {
|
byte[] unpackNativeFile2(IPEImage peImage) {
|
||||||
var resources = peImage.Win32Resources;
|
var data = peImage.FindWin32ResourceData("ASSEMBLY", 101, 0);
|
||||||
if (resources == null)
|
|
||||||
return null;
|
|
||||||
var dir = resources.Root;
|
|
||||||
if ((dir = dir.FindDirectory("ASSEMBLY")) == null)
|
|
||||||
return null;
|
|
||||||
if ((dir = dir.FindDirectory(101)) == null)
|
|
||||||
return null;
|
|
||||||
var data = dir.FindData(0);
|
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user