PEReader = new PEReader(Unsafe.As<byte[], ImmutableArray<byte>>(ref image));
}
+ else
+ {
+ ImmutableArray<byte> content = PEReader.GetEntireImage().GetContent();
+ Image = Unsafe.As<ImmutableArray<byte>, byte[]>(ref content);
+ }
if (metadata == null && PEReader.HasMetadata)
{
{
throw new BadImageFormatException($"ECMA metadata / RTR_HEADER not found in file '{Filename}'");
}
-
- ImmutableArray<byte> content = PEReader.GetEntireImage().GetContent();
- Image = Unsafe.As<ImmutableArray<byte>, byte[]>(ref content);
}
private void EnsureMethods()