C# 클래스 SharpDisasm.Disassembler

Provides a simple wrapper around the C# ported udis86 library.
상속: IDisposable
파일 보기 프로젝트 열기: spazzarama/SharpDisasm 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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