alloc(newmem,4048,"DiabloImmortal.exe"+D19B2A)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
// cmp byte ptr [rcx+00000111],00  > bytes ngan len xuong dong khac
// je 7FF7F7399B2A >

movsxd  r9,dword ptr [rcx+000000FC]
// mov r10,[rcx+000000E0]
// lea rax,[r9+r9*8]
// lea r15,[r10+rax*8]

// rcx+54 = x float
// rcx+5C = y float
// rcx+108 = tan cong <> 0
// rcx+111 = di chuyen = 0 dung yen = 1
// rdi+111 = tan cong = 1 dung = 0

push rax // address
mov rax,newmem+500 // address 0x0 value vtmem

cmp byte ptr [rcx+111],0
jne exit01
cmp byte ptr [rcx+112],1
jne exit01
//cmp [rcx+108],00000000
//je exit01

//mov [rax],rbx
mov [rax+8],rcx
//mov [rax+10],rdx
//mov [rax+18],rsi
//mov [rax+20],rdi
//mov [rax+28],rbp
//mov [rax+30],rsp

exit01:
pop rax

exit:
jmp returnhere

"DiabloImmortal.exe"+D19B2A:
jmp newmem
nop
nop
returnhere:

