Closed GoogleCodeExporter closed 9 years ago
Did you debug and single step it ?
Maybe the AVX prefix causes this.
Original comment by distorm@gmail.com
on 30 Oct 2012 at 6:58
I've done no debugging, other than finding the error and reporting multiple
examples. I suppose the avx prefix could be the issue as it uses the same
opcodes as the les and lds instructions. But shouldn't this only apply to
instructions using the SIMD XMM registers?
And, on 32bit, the prefix should only be valid when the following byte is
11xxxxxx.
Original comment by mnor...@cerodias.com
on 4 Nov 2012 at 3:01
I found the problem.. I will fix it when I get the time. Thanks for the info!
Original comment by distorm@gmail.com
on 5 Nov 2012 at 10:48
I am now figuring out how to deal with it. And first question that pops up to
my mind is why you decided that this behavior is an error ?
As far as I'm concerned, the VEX prefix is skipped just as if it were any other
prefix, and since it might be 2 or 3 bytes - they are all skipped.
I could add some "hack" to skip only the first byte of it, and continue from
there, but to be honest, I'm not sure which way is the right way.
Original comment by distorm@gmail.com
on 19 Nov 2012 at 10:19
Part of why I decided this was an error is that distorm is not handling the
issue the same way as ndisasm or IDA. They both mark the first byte with 'db'
and start a new instruction with the next byte. I believe this is how distorm
handles other instructions that fail disassembly and expected the same behavior
here.
Also, if you look closely at the examples above, sometimes this is affecting
the 4th byte in the sequence. As an example, consider
c4d0ffff83c40c508d
should be
c4 DB 0xc4
d0ff SAR BH, 0x1
ff83c40c508d INC DWORD [EBX-0x72aff33c]
disassembles as
c4 DB 0xc4
d0 DB 0xd0
ff DB 0xff
ff DB 0xff
83c40c ADD ESP, 0xc
50 PUSH EAX
8d DB 0x8d
The 4th byte is supposed to be the start of the INC instruction, but was
somehow messed up as well.
Original comment by mnor...@cerodias.com
on 24 Nov 2012 at 3:01
Problem fixed. Will be released in next version.
Original comment by distorm@gmail.com
on 26 Nov 2012 at 8:12
Thanks!
On Nov 19, 2012 5:19 PM, <distorm@googlecode.com> wrote:
Original comment by mnor...@cerodias.com
on 26 Nov 2012 at 8:09
Original issue reported on code.google.com by
mnor...@cerodias.com
on 30 Oct 2012 at 6:24