//alloc(newmem,2048,"DiabloImmortal.exe"+1207B66)
alloc(newmem,2048,"DiabloImmortal.exe"+121F886)

label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
movdqu xmm1,[rdx]
movdqu xmm2,[rdx+r8-10]
//movdqu [rcx],xmm1
//movdqu [rcx+r8-10],xmm2
// rdx+0 = color hex
// rdx+7 = text

push rax // address
mov rax,newmem+500 // address 0x0 value vtmem

// #8c774a
cmp [rdx+0],37633823 // Elder Rift + Westmarch + Challenge Rift
jne exit01
cmp [rdx+3],61343737 // Elder Rift + Westmarch + Challenge Rift
jne exit01
mov [rax+8*20],1
mov [rax+8*21],rdx
exit01:

cmp [rdx+7],6C6C694B // Kill the Rift Guardian
jne exit02
cmp [rdx+15],72617547 // Kill the Rift Guardian
jne exit02
mov [rax+8*0],2
mov [rax+8*1],rdx
exit02:

cmp [rdx+7],65766E49 // Inventory Full
jne exit03
cmp [rdx+11],6C6C7546 // Inventory Full
jne exit03
mov [rax+8*10],3
mov [rax+8*11],rdx
exit03:

cmp [rdx+0],61306223 // Opening the Helliquary
jne exit04
cmp [rdx+3],39323261 // Opening the Helliquary
jne exit04
mov [rax+8*30],4
mov [rax+8*31],rdx
exit04:

cmp [rdx+0],37666123 // Quest BESIEGED
jne exit05
cmp [rdx+3],36343537 // Quest BESIEGED
jne exit05
mov [rax+8*40],5
mov [rax+8*41],rdx
exit05:

cmp [rdx+0],37666123 // Quest BESIEGED
jne exit07
cmp [rdx+3],36343537 // Quest BESIEGED
jne exit07
mov [rax+8*40],5
mov [rax+8*41],rdx
exit07:


cmp [rdx+0],6976614E // Navigation Paused
jne exit06
cmp [rdx+B],73756150 // Navigation Paused
jne exit06
mov [rax+8*50],6
mov [rax+8*51],rdx
exit06:



pop rax


exit:
jmp returnhere


//"DiabloImmortal.exe"+1207B66:
"DiabloImmortal.exe"+121F886:



jmp newmem
nop
nop
nop
nop
nop
nop
returnhere:

