Code Monkey home page Code Monkey logo

Comments (7)

vmt avatar vmt commented on September 28, 2024

Hi, sorry, I couldn't make sense of you report. Can you describe the problem?

from udis86.

radare avatar radare commented on September 28, 2024

This bug was reported in radare2 before. The problem is that udis86 doesn't seems to properly disassemble SSE instructions. If you go to 0x00000824 you'll see something like this:

      | |   0x00000824      8b85fcfeffff     mov eax, [rbp-0x104]
      | |   0x0000082a      8b9d00ffffff     mov ebx, [rbp-0x100]
      | |   0x00000830      899dd8feffff     mov [rbp-0x128], ebx
            0x00000836      c5               invalid
            0x00000837      f9               stc
            0x00000838      6e               outsb
            0x00000839      95               xchg ebp, eax
            0x0000083a      d8fe             fdivr st0, st6
            0x0000083c      ff               invalid
            0x0000083d      ffc4             inc esp
            0x0000083f      e369             jrcxz 0x8aa
            0x00000841      22c0             and al, al
            0x00000843      018b8504ffff     add [rbx-0xfb7b], ecx
            0x00000849      ff8b9d08ffff     dec dword [rbx-0xf763]
            0x0000084f      ff899dd8feff     dec dword [rcx-0x12763]
            0x00000855      ffc5             inc ebp
            0x00000857      f9               stc

According to objdump, this should be disassembled as:

 830:   89 9d d8 fe ff ff       mov    %ebx,-0x128(%rbp)
 836:   c5 f9 6e 95 d8 fe ff    vmovd  -0x128(%rbp),%xmm2
 83d:   ff
 83e:   c4 e3 69 22 c0 01       vpinsrd $0x1,%eax,%xmm2,%xmm0
 844:   8b 85 04 ff ff ff       mov    -0xfc(%rbp),%eax
 84a:   8b 9d 08 ff ff ff       mov    -0xf8(%rbp),%ebx
 850:   89 9d d8 fe ff ff       mov    %ebx,-0x128(%rbp)
 856:   c5 f9 6e 9d d8 fe ff    vmovd  -0x128(%rbp),%xmm3
 85d:   ff
 85e:   c4 e3 61 22 c8 01       vpinsrd $0x1,%eax,%xmm3,%xmm1
 864:   c5 f1 6c c0             vpunpcklqdq %xmm0,%xmm1,%xmm0
 868:   c5 f9 7f 85 70 ff ff    vmovdqa %xmm0,-0x90(%rbp)
 86f:   ff
 870:   c5 f9 6f 85 70 ff ff    vmovdqa -0x90(%rbp),%xmm0
 877:   ff
 878:   c5 f9 7f 85 40 ff ff    vmovdqa %xmm0,-0xc0(%rbp)
 87f:   ff
 880:   8b 45 bc                mov    -0x44(%rbp),%eax
 883:   8b 55 b4                mov    -0x4c(%rbp),%edx

from udis86.

XVilka avatar XVilka commented on September 28, 2024

Any updates/decisions on this?

from udis86.

vmt avatar vmt commented on September 28, 2024

Can you try top of tree?

$ echo c5 f9 7f 85 70 ff ff ff | udcli/udcli -x -32
0000000000000000 c5f97f8570ffffff vmovdqa [ebp-0x90], xmm0

$ echo c5 f1 6c c0 | udcli/udcli -x -32
0000000000000000 c5f16cc0         vpunpcklqdq xmm0, xmm1, xmm0

from udis86.

 avatar commented on September 28, 2024

echo c5 f9 7f 85 70 ff ff ff | udcli -x -32
0000000000000000 c5f97f8570ffffff vmovdqa [ebp-0x90], xmm0

echo c5 f1 6c c0 | udcli -x -32
0000000000000000 c5f16cc0 vpunpcklqdq xmm0, xmm1, xmm0

Looks good

from udis86.

radare avatar radare commented on September 28, 2024

Looks good in r2 too after updating to latest udis86 code. Thanks! IMHO you can close the bug

$ rasm2 -d "c4 e3 69 22 c0 01"
vpinsrd xmm0, xmm2, eax, 0x1
$ rasm2 -d c5f97f8570ffffff
vmovdqa [ebp-0x90], xmm0
$ rasm2 -d c5f16cc0
vpunpcklqdq xmm0, xmm1, xmm0

from udis86.

vmt avatar vmt commented on September 28, 2024

Thanks!

from udis86.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.