//alloc(newmem,4048,"DiabloImmortal.exe"+34C0D6) cu
alloc(newmem,4048,"DiabloImmortal.exe"+34BF86)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
mov rax,[rax+10]
mov rcx,[rax+20]

push rax // address
push rcx // address
push rbx // address

mov rax,newmem+500 // address 0x0 value vtmem

mov rcx,[rcx] //> chuyen rcx = rbx = [rax+20]
mov rbx,[rax+0] //> chuyen rcx = rbx = [rax+20]

cmp [rcx+A8],736E6F4D // Monster
jne exit01
cmp [rax+0],48 // for loop < 10
ja exit01
cmp [rax+rbx+0],rcx // for loop < 10 <> rcx
je exit01
mov [rax+rbx+8],rcx // rcx > chuyen thanh rbx+38 = id enemy //mov [rax+8],rsi
add rbx,8
mov [rax+0],rbx
exit01:



cmp byte ptr[r14+0],09 // id enemy > 9
jb exit02
cmp [r14+1],00000000 // id enemy
jne exit02

cmp [rcx+A8],736E6F4D // Monster
jne exit02
//cmp [rdx+28],6165725F // _realFight enemy attack not damage
//jne exit02
cmp [rdx+28],4973695F // _isInCharmState
jne exit02

// 11 HEX AUTO ASSEMBLY = 17 DEC AUTOIT
mov [rax+8*11],rcx // rcx > chuyen thanh rbx+38 = id enemy //mov [rax+8],rsi
//mov [rax+8*12],rdx // target id

exit02:

cmp [rcx+A8],63617053 // SpaceBox
jne exit03
cmp [rcx+A8+4],786F4265 // SpaceBox
jne exit03

// 21 HEX AUTO ASSEMBLY = 33 DEC AUTOIT
mov [rax+8*21],rcx // rcx > chuyen thanh rbx+38 = id enemy //mov [rax+8],rsi
//mov [rax+8*22],rdx // target id

exit03:

pop rbx
pop rcx
pop rax

exit:
jmp returnhere
"DiabloImmortal.exe"+34BF86:
//"DiabloImmortal.exe"+34C0D6: cu
jmp newmem
nop
nop
nop
returnhere:



//P
//_clientCom
//isAiInMast







//E
//isInFOW
//_clientCom
//isAiInMast
//targetid


//targetid
//isAiInMast
//_clientCom




