Zydis
v2.0.3
|
Other utility functions. More...
Go to the source code of this file.
Functions | |
ZYDIS_EXPORT ZydisStatus | ZydisCalcAbsoluteAddress (const ZydisDecodedInstruction *instruction, const ZydisDecodedOperand *operand, ZydisU64 *address) |
Calculates the absolute target-address for the given instruction operand. More... | |
ZYDIS_EXPORT ZydisStatus | ZydisGetAccessedFlagsByAction (const ZydisDecodedInstruction *instruction, ZydisCPUFlagAction action, ZydisCPUFlagMask *flags) |
Returns a mask of accessed CPU-flags matching the given action . More... | |
Other utility functions.
ZYDIS_EXPORT ZydisStatus ZydisCalcAbsoluteAddress | ( | const ZydisDecodedInstruction * | instruction, |
const ZydisDecodedOperand * | operand, | ||
ZydisU64 * | address | ||
) |
Calculates the absolute target-address for the given instruction operand.
instruction | A pointer to the ZydisDecodedInstruction struct. |
operand | A pointer to the ZydisDecodedOperand struct. |
address | A pointer to the memory that receives the absolute target-address. |
You should use this function in the following cases:
IMM
operands with relative address (e.g. JMP
, CALL
, ...)MEM
operands with RIP/EIP-relative address (e.g. MOV RAX, [RIP+0x12345678]
)MEM
operands with absolute address (e.g. MOV RAX, [0x12345678]
)ZYDIS_EXPORT ZydisStatus ZydisGetAccessedFlagsByAction | ( | const ZydisDecodedInstruction * | instruction, |
ZydisCPUFlagAction | action, | ||
ZydisCPUFlagMask * | flags | ||
) |
Returns a mask of accessed CPU-flags matching the given action
.
instruction | A pointer to the ZydisDecodedInstruction struct. |
action | The CPU-flag action. |
flags | A pointer to the variable that receives the flag mask. |