//alloc(newmem,4048,"DiabloImmortal.exe"+6BA9F3) cu
alloc(newmem,4048,"DiabloImmortal.exe"+6BB0A3)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
// movaps [rax-68],xmm11
movaps xmm11,xmm3
movaps xmm10,xmm2
// mov rbx,rcx
// cmp byte ptr [rcx+6C],00

// rcx+6C = bat 1 tat 0
// rcx+2C = y hp
// rcx+30 = x hp
// rcx+34 = % hp

// summon = y 50 x 78 % 7.8 float
// enemy = y 50 x 52 % 23.39999962
// 42480000 42500000 41BB3333
// rbx+0 = float object x
// rbx+4 = float object y
// rsi+0 =
// rdi+0 = name path png


push rax // addresscc
mov rax,newmem+500 // address 0x0 value vtmem
//mov byte ptr [rcx+6C],01 // test

cmp byte ptr [rcx+6C],00
jne exit01
cmp [rcx+2C],42480000 // y hp do
jne exit01
cmp [rcx+30],42500000 // sx hp do
jne exit01
cmp [rcx+34],41BB3333 // sy hp do
jne exit01

mov [rax],rcx // 6C bat = 0 tat = 1, +2C x y hp
mov [rax+8],rbx // float x float y
mov byte ptr [rax+10],1 // hp enemy
mov [rax+18],rdi // rdi png

exit01:

cmp byte ptr [rcx+6C],01
jne exit03
cmp [rcx+2C],42480000 // x ? npc
jne exit03
cmp [rcx+30],42820000 // sx ? npc
jne exit03
cmp [rcx+34],42820000 // s ? npc
jne exit03

mov [rax],rcx // 6C bat = 0 tat = 1, +2C x y hp
mov [rax+8],rbx // float x float y
mov byte ptr [rax+10],3 // npc ?
mov [rax+18],rdi // rdi png
exit03:


cmp byte ptr [rcx+6C],00
jne exit02
cmp [rcx+28],40000000 // x ? npc
jne exit02
cmp [rcx+30],42820000 // sx ? npc
jne exit02
cmp [rcx+34],42820000 // s ? npc
jne exit02

mov [rax],rcx // 6C bat = 0 tat = 1, +2C x y hp
mov [rax+8],rbx // float x float y
mov byte ptr [rax+10],2 // npc ?
mov [rax+18],rdi // rdi png
exit02:







pop rax


exit:
jmp returnhere

"DiabloImmortal.exe"+6BB0A3:
//"DiabloImmortal.exe"+6BA9F3: cu
jmp newmem
nop
nop
nop
returnhere:

