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 64-bit decode of 0x488b3d534c5f #17

Closed
GoogleCodeExporter opened this issue Apr 20, 2015 · 2 comments
Closed

incorrect 64-bit decode of 0x488b3d534c5f #17

GoogleCodeExporter opened this issue Apr 20, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

run the following python code

from distorm3 import Decode, Decode64Bits
for op in  Decode(0x400000, '488b3d534c5f'.decode('hex'), Decode64Bits):
    print op[2]


What is the expected output? What do you see instead?

It prints:
DB 0x48
DB 0x8b
DB 0x3d
PUSH RBX
POP RDI

However other disassemblers print:
MOV RDI, QWORD PTR [0x5F4C74]


What version of the product are you using? On what operating system?
distrom3-1.0 python installer


Original issue reported on code.google.com by jcope...@gmail.com on 5 Nov 2010 at 7:45

@GoogleCodeExporter
Copy link
Author

I don't know what you're trying to disassemble. But you have two prefixes here! 
So the second one overrides the first one. Then the instruction starts with 
0x3d, which is really a 'compare'. And then you're not passing enough bytes so 
you get the instruction broken.

I don't know what disassembler you use, but even WinDbg gave me the following 
output for your input:
0 48              ???
1 4b3d534c5fcc    cmp     rax,0FFFFFFFFCC5F4C53h

So if you're adding another byte to the stream, diStorm will give you a good 
result.
Good luck.

Original comment by distorm@gmail.com on 6 Nov 2010 at 6:17

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

I was disassembling it with PEBrowsePro, which must automatically pad with 
zeros because if I change the bytes to '488b3d534c5f00', as you suggest, it 
matches what PEBrowsePro gives..

Sorry.

Original comment by jcope...@gmail.com on 7 Nov 2010 at 3:54

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

No branches or pull requests

1 participant