Zydis  v3.0.0
Decoder

Functions allowing decoding of instruction bytes to a machine interpretable struct. More...

Functions

ZYDIS_EXPORT ZyanStatus ZydisDecoderInit (ZydisDecoder *decoder, ZydisMachineMode machine_mode, ZydisAddressWidth address_width)
 Initializes the given ZydisDecoder instance. More...
 
ZYDIS_EXPORT ZyanStatus ZydisDecoderEnableMode (ZydisDecoder *decoder, ZydisDecoderMode mode, ZyanBool enabled)
 Enables or disables the specified decoder-mode. More...
 
ZYDIS_EXPORT ZyanStatus ZydisDecoderDecodeBuffer (const ZydisDecoder *decoder, const void *buffer, ZyanUSize length, ZydisDecodedInstruction *instruction)
 Decodes the instruction in the given input buffer. More...
 

Detailed Description

Functions allowing decoding of instruction bytes to a machine interpretable struct.

Function Documentation

◆ ZydisDecoderDecodeBuffer()

ZYDIS_EXPORT ZyanStatus ZydisDecoderDecodeBuffer ( const ZydisDecoder decoder,
const void *  buffer,
ZyanUSize  length,
ZydisDecodedInstruction instruction 
)

Decodes the instruction in the given input buffer.

Parameters
decoderA pointer to the ZydisDecoder instance.
bufferA pointer to the input buffer.
lengthThe length of the input buffer.
instructionA pointer to the ZydisDecodedInstruction struct, that receives the details about the decoded instruction.
Returns
A zyan status code.

◆ ZydisDecoderEnableMode()

ZYDIS_EXPORT ZyanStatus ZydisDecoderEnableMode ( ZydisDecoder decoder,
ZydisDecoderMode  mode,
ZyanBool  enabled 
)

Enables or disables the specified decoder-mode.

Parameters
decoderA pointer to the ZydisDecoder instance.
modeThe decoder mode.
enabledZYAN_TRUE to enable, or ZYAN_FALSE to disable the specified decoder-mode.
Returns
A zyan status code.

◆ ZydisDecoderInit()

ZYDIS_EXPORT ZyanStatus ZydisDecoderInit ( ZydisDecoder decoder,
ZydisMachineMode  machine_mode,
ZydisAddressWidth  address_width 
)

Initializes the given ZydisDecoder instance.

Parameters
decoderA pointer to the ZydisDecoder instance.
machine_modeThe machine mode.
address_widthThe address width.
Returns
A zyan status code.