Skip to content

PeHeaders

Namespace: Dotsider.Core.Analysis.Models

Assembly: Dotsider.Core.dll

Aggregated PE header information for a .NET assembly.

public sealed record PeHeaders : IEquatable<PeHeaders>

ObjectPeHeaders

PeHeaders(Machine, Characteristics, int, PEMagic, byte, byte, int, int, ulong, int, int, int, int, Subsystem, DllCharacteristics, int)

Section titled “PeHeaders(Machine, Characteristics, int, PEMagic, byte, byte, int, int, ulong, int, int, int, int, Subsystem, DllCharacteristics, int)”

Aggregated PE header information for a .NET assembly.

Parameters:

  • Machine (Machine): The target machine architecture.
  • Characteristics (Characteristics): COFF header characteristics flags.
  • TimeDateStamp (Int32): The linker timestamp from the COFF header.
  • Magic (PEMagic): PE magic number (PE32 or PE32+).
  • MajorLinkerVersion (Byte): Major version of the linker that produced the image.
  • MinorLinkerVersion (Byte): Minor version of the linker that produced the image.
  • SizeOfCode (Int32): Total size of all code sections.
  • EntryPointRva (Int32): RVA of the entry point function.
  • ImageBase (UInt64): Preferred base address of the image.
  • SectionAlignment (Int32): Alignment of sections in memory.
  • FileAlignment (Int32): Alignment of sections on disk.
  • SizeOfImage (Int32): Total size of the image in memory.
  • SizeOfHeaders (Int32): Combined size of all headers.
  • Subsystem (Subsystem): The Windows subsystem required to run the image.
  • DllCharacteristics (DllCharacteristics): DLL characteristics flags (ASLR, DEP, etc.).
  • NumberOfSections (Int32): Number of sections in the PE file.
public PeHeaders(Machine Machine, Characteristics Characteristics, int TimeDateStamp, PEMagic Magic, byte MajorLinkerVersion, byte MinorLinkerVersion, int SizeOfCode, int EntryPointRva, ulong ImageBase, int SectionAlignment, int FileAlignment, int SizeOfImage, int SizeOfHeaders, Subsystem Subsystem, DllCharacteristics DllCharacteristics, int NumberOfSections)

COFF header characteristics flags.

Returns: Characteristics

public Characteristics Characteristics { get; init; }

DLL characteristics flags (ASLR, DEP, etc.).

Returns: DllCharacteristics

public DllCharacteristics DllCharacteristics { get; init; }

RVA of the entry point function.

Returns: Int32

public int EntryPointRva { get; init; }

Alignment of sections on disk.

Returns: Int32

public int FileAlignment { get; init; }

Preferred base address of the image.

Returns: UInt64

public ulong ImageBase { get; init; }

The target machine architecture.

Returns: Machine

public Machine Machine { get; init; }

PE magic number (PE32 or PE32+).

Returns: PEMagic

public PEMagic Magic { get; init; }

Major version of the linker that produced the image.

Returns: Byte

public byte MajorLinkerVersion { get; init; }

Minor version of the linker that produced the image.

Returns: Byte

public byte MinorLinkerVersion { get; init; }

Number of sections in the PE file.

Returns: Int32

public int NumberOfSections { get; init; }

Alignment of sections in memory.

Returns: Int32

public int SectionAlignment { get; init; }

Total size of all code sections.

Returns: Int32

public int SizeOfCode { get; init; }

Combined size of all headers.

Returns: Int32

public int SizeOfHeaders { get; init; }

Total size of the image in memory.

Returns: Int32

public int SizeOfImage { get; init; }

The Windows subsystem required to run the image.

Returns: Subsystem

public Subsystem Subsystem { get; init; }

The linker timestamp from the COFF header.

Returns: Int32

public int TimeDateStamp { get; init; }