alloc(newmem,2048,"DiabloImmortal.exe"+6BADF3) 
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
// rdx + 0 + 8 + 0 = string text item
// rdx + 10 = float x > mouse x
// rdx + 14 = float y > sizey 534-359=mousey

// movups xmm0,[rsp+30]
movups [rdx+08],xmm0
movups xmm1,[rsp+40]
// movups [rdx+18],xmm1

//cmp [rbx+2],646C6F47 // kiem tra text 5 gold item
//cmp byte ptr [rbx+10B],01 // kiem tra text 5 gold item
cmp [rbx+90],746E6F66 // kiem tra text font
jne exit

cmp [rdx+10],(float)200  // < x 200 exit
jb exit

cmp [rdx+10],(float)750  // > x 750 exit
ja exit

cmp [rdx+14],(float)0  // < y 0 exit
jb exit

cmp [rdx+14],(float)500  // > y 500 exit
ja exit

push rax
mov rax,17186FC0000+8
mov [rax],rdx
pop rax



exit:
jmp returnhere

"DiabloImmortal.exe"+6BADF3:
jmp newmem
nop
nop
nop
nop
returnhere:

