rizinorg / rz-pipe

Access rizin via pipe from any programming language!
33 stars 11 forks source link

Inconsistent Disassembly between rz-pipe and rizin #55

Open Veryyes opened 4 months ago

Veryyes commented 4 months ago

Using:

When disassembling this particular basic block I found that pdb returns differently between rzpipe from Python and Rizin.

rzpipe:

In [14]: print(self._pipe.cmd('pdb'))
│           0x00015525      mov   rdi, rbp
│           0x00015528  ~   mov   esi, 0x20                            ; "@"
│           ; CODE XREF from fcn.00014ab0 @ 0x14c95
│           ;-- case 48:                                               ; from 0x14c95
│           0x0001552a      add   byte [rax], al
│           0x0001552c      add   al, ch
│           0x0001552e      hlt
│           0x00015530      invalid
│           0x00015531      dec   dword [rax - 0x75]
│           0x00015534      insb  byte [rdi], dx
│           0x00015535      and   al, 0x30
│           0x00015537      mov   rcx, qword [var_20h]

Rizin:

[0x00015525]> pdb
│           0x00015525      mov   rdi, rbp
│           ; CODE XREF from fcn.00014ab0 @ 0x14c95
│           ;-- case 48:                                               ; from 0x14c95
│           0x00015528  ~   mov   esi, 0x20                            ; "@"
│           0x0001552d      call  sym.imp.memset                       ; sym.imp.memset
│           0x00015532      mov   rbp, qword [var_38h]
│           0x00015537      mov   rcx, qword [var_20h]