why rasm2 generates different code for one instruction than my instruction in original binary?

117 views Asked by At

I have a code in x86 binary, I opened it with radare2 and (in visual mode) I have the following instructions:

Address       Instruction     ASM Istruction
0x00401251    85c0            test eax, eax
0x00401253    0f84c0000000    je 0x401319;

Rabin2 give me this information about the binary:

rabin2 -I bin.exe
arch     x86
binsz    72704
bintype  pe
bits     32
canary   false
class    PE32
cmp.csum 0x0001820e
compiled Wed Oct 11 01:56:45 2017
crypto   false
endian   little
havecode true
hdr.csum 0x00000000
linenum  false
lsyms    false
machine  i386
maxopsz  16
minopsz  1
nx       true
os       windows
overlay  false
pcalign  0
pic      false
relocs   true
signed   false
static   false
stripped true
subsys   Windows CUI
va       true

If I run rasm2 and try to generate binary code of je 0x401319; with:

rasm2 -a x86 -b 32 "je 0x401319"

It returns a different binary code:

0f8413134000

I don't know why this happens.

0

There are 0 answers