C# Class AsmResolver.WindowsAssembly

Represents a windows assembly image.
Inheritance: IOffsetConverter
Mostrar archivo Open project: JerreS/AsmResolver Class Usage Examples

Public Methods

Method Description
FileOffsetToRva ( long fileOffset ) : long
FromBytes ( byte bytes ) : WindowsAssembly

Reads a windows assembly image from the given byte array.

FromBytes ( byte bytes, ReadingParameters parameters ) : WindowsAssembly

Reads a windows assembly image from the given byte array, using the specified reading parameters.

FromFile ( string file ) : WindowsAssembly

Reads a windows assembly image from a file.

FromReader ( IBinaryStreamReader stream ) : WindowsAssembly

Reads a windows assembly image from a binary stream.

FromReader ( IBinaryStreamReader stream, ReadingParameters parameters ) : WindowsAssembly

Reads a windows assembly image from a binary stream, using the specified reading parameters.

GetSectionHeaderByFileOffset ( long fileOffset ) : ImageSectionHeader

Determines the image section the given absolute file offset is located at.

GetSectionHeaderByRva ( long rva ) : ImageSectionHeader

Determines the image section the given relative virtual address (RVA) is located at.

RvaToFileOffset ( long rva ) : long
WindowsAssembly ( ) : System

Creates a new empty windows assembly image.

Write ( BuildingParameters parameters ) : void

Rebuilds and writes the assembly to a destination, using the specified building parameters.

Write ( IBinaryStreamWriter writer ) : void

Rebuilds and writes the assembly to a specific binary stream.

Write ( string file ) : void

Rebuilds and writes the assembly to a specific file path.

Private Methods

Method Description
CreateDataDirectoryContext ( ReadingContext context, int directoryIndex ) : ReadingContext
FromReadingContext ( ReadingContext context ) : WindowsAssembly

Method Details

FileOffsetToRva() public method

public FileOffsetToRva ( long fileOffset ) : long
fileOffset long
return long

FromBytes() public static method

Reads a windows assembly image from the given byte array.
public static FromBytes ( byte bytes ) : WindowsAssembly
bytes byte The bytes to read the assembly from.
return WindowsAssembly

FromBytes() public static method

Reads a windows assembly image from the given byte array, using the specified reading parameters.
public static FromBytes ( byte bytes, ReadingParameters parameters ) : WindowsAssembly
bytes byte The bytes to read the assembly from.
parameters ReadingParameters The extra parameters the reading procedure should use to read the assembly.
return WindowsAssembly

FromFile() public static method

Reads a windows assembly image from a file.
public static FromFile ( string file ) : WindowsAssembly
file string The path of the file to read.
return WindowsAssembly

FromReader() public static method

Reads a windows assembly image from a binary stream.
public static FromReader ( IBinaryStreamReader stream ) : WindowsAssembly
stream IBinaryStreamReader The stream reader to use for reading the assembly.
return WindowsAssembly

FromReader() public static method

Reads a windows assembly image from a binary stream, using the specified reading parameters.
public static FromReader ( IBinaryStreamReader stream, ReadingParameters parameters ) : WindowsAssembly
stream IBinaryStreamReader The stream reader to use for reading the assembly.
parameters ReadingParameters The extra parameters the reading procedure should use to read the assembly.
return WindowsAssembly

GetSectionHeaderByFileOffset() public method

Determines the image section the given absolute file offset is located at.
public GetSectionHeaderByFileOffset ( long fileOffset ) : ImageSectionHeader
fileOffset long The absolute file offset to check.
return ImageSectionHeader

GetSectionHeaderByRva() public method

Determines the image section the given relative virtual address (RVA) is located at.
public GetSectionHeaderByRva ( long rva ) : ImageSectionHeader
rva long The relative virtual address to check.
return ImageSectionHeader

RvaToFileOffset() public method

public RvaToFileOffset ( long rva ) : long
rva long
return long

WindowsAssembly() public method

Creates a new empty windows assembly image.
public WindowsAssembly ( ) : System
return System

Write() public method

Rebuilds and writes the assembly to a destination, using the specified building parameters.
public Write ( BuildingParameters parameters ) : void
parameters AsmResolver.Builder.BuildingParameters The parameters to use for building the assembly image.
return void

Write() public method

Rebuilds and writes the assembly to a specific binary stream.
public Write ( IBinaryStreamWriter writer ) : void
writer IBinaryStreamWriter The writer to write the image to.
return void

Write() public method

Rebuilds and writes the assembly to a specific file path.
public Write ( string file ) : void
file string The file path to write the image to.
return void