

//alloc(newmem,2048,"DiabloImmortal.exe"+AA9CC2)
//alloc(newmem,2048,"DiabloImmortal.exe"+B064B2)
//alloc(newmem,2048,"DiabloImmortal.exe"+B07492)
//alloc(newmem,2048,"DiabloImmortal.exe"+B4E852)
alloc(newmem,2048,"DiabloImmortal.exe"+15BD2EE)

label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:

// 000000 4D 6F 6E 73 74 65 72 000000  Monster

// rcx + 38 = r14 = id enemy
// [rcx + 38] > 0 = 66 68 npc summon
// rcx+A8 = 736E6F4D // Monster
// rcx+AC = 00726574 // Monster
// rcx+C8 = float x
// rcx+D0 = float y
// rdx = text target or client combat
// rdx+28 = 696C635F _clientCombatSwitch
// rdx+2F = 626D6F43 _clientCombatSwitch
// rdx+28 = 67726174 targetid
// rdx+28 = 69417369 isAiInMaster

// rdx = text target or client combat
// rdx+28 = 696C635F _clientCombatSwitch
// rdx+2F = 626D6F43 _clientCombatSwitch
// rdx+28 = 67726174 targetid
// rdx+28 = 69417369 isAiInMaster

// rdx+28 = 656E776F // ownerid > bi tan cong bat id
// rdx+28 = trang thai text
// rdx+370 = _teamId text

// new func 2

//rcx+C8 = text Monster
// rcx+E8 = float x
// rcx+F0 = float y
// rcx + 38 = r14 = id enemy
// [rcx + 38] > 0 = 66 68 npc summon


// xor r8d,r8d
mov rcx,[rax+20]
mov rax,[rcx]
//mov rsi,[rax+000001D8] // cu mov rsi,[rax+000001B8]
      // them mov rcx,[rcx]  // > tach ra de lay rcx = rbx > text monster
// vi thieu bytes jmp > mov rcx,[rax+20]
// mov rcx,rsi




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+C8],736E6F4D // Monster
jne exit01

//jne exit01
//cmp [rdx+470],6165745F // _teamId
//jne exit01
//cmp [rdx+470+4],0064496D // _teamId
//jne exit01


mov [rax+0],rbx
mov [rax+8],rcx
mov [rax+10],rdx
mov [rax+10],rdx
exit01:


pop rbx
pop rcx
pop rax



exit:
jmp returnhere



//"DiabloImmortal.exe"+AA9CC2:
//"DiabloImmortal.exe"+B064B2:
//"DiabloImmortal.exe"+B07492:
//"DiabloImmortal.exe"+B4E852:
"DiabloImmortal.exe"+15BD2EE:


jmp newmem
nop
nop
returnhere:

