Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Operand AccessMode parsing #42

Open
windgodm opened this issue Aug 31, 2022 · 0 comments
Open

Incorrect Operand AccessMode parsing #42

windgodm opened this issue Aug 31, 2022 · 0 comments

Comments

@windgodm
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant