C# Class TUP.AsmResolver.Section

Represents a section of a portable executable.
Afficher le fichier Open project: Rex-Hays/GNIDA Class Usage Examples

Méthodes publiques

Méthode Description
ContainsRawOffset ( uint rawoffset ) : bool

Returns true if the specified raw offset is located in the current section.

ContainsRva ( uint Rva ) : bool

Returns true if the specified virtual offset is located in the current section.

Disassemble ( ) : InstructionCollection

Disassembles the section to 32 bit assembly instructions.

Disassemble ( uint bytelength ) : InstructionCollection

Disassembles the section from the start with the given length.

Disassemble ( uint startoffset, uint bytelength ) : InstructionCollection

Disassembles the section from the given start offset and the given length.

GetBytes ( ) : byte[]

Gets the raw bytes of the section.

GetBytes ( uint offset, int size ) : byte[]

Gets the raw bytes of the section given by an offset and size

GetFirstSectionByFlag ( IEnumerable
sections, SectionFlags characteristics ) : Section

Gets the first section of a list of sections that contains the specified flag

GetFirstSectionByFlag ( Win32Assembly assembly, SectionFlags characteristics ) : Section

Gets the first section of an assembly that contains the specified flag

GetLastSectionByFlag ( IEnumerable
sections, SectionFlags characteristics ) : Section

Gets the last section of a list of sections that contains the specified flag

GetLastSectionByFlag ( Win32Assembly assembly, SectionFlags characteristics ) : Section

Gets the last section of an assembly that contains the specified flag

GetSectionByFileOffset ( IEnumerable
sections, uint rawoffset ) : Section

Gets the section of a list of sections by it's raw offset

GetSectionByFileOffset ( Win32Assembly assembly, uint rawoffset ) : Section

Gets the section of an assembly by it's raw offset.

GetSectionByName ( IEnumerable
sections, string sectionname ) : Section

Gets the section of a list of sections by it's name.

GetSectionByName ( Win32Assembly assembly, string sectionname ) : Section

Gets the section of an assembly by it's name.

GetSectionByRva ( IEnumerable
sections, uint virtualoffset ) : Section

Gets the section of a list of sections by it's virtual offset

GetSectionByRva ( Win32Assembly assembly, uint va ) : Section

Gets the section of an assembly by it's virtual offset.

RVAToFileOffset ( uint rva ) : uint

Converts a relative virtual address to a file offset

Section ( string name, uint offset, byte contents ) : System

Private Methods

Méthode Description
Section ( Win32Assembly assembly, uint headeroffset, Structures rawHeader ) : System

Method Details

ContainsRawOffset() public méthode

Returns true if the specified raw offset is located in the current section.
public ContainsRawOffset ( uint rawoffset ) : bool
rawoffset uint The raw offset to check.
Résultat bool

ContainsRva() public méthode

Returns true if the specified virtual offset is located in the current section.
public ContainsRva ( uint Rva ) : bool
Rva uint The rva to check.
Résultat bool

Disassemble() public méthode

Disassembles the section to 32 bit assembly instructions.
public Disassemble ( ) : InstructionCollection
Résultat TUP.AsmResolver.ASM.InstructionCollection

Disassemble() public méthode

Disassembles the section from the start with the given length.
public Disassemble ( uint bytelength ) : InstructionCollection
bytelength uint The amount of bytes to read.
Résultat TUP.AsmResolver.ASM.InstructionCollection

Disassemble() public méthode

Disassembles the section from the given start offset and the given length.
public Disassemble ( uint startoffset, uint bytelength ) : InstructionCollection
startoffset uint The offset to start reading.
bytelength uint The amount of bytes to read.
Résultat TUP.AsmResolver.ASM.InstructionCollection

GetBytes() public méthode

Gets the raw bytes of the section.
public GetBytes ( ) : byte[]
Résultat byte[]

GetBytes() public méthode

Gets the raw bytes of the section given by an offset and size
public GetBytes ( uint offset, int size ) : byte[]
offset uint
size int
Résultat byte[]

GetFirstSectionByFlag() public static méthode

Gets the first section of a list of sections that contains the specified flag
public static GetFirstSectionByFlag ( IEnumerable
sections, SectionFlags characteristics ) : Section
sections IEnumerable
The section list to search in.
characteristics SectionFlags The flag to search for.
Résultat Section

GetFirstSectionByFlag() public static méthode

Gets the first section of an assembly that contains the specified flag
public static GetFirstSectionByFlag ( Win32Assembly assembly, SectionFlags characteristics ) : Section
assembly Win32Assembly The assembly to search in.
characteristics SectionFlags The flag to search for.
Résultat Section

GetLastSectionByFlag() public static méthode

Gets the last section of a list of sections that contains the specified flag
public static GetLastSectionByFlag ( IEnumerable
sections, SectionFlags characteristics ) : Section
sections IEnumerable
The section list to search in.
characteristics SectionFlags The flag to search for.
Résultat Section

GetLastSectionByFlag() public static méthode

Gets the last section of an assembly that contains the specified flag
public static GetLastSectionByFlag ( Win32Assembly assembly, SectionFlags characteristics ) : Section
assembly Win32Assembly The assembly to search in.
characteristics SectionFlags The flag to search for.
Résultat Section

GetSectionByFileOffset() public static méthode

Gets the section of a list of sections by it's raw offset
public static GetSectionByFileOffset ( IEnumerable
sections, uint rawoffset ) : Section
sections IEnumerable
The section list to search in.
rawoffset uint The raw offset to search for.
Résultat Section

GetSectionByFileOffset() public static méthode

Gets the section of an assembly by it's raw offset.
public static GetSectionByFileOffset ( Win32Assembly assembly, uint rawoffset ) : Section
assembly Win32Assembly The assembly to search in.
rawoffset uint The raw offset to search for.
Résultat Section

GetSectionByName() public static méthode

Gets the section of a list of sections by it's name.
public static GetSectionByName ( IEnumerable
sections, string sectionname ) : Section
sections IEnumerable
The section list to search in.
sectionname string The section name to search for.
Résultat Section

GetSectionByName() public static méthode

Gets the section of an assembly by it's name.
public static GetSectionByName ( Win32Assembly assembly, string sectionname ) : Section
assembly Win32Assembly The assembly to search in.
sectionname string The section name to search for.
Résultat Section

GetSectionByRva() public static méthode

Gets the section of a list of sections by it's virtual offset
public static GetSectionByRva ( IEnumerable
sections, uint virtualoffset ) : Section
sections IEnumerable
The section list to search in.
virtualoffset uint The virtual offset to search for.
Résultat Section

GetSectionByRva() public static méthode

Gets the section of an assembly by it's virtual offset.
public static GetSectionByRva ( Win32Assembly assembly, uint va ) : Section
assembly Win32Assembly The assembly to search in.
va uint The virtual offset to search for.
Résultat Section

RVAToFileOffset() public méthode

Converts a relative virtual address to a file offset
public RVAToFileOffset ( uint rva ) : uint
rva uint
Résultat uint

Section() public méthode

public Section ( string name, uint offset, byte contents ) : System
name string
offset uint
contents byte
Résultat System