PeHeaders
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
Aggregated PE header information for a .NET assembly.
public sealed record PeHeaders : IEquatable<PeHeaders>Inheritance
Section titled “Inheritance”Object → PeHeaders
Implements
Section titled “Implements”Constructors
Section titled “Constructors”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)Properties
Section titled “Properties”Characteristics
Section titled “Characteristics”COFF header characteristics flags.
Returns: Characteristics
public Characteristics Characteristics { get; init; }DllCharacteristics
Section titled “DllCharacteristics”DLL characteristics flags (ASLR, DEP, etc.).
Returns: DllCharacteristics
public DllCharacteristics DllCharacteristics { get; init; }EntryPointRva
Section titled “EntryPointRva”RVA of the entry point function.
Returns: Int32
public int EntryPointRva { get; init; }FileAlignment
Section titled “FileAlignment”Alignment of sections on disk.
Returns: Int32
public int FileAlignment { get; init; }ImageBase
Section titled “ImageBase”Preferred base address of the image.
Returns: UInt64
public ulong ImageBase { get; init; }Machine
Section titled “Machine”The target machine architecture.
Returns: Machine
public Machine Machine { get; init; }PE magic number (PE32 or PE32+).
Returns: PEMagic
public PEMagic Magic { get; init; }MajorLinkerVersion
Section titled “MajorLinkerVersion”Major version of the linker that produced the image.
Returns: Byte
public byte MajorLinkerVersion { get; init; }MinorLinkerVersion
Section titled “MinorLinkerVersion”Minor version of the linker that produced the image.
Returns: Byte
public byte MinorLinkerVersion { get; init; }NumberOfSections
Section titled “NumberOfSections”Number of sections in the PE file.
Returns: Int32
public int NumberOfSections { get; init; }SectionAlignment
Section titled “SectionAlignment”Alignment of sections in memory.
Returns: Int32
public int SectionAlignment { get; init; }SizeOfCode
Section titled “SizeOfCode”Total size of all code sections.
Returns: Int32
public int SizeOfCode { get; init; }SizeOfHeaders
Section titled “SizeOfHeaders”Combined size of all headers.
Returns: Int32
public int SizeOfHeaders { get; init; }SizeOfImage
Section titled “SizeOfImage”Total size of the image in memory.
Returns: Int32
public int SizeOfImage { get; init; }Subsystem
Section titled “Subsystem”The Windows subsystem required to run the image.
Returns: Subsystem
public Subsystem Subsystem { get; init; }TimeDateStamp
Section titled “TimeDateStamp”The linker timestamp from the COFF header.
Returns: Int32
public int TimeDateStamp { get; init; }Methods
Section titled “Methods”Deconstruct(out Machine, out Characteristics, out int, out PEMagic, out byte, out byte, out int, out int, out ulong, out int, out int, out int, out int, out Subsystem, out DllCharacteristics, out int)
Section titled “Deconstruct(out Machine, out Characteristics, out int, out PEMagic, out byte, out byte, out int, out int, out ulong, out int, out int, out int, out int, out Subsystem, out DllCharacteristics, out int)”Parameters:
Machine(Machine)Characteristics(Characteristics)TimeDateStamp(Int32)Magic(PEMagic)MajorLinkerVersion(Byte)MinorLinkerVersion(Byte)SizeOfCode(Int32)EntryPointRva(Int32)ImageBase(UInt64)SectionAlignment(Int32)FileAlignment(Int32)SizeOfImage(Int32)SizeOfHeaders(Int32)Subsystem(Subsystem)DllCharacteristics(DllCharacteristics)NumberOfSections(Int32)
public void Deconstruct(out Machine Machine, out Characteristics Characteristics, out int TimeDateStamp, out PEMagic Magic, out byte MajorLinkerVersion, out byte MinorLinkerVersion, out int SizeOfCode, out int EntryPointRva, out ulong ImageBase, out int SectionAlignment, out int FileAlignment, out int SizeOfImage, out int SizeOfHeaders, out Subsystem Subsystem, out DllCharacteristics DllCharacteristics, out int NumberOfSections)Equals(object?)
Section titled “Equals(object?)”Parameters:
obj(Object)
Returns: Boolean
public override bool Equals(object? obj)Equals(PeHeaders?)
Section titled “Equals(PeHeaders?)”Parameters:
other(PeHeaders)
Returns: Boolean
public bool Equals(PeHeaders? other)GetHashCode()
Section titled “GetHashCode()”Returns: Int32
public override int GetHashCode()ToString()
Section titled “ToString()”Returns: String
public override string ToString()Members
Section titled “Members”operator !=(PeHeaders?, PeHeaders?)
Section titled “operator !=(PeHeaders?, PeHeaders?)”Parameters:
Returns: Boolean
public static bool operator !=(PeHeaders? left, PeHeaders? right)operator ==(PeHeaders?, PeHeaders?)
Section titled “operator ==(PeHeaders?, PeHeaders?)”Parameters:
Returns: Boolean
public static bool operator ==(PeHeaders? left, PeHeaders? right)