alloc(newmem,4048,"DiabloImmortal.exe"+1244D65)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:

push rax // address

mov rax,newmem+500 // address 0x0 value vtmem

//cmp [rdx+0],74736557 // Westmarch
//jne exit01
//cmp [rdx+4],72616D74 // Westmarch
//jne exit01
mov [rax+8*0],rdx
mov [rax+8*1],rdx
exit01:

pop rax

exit:

movdqu xmm0,[rdx]
movdqu [rax],xmm0

jmp returnhere

"DiabloImmortal.exe"+1244D65:
jmp newmem
nop
nop
nop
returnhere:

