alloc(newmem,4048,"DiabloImmortal.exe"+D41366)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
mov [rdx+20],eax
movss [rdx+24],xmm0
// [r12+0] = gui_img_map_

push rax // address

mov rax,newmem+500 // address 0x0 value vtmem

mov [rax+8*0],rdx
mov [rax+8*1],r12
mov [rax+8*2],r12

pop rax

exit:
jmp returnhere

"DiabloImmortal.exe"+D41366:
jmp newmem
nop
nop
nop
returnhere:

