alloc(newmem,4048,"DiabloImmortal.exe"+D19AD8)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
// 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:

cmp byte ptr [rcx+00000111],00

jmp returnhere

"DiabloImmortal.exe"+D19AD8:
jmp newmem
nop
nop
returnhere:

