alloc(newmem,2048,"DiabloImmortal.exe"+1A8434F) 
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:

// arrow + light
// [r15+14] = x float
// [r15+18] = y float
// [r15+24] = x size float
// [r15+28] = y size float
// [r15+6C] bat = 0 tat = 1, +2C x y hps

// [r15-1C] = xmin float
// [r15-18] = ymax float

// [r15-4] = xmax float
// [r15-0] = ymin float

//new func 2
// [rax+14] = x float
// [rax+18] = y float
// [rax+24] = x size float
// [rax+28] = y size float
// [rax+6C] bat = 0 tat = 1, +2C x y hps

// [rax-1C] = xmin float
// [rax-18] = ymax float

// [rax-4] = xmax float
// [rax-0] = ymin float

//movss xmm8,[rax+18]
//movss xmm9,[rax+1C]
movss xmm10,[rax-34]
//movss xmm11,[rax-30]
//movss xmm12,[rax-2C]




// Mượn rcx để chứa địa chỉ mảng quản lý thay cho rax
push rcx
mov rcx,newmem+500

cmp byte ptr[rax-50],01
jne if01
movss xmm10,[rax-28]
if01:

cmp byte ptr[rax-50],00
jne if02
mov [rcx+8*1],rax        // Lưu con trỏ đối tượng (rax) vào slot 1
if02:

// REMOVE ARROW Clans unlocked + Open Inventory + Click to view

cmp byte ptr [rcx+8*3],1 // Đọc cờ bật/tắt (slot 3)
jne if03
cmp [rax+24],(float)0.2
jb if03
cmp [rax+24],(float)0.8
ja if03
cmp [rax+28],(float)0.0
jb if03
cmp [rax+28],(float)0.6
ja if03

cmp [rax-1C],(float)307  // xmin
jb if03
cmp [rax-4],(float)678   // xmax
ja if03
cmp [rax-18],(float)404  // ymax
jb if03
cmp [rax-0],(float)527   // ymin
ja if03
movss xmm10,[rax-28]     // Ép giá trị float vào xmm10 để ẩn
if03:

pop rcx








exit:
jmp returnhere

"DiabloImmortal.exe"+1A8434F:
jmp newmem
nop
returnhere:

