C# Класс TUP.AsmResolver.Section

Represents a section of a portable executable.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Section ( Win32Assembly assembly, uint headeroffset, Structures rawHeader ) : System

Описание методов

ContainsRawOffset() публичный Метод

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.
Результат bool

ContainsRva() публичный Метод

Returns true if the specified virtual offset is located in the current section.
public ContainsRva ( uint Rva ) : bool
Rva uint The rva to check.
Результат bool

Disassemble() публичный Метод

Disassembles the section to 32 bit assembly instructions.
public Disassemble ( ) : InstructionCollection
Результат TUP.AsmResolver.ASM.InstructionCollection

Disassemble() публичный Метод

Disassembles the section from the start with the given length.
public Disassemble ( uint bytelength ) : InstructionCollection
bytelength uint The amount of bytes to read.
Результат TUP.AsmResolver.ASM.InstructionCollection

Disassemble() публичный Метод

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.
Результат TUP.AsmResolver.ASM.InstructionCollection

GetBytes() публичный Метод

Gets the raw bytes of the section.
public GetBytes ( ) : byte[]
Результат byte[]

GetBytes() публичный Метод

Gets the raw bytes of the section given by an offset and size
public GetBytes ( uint offset, int size ) : byte[]
offset uint
size int
Результат byte[]

GetFirstSectionByFlag() публичный статический Метод

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.
Результат Section

GetFirstSectionByFlag() публичный статический Метод

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.
Результат Section

GetLastSectionByFlag() публичный статический Метод

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.
Результат Section

GetLastSectionByFlag() публичный статический Метод

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.
Результат Section

GetSectionByFileOffset() публичный статический Метод

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.
Результат Section

GetSectionByFileOffset() публичный статический Метод

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.
Результат Section

GetSectionByName() публичный статический Метод

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.
Результат Section

GetSectionByName() публичный статический Метод

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.
Результат Section

GetSectionByRva() публичный статический Метод

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.
Результат Section

GetSectionByRva() публичный статический Метод

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.
Результат Section

RVAToFileOffset() публичный Метод

Converts a relative virtual address to a file offset
public RVAToFileOffset ( uint rva ) : uint
rva uint
Результат uint

Section() публичный Метод

public Section ( string name, uint offset, byte contents ) : System
name string
offset uint
contents byte
Результат System