mirror of https://github.com/x64dbg/zydis
Fixed tools
This commit is contained in:
parent
03e26408fe
commit
87e80346f4
|
@ -501,6 +501,7 @@ static ZydisStatus ZydisPrepareOperand(ZydisEncoderContext* ctx,
|
|||
// TODO: MMX registers
|
||||
// TODO: rBP
|
||||
// TODO: RIP relative addressing
|
||||
// TODO: Segment prefixes
|
||||
|
||||
// Memory operand?
|
||||
if (operand->type == ZYDIS_OPERAND_TYPE_MEMORY)
|
||||
|
@ -628,6 +629,7 @@ static ZydisStatus ZydisPrepareOperand(ZydisEncoderContext* ctx,
|
|||
if (reg == -1) return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||
// TODO: Conditional assignment instead?
|
||||
ctx->info->details.vex.vvvv = (reg & 0x0F);
|
||||
ctx->info->details.xop.vvvv = (reg & 0x0F);
|
||||
ctx->info->details.evex.vvvv = (reg & 0x0F);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -77,12 +77,11 @@ int main(int argc, char** argv)
|
|||
ZydisStatus status;
|
||||
size_t readOffs = 0;
|
||||
while ((status = ZydisDecoderDecodeInstruction(
|
||||
&decoder, readBuf + readOffs, numBytesRead - readOffs, &info
|
||||
&decoder, readBuf + readOffs, numBytesRead - readOffs, readOffs, &info
|
||||
)) != ZYDIS_STATUS_NO_MORE_DATA)
|
||||
{
|
||||
if (!ZYDIS_SUCCESS(status))
|
||||
{
|
||||
++decoder.instructionPointer;
|
||||
++readOffs;
|
||||
printf("db %02X\n", info.data[0]);
|
||||
continue;
|
||||
|
|
|
@ -87,12 +87,11 @@ int main()
|
|||
ZydisStatus status;
|
||||
size_t readOffs = 0;
|
||||
while ((status = ZydisDecoderDecodeInstruction(
|
||||
&decoder, readBuf + readOffs, numBytesRead - readOffs, &info
|
||||
&decoder, readBuf + readOffs, numBytesRead - readOffs, readOffs, &info
|
||||
)) != ZYDIS_STATUS_NO_MORE_DATA)
|
||||
{
|
||||
if (!ZYDIS_SUCCESS(status))
|
||||
{
|
||||
++decoder.instructionPointer;
|
||||
++readOffs;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue