x86 (ISA) Instruction Set Architecture is a variable length primarily CISC design
CISC is complex instruction set computing
RISC is Reduced instruction set computing
the x86 ISA can encode operations between 1 byte to 15 bytes max
the human readable form of encoding is called mnemonic
example for mnemonics are nop, int 3 , push eax etc
the machine readable form is binary (0,1)
usually encoded as a BYTE (8 bit) between 0x00 and 0xFF
(00000000 to 11111111) or between 20 -1 and 28 -1
these bytes are termed opcodes (the hex bytes you see in display)
- Single Byte Encoded Operation examples
mnem= mnemonic , enco= Encoding
mnem |enco |
nop | 0x90 |
int 3 | 0xcc |
push eax | 0x50 |
- Two Byte Encoded Operation examples
mnem= mnemonic , enco= Encoding
mnem |enco |
mov ebp,esp | 0x8BEC |
A 12 byte Encoded Operation
>>> for i in range( len(ks.asm(CODE)[0])):
... print (hex(ks.asm(CODE)[0][i])),
...
0xf0 0x81 0x84 0x4e 0x67 0x45 0x23 0x1 0xef 0xcd 0xab 0x89
>>> print CODE
LOCK ADD DWORD PTR DS:[ESI+ECX*2+0x1234567], 0x89ABCDEF
the setting 6 you have circled in you screen shot limits the number of displayed opcodes to a maximum of 6 bytes only
so in the last instruction above you will only see a display of
0xf0 0x81 0x84 0x4e 0x67 0x45 and not all of the 12 bytes
83EC1C => sub esp, 0x1c
, the disassembler doesn't actually change anything in the file it just shows you the translation which is the assembly language instructions.