1) Disassembling
"add eax,edx" instruction:
Few members of _dis_data struct
members (output):
len
= 02
// instruction length
opcode = 03
// instruction opcode
modrm = c2
// modrm value
dst_regs = 0000000f (EAX+)
// destination register
src_regs = 00000f0f (EAX+EDX+)
// source registers
i_dst_regs = 0000000f (EAX+)
// syntax view
i_src_regs = 00000f00 (EDX+)
// syntax view
Last two members presented (i_dst_regs/i_src_regs)
shows the view of the registers "directly" based on the instruction
syntax.
2) Disassembling
"push dword ptr [edx+ecx*8+10h]" instruction:
Few members of _dis_data struct
members (output):
len = 04
// instruction length
opcode = ff
// instruction opcode
modrm = 74
// modrm value
dst_regs = 00030000 (ESP+)
// used by instruction as dest
src_regs = 00030ff0 (ECX+EDX+ESP) // used by
instruction as src
i_dst_regs = 00000000 ()
// blank
i_src_regs = 00000000 ()
// blank
mem_act = 00 (SOURCE)
// mem request as source
mem_regs = 00000ff0 (ECX+EDX+)
// regs used for mem operation
mem_imm = 0010
// here it is 10h
mem_imm_size = 01
// size of mem imm operand
use_sib = 01
// we use sib here (1=true)
sib = ca
// value of sib byte
sib_mul = 08
// the multipler
sib_mul_reg = 000000f0 (ECX+)
// reg which will be multipled
|