public override uint GetPhysicalLength()
{
return 0xE0; // TODO: make dynamic
throw new NotImplementedException();
return (uint)(sizeof (ushort) +
2 * sizeof (byte) +
5 * sizeof (uint) +
sizeof (ulong) + // 2x uint or 1x ulong
2 * sizeof (uint) +
6 * sizeof (ushort) +
4 * sizeof (uint) +
2 * sizeof (ushort) +
4 * (Magic == OptionalHeaderMagic.Pe32 ? sizeof (uint) : sizeof (ulong)) +
2 * sizeof (uint) +
DataDirectories.Count * DataDirectories[0].GetPhysicalLength());
}