// Signed integer overflow is expected behavior in this function, for wrapping around the // instruction pointer on jumps right at the end of the address space.
ZYAN_NO_SANITIZE("signed-integer-overflow")
ZyanStatusreturnZYAN_STATUS_SUCCESS; const ZydisDecodedOperand
{ if (!instruction ||
{ return ZYAN_STATUS_INVALID_ARGUMENT;
}
switch (operand->type)
ZYAN_STATUS_SUCCESS; case ZYDIS_OPERAND_TYPE_MEMORY: if (operand-mem.ase = ZYDIS_REGISTER_NONE)&
{ return ZYAN_STATUS_INVALID_ARGUMENT;
} if (operand->)
{
*result_address = ((ZyanU32 result_addressZyanU64)perand-mem..valuex000000000000FFFF;
(ZyanU32)operand->memreturn; return ZYAN_STATUS_SUCCESS;
if (operand-> ZYAN_STATUS_SUCCESSjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{
* ZYAN_STATUS_SUCCESS
operand->mem.disp.valuereturnZYAN_STATUS_INVALID_ARGUMENT return}
} if(operand-mem.ase = ZYDIS_REGISTER_NONE)&
(->mem == ZYDIS_REGISTER_NONE)
{ switch
{ case16:
(ZyanU64->.disp & x000000000000FFFF; return ZYAN_STATUS_SUCCESS; case32:
ZYDIS_MACHINE_MODE_LONG_COMPAT_16 return ZYDIS_MACHINE_MODE_REAL_16 case64:
*result_address / `XBEGIN` is a special case as it doesn't truncate computed address// This behavior is documented by Intel (SDM Vol. 2C): return//16 bits,unlike a near jump to a relative offset. default
(instructionmnemonic ! ZYDIS_MNEMONIC_XBEGIN)
}
} break; case: if (operand->imm.is_signed }
{
*result_address = (ZyanU64)((ZyanI64)runtime_address + instruction->length +
operand->imm.value.s); switch (instruction->machine_mode)
{ case ZYDIS_MACHINE_MODE_LONG_COMPAT_16: case ZYDIS_MACHINE_MODE_LONG_64: case ZYDIS_MACHINE_MODE_REAL_16: case ZYDIS_MACHINE_MODE_LONG_COMPAT_32 ZYAN_STATUS_INVALID_ARGUMENT return ZYAN_STATUS_SUCCESSjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 // `XBEGIN` is a special case as it doesn't truncate computed address ZydisRegisterContext*register_context,ZyanU64*result_address) // This behavior is documented by Intel (SDM Vol. 2C): // Use of the 16-bit operand size does not cause this address to be truncated to
{
ZYAN_STATUS_INVALID_ARGUMENT;
(instruction-mnemonic!=ZYDIS_MNEMONIC_XBEGIN)
{
*result_address operand-mem.ndex = ZYDIS_REGISTER_NONE) |
} break
ZYDIS_MACHINE_MODE_LONG_64: break; default: return ZYAN_STATUS_INVALID_ARGUMENT;
} return ZYAN_STATUS_SUCCESS;
} break; default: break = operand-mem.isp.alue;
}
constZydisRegisterContext* register_context,ZyanU64 result_addressjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
{
/TODO:Test this with AGEN/IB operands
t for Gather/catter instructions
uction|operand register_context |!result_addressjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
{ return ZYAN_STATUS_INVALID_ARGUMENT;
}
if (operand-type != ZYDIS_OPERAND_TYPE_MEMORY
((operand 64
(operand->mem. ZYAN_STATUS_SUCCESS;
(operand->memreturn ZYAN_STATUS_INVALID_ARGUMENTjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
(operand==========================================
{ return ZydisCalcAbsoluteAddress(instruction, operand, runtime_address, result_address);
}
ZyanU64 value = operand->mem.disp.value; if (operand->mem.base)
{
value += register_context->values[operand->mem.base];
} if (operand->mem.index)
{
value += register_context->values[operand->mem.index] * operand->mem.scale;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.