alloc(newmem,2048,"DiabloImmortal.exe"+748302) 
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:


// new 2
// test byte ptr [rdi+00000208],20 = bat 00 = tat
// byte ptr [rdi+158],3F > 0F tat fog

//[rdi+270] = float X LEFT+UP 511
//[rdi+274] = float Y LEFT+UP 510

//[rdi+2B8] = float X RIGHT+DOWN 677
//[rdi+2BC] = float Y RIGHT+DOWN 383

//[rdi+218] = float 572
//[rdi+78] = float (float)0.42


// new 3

// byte ptr [r14+18],3F > 0F tat fog
// byte ptr [r14+38],1F = bat 00 tat
// byte ptr [r14+50],40 = bat

//x RIGHT [r14-10] float 685 autoit 655
//y DOWN [r14-C] float 508  autoit 75
//x LEFT [r14-8] float 559 autoit 585
//y_max [r14-4] float 382 autoit 10




// mov eax,[rdi+28]
cmp qword ptr [r14+18],10
// cmp qword ptr [r14+18],10
// mov ecx,eax
// mov rax,[rsi]
//mov r15,[rax+rcx*8]
// mov rax,[r15]
// mov rbp,[rax+00000130]

//jb 7FF6FFDA8333 > ja no fog hoac mov rcx,[r14] > nop no fog








push rax // address
mov rax,newmem+500 // address 0x0 value vtmem +500 ko du > +1000


// xoa fog byte ptr [rdi+158] = 3F > 0F
cmp rdi,0 // address check
je if01
cmp byte ptr [r14+18],3F // 425+20
jne if01
cmp byte ptr [r14+38],1F
jne if01
cmp byte ptr [r14+50],40
jne if01
cmp [rax+0],0 // 425+20
jne if01
//mov byte ptr [r14+18],0F
mov [rax+0],r14
mov [rax+0],r14
if01:


// xoa fog byte ptr [rdi+158] = 3F > 0F
cmp rdi,0 // address check
je if03
//cmp byte ptr [r14+18],0F // 425+20
//jne if03
cmp byte ptr [r14+38],1F
jne if03
cmp byte ptr [r14+50],40
jne if03
// --- KIEM TRA TRUC X ---
cmp dword ptr [r14-10],(float)655  // x RIGHT > 685 - 30
jb if03
cmp dword ptr [r14-10],(float)715  // x RIGHT < 685 + 30
ja if03
// --- KIEM TRA TRUC Y ---
cmp dword ptr [r14-C],(float)478  // y DOWN > 508 - 30
jb if03
cmp dword ptr [r14-C],(float)538 // y DOWN < 508 + 30
ja if03
//mov byte ptr [r14+18],0F
mov byte ptr [r14+38],00
mov [rax+0],r14
mov [rax+0],r14
if03:


//x RIGHT [r14-10] float 685 autoit 655
//y DOWN [r14-C] float 508  autoit 75
//x LEFT [r14-8] float 559 autoit 585
//y_max [r14-4] float 382 autoit 10




pop rax










exit:
jmp returnhere

"DiabloImmortal.exe"+748302:
jmp newmem
returnhere:




