Skip to content

Incorrect Operand AccessMode parsing #42

@windgodm

Description

@windgodm

Incorrect operand parsing:

x64 assembly: xor r11b, 0
in binary: 41 80 f3 00

Here is a part of test code:

DISASM infos;
int len;
BYTE buf[4] = { 0x41, 0x80, 0xf3, 0x00 };
// init
memset(&infos, 0, sizeof(DISASM));
infos.EIP = (UINT64)buf;
infos.VirtualAddr = 0;
// disasm
len = Disasm(&infos);
cout << infos.Operand1.AccessMode << endl;

I expect the result to be infos.Operand1.AccessMode = 3 (3 = READ | WRITE)
But it print 2 (2 = WRITE)

I check xor rcx, Imm, the result is 3, which means rcx will be read and than write.
But when it disasm xor r11b, Imm, the result is 2, means r11 only be write.
I think the result should be the same as the former as 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions