View Single Post
  #6  
Old 01-05-2014, 05:42
h8er h8er is offline
Friend
 
Join Date: Jan 2002
Posts: 43
Rept. Given: 45
Rept. Rcvd 7 Times in 6 Posts
Thanks Given: 140
Thanks Rcvd at 13 Times in 6 Posts
h8er Reputation: 7
Hi, the documentation at cs.virginia.edu seems outdated, take look at the documentation in the folder pin-2.13-62141-msvc10-windows\extras\xed2-ia32\doc\ref-manual\html\group__CMDLINE.html or at this site

Code:
http://software.intel.com/sites/landingpage/pintool/docs/58423/Xed/html/group__CMDLINE.html
to encode a jmp you have to do something like this:

Code:
xed -e jmp "BRDISP:11223344"
Code:
g:\projects\pin-2.13-62141-msvc10-windows\extras\xed2-ia32\bin>xed -e jmp "BRDISP:11223344"
Request: JMP BRDISP_WIDTH:32, MODE:1, RELBR:0x11223344, SMODE:1
OPERAND ORDER: RELBR
Encodable! E944332211
.byte 0xe9,0x44,0x33,0x22,0x11

for pointers:

Code:
xed -e jmp "MEM4:EAX"
Code:
g:\projects\pin-2.13-62141-msvc10-windows\extras\xed2-ia32\bin>xed -e jmp "MEM4:
EAX"
Request: JMP EASZ:2, MEM_WIDTH:4, MEM0:dword ptr [EAX], MODE:1, SMODE:1
OPERAND ORDER: MEM0
Encodable! FF20
.byte 0xff,0x20

Last edited by h8er; 01-05-2014 at 05:54.
Reply With Quote
The Following User Gave Reputation+1 to h8er For This Useful Post:
ferrit.rce (01-05-2014)