C# Класс SharpDisasm.Disassembler

Provides a simple wrapper around the C# ported udis86 library.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Address ulong
Architecture ArchitectureMode
CopyBinaryToInstruction bool
Translator SharpDisasm.Translators.Translator
Vendor Vendor

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

Метод Описание
Disassemble ( ) : IEnumerable

Disassemble instructions and yield the result. Breaking out of the enumerator will prevent further instructions being disassembled.

Disassembler ( IAssemblyCode code, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System

Initializes a new instance of the Disassembler class.

Disassembler ( IntPtr codePtr, int codeLength, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System

Prepares a new disassembler instance for the code located at the memory address provided. The instructions can then be disassembled with a call to Disassemble. The base address used to resolve relative addresses should be provided in address.

Disassembler ( byte code, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System

Prepares a new disassembler instance for the code provided. The instructions can then be disassembled with a call to Disassemble. The base address used to resolve relative addresses should be provided in address.

Dispose ( ) : void

Dispose

NextInstruction ( ) : Instruction

Decodes a single instruction and increments buffer position.

Reset ( ) : void

Reset to beginning of the buffer

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

Метод Описание
InitUdis86 ( ) : void

(Re)Initialise the udis86 disassembler

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

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

Disassemble instructions and yield the result. Breaking out of the enumerator will prevent further instructions being disassembled.
public Disassemble ( ) : IEnumerable
Результат IEnumerable

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

Initializes a new instance of the Disassembler class.
public Disassembler ( IAssemblyCode code, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System
code IAssemblyCode The code.
architecture ArchitectureMode The architecture.
address ulong The address.
copyBinaryToInstruction bool if set to true [copy binary to instruction].
vendor Vendor The vendor.
Результат System

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

Prepares a new disassembler instance for the code located at the memory address provided. The instructions can then be disassembled with a call to Disassemble. The base address used to resolve relative addresses should be provided in address.
public Disassembler ( IntPtr codePtr, int codeLength, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System
codePtr System.IntPtr A pointer to memory to be disassembled.
codeLength int The maximum length to be disassembled.
architecture ArchitectureMode The architecture of the code (e.g. 64-bit, 32-bit or 16-bit).
address ulong The address of the first byte of code. This value is used to resolve relative addresses into absolute addresses while disassembling.
copyBinaryToInstruction bool Keeps a copy of the binary code for the instruction. This will increase the memory usage for each instruction. This is necessary if planning on using the option.
vendor Vendor What vendors to support for disassembly, default is Any. Other options are AMD or Intel.
Результат System

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

Prepares a new disassembler instance for the code provided. The instructions can then be disassembled with a call to Disassemble. The base address used to resolve relative addresses should be provided in address.
public Disassembler ( byte code, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System
code byte The code to be disassembled
architecture ArchitectureMode The target x86 instruction set architecture of the code (e.g. 64-bit, 32-bit or 16-bit).
address ulong The address of the first byte of code. This value is used to resolve relative addresses into absolute addresses while disassembling.
copyBinaryToInstruction bool Keeps a copy of the binary code for the instruction. This will increase the memory usage for each instruction. This is necessary if planning on using the option.
vendor Vendor What vendor instructions to support during disassembly, default is Any. Other options are AMD or Intel.
Результат System

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

Dispose
public Dispose ( ) : void
Результат void

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

Decodes a single instruction and increments buffer position.
public NextInstruction ( ) : Instruction
Результат Instruction

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

Reset to beginning of the buffer
public Reset ( ) : void
Результат void

Описание свойств

Address публичное свойство

The address
public ulong Address
Результат ulong

Architecture публичное свойство

The x86 CPU architecture to use: 16-bit, 32-bit or 64-bit.
public ArchitectureMode Architecture
Результат ArchitectureMode

CopyBinaryToInstruction публичное свойство

Copies the source binary to the decoded instructions. When true this option increases the memory required for each decoded instruction.
public bool CopyBinaryToInstruction
Результат bool

Translator публичное статическое свойство

The translator that will be used when calling Instruction.ToString.
public static SharpDisasm.Translators.Translator Translator
Результат SharpDisasm.Translators.Translator

Vendor публичное свойство

Which vendor instructions to support for disassembly. Options are AMD, Intel or Any.
public Vendor Vendor
Результат Vendor