<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="42">
  <CheatEntries>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Static values"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>0</ID>
          <Description>"Col"</Description>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>sao_hr.exe+B6BBE8</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>80</ID>
          <Description>"# of 3-SSC"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>sao_hr.exe+B168CC </Address>
        </CheatEntry>
        <CheatEntry>
          <ID>81</ID>
          <Description>"# of 5-SSC"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>sao_hr.exe+B168D8 </Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>5</ID>
      <Description>"Affection/friendship multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_friendship_multi,sao_hr.exe,66 89 0E 45 84 FF) // should be unique
alloc(newmem,$1000,INJECT_friendship_multi)

label(code)
label(return)
label(vf_friendship_multi)
label(last_friendship_1)
label(last_friendship_2)
label(last_friendship_3)
label(last_friendship_4)
label(last_friendship_index)


newmem:
  push rax
  push rbx
  push r15

  xor rbx, rbx
  mov bx, [rsi]

  xor rax, rax
  mov ax, cx
  cvtsi2ss xmm15, eax
  cvtsi2ss xmm14, ebx

  vucomiss xmm14, xmm15
  jae endp

  vmovss xmm13, [vf_friendship_multi]

  vsubss xmm12, xmm15, xmm14
  vmulss xmm13, xmm13, xmm12
  vaddss xmm15, xmm13, xmm14
  cvtss2si eax, xmm15
  mov cx, ax

  mov rbx, last_friendship_1
  mov r15d, [last_friendship_index]

  lea rax [rbx+r15d*8]
  mov [rax], rsi

  inc dword ptr [last_friendship_index]
  cmp dword ptr [last_friendship_index], 4
  jb endp
  mov dword ptr [last_friendship_index], 0

endp:
  pop r15
  pop rbx
  pop rax

code:
  mov [rsi],cx
  test r15l,r15l
  jmp return
align 10 cc
  vf_friendship_multi:
  dd (float)7.6
  last_friendship_1:
  dq 0
  last_friendship_2:
  dq 0
  last_friendship_3:
  dq 0
  last_friendship_4:
  dq 0
  last_friendship_index:
  dd 0

INJECT_friendship_multi:
  jmp newmem
  nop
return:
registersymbol(INJECT_friendship_multi)
registersymbol(vf_friendship_multi)
registersymbol(last_friendship_1)
registersymbol(last_friendship_2)
registersymbol(last_friendship_3)
registersymbol(last_friendship_4)
registersymbol(last_friendship_index)

[DISABLE]

INJECT_friendship_multi:
  db 66 89 0E 45 84 FF

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+2A0089

sao_hr.exe+2A006E: 41 0F 4F C6     - cmovg eax,r14d
sao_hr.exe+2A0072: 3B C1           - cmp eax,ecx
sao_hr.exe+2A0074: 0F 4C C8        - cmovl ecx,eax
sao_hr.exe+2A0077: EB 10           - jmp sao_hr.exe+2A0089
sao_hr.exe+2A0079: 44 3B F1        - cmp r14d,ecx
sao_hr.exe+2A007C: 41 0F 4F CE     - cmovg ecx,r14d
sao_hr.exe+2A0080: 8B C1           - mov eax,ecx
sao_hr.exe+2A0082: 8B CB           - mov ecx,ebx
sao_hr.exe+2A0084: 85 C0           - test eax,eax
sao_hr.exe+2A0086: 0F 48 C8        - cmovs ecx,eax
// ---------- INJECTING HERE ----------
sao_hr.exe+2A0089: 66 89 0E        - mov [rsi],cx
// ---------- DONE INJECTING  ----------
sao_hr.exe+2A008C: 45 84 FF        - test r15l,r15l
sao_hr.exe+2A008F: 74 35           - je sao_hr.exe+2A00C6
sao_hr.exe+2A0091: 48 85 FF        - test rdi,rdi
sao_hr.exe+2A0094: 74 4A           - je sao_hr.exe+2A00E0
sao_hr.exe+2A0096: 48 8B CF        - mov rcx,rdi
sao_hr.exe+2A0099: E8 92 42 00 00  - call sao_hr.exe+2A4330
sao_hr.exe+2A009E: 84 C0           - test al,al
sao_hr.exe+2A00A0: 75 3E           - jne sao_hr.exe+2A00E0
sao_hr.exe+2A00A2: B9 1A 00 00 00  - mov ecx,0000001A
sao_hr.exe+2A00A7: E8 14 2F F3 FF  - call sao_hr.exe+1D2FC0
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>6</ID>
          <Description>"Multiplier"</Description>
          <DropDownList DisplayValueAsItem="1">8:8
100:100
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_friendship_multi</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>10</ID>
          <Description>"Last contacted Affection #1"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>last_friendship_1</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>12</ID>
          <Description>"Last contacted Affection #2"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>last_friendship_2</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>11</ID>
          <Description>"Last contacted Affection #3"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>last_friendship_3</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>13</ID>
          <Description>"Last contacted Affection #4"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>last_friendship_4</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>73</ID>
      <Description>"Mood"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-17
  Author : bbfox@https://openbcheattables.com
}

[ENABLE]

aobscanmodule(INJECT_CUR_AFFECTION,sao_hr.exe,0F B7 11 33 C9) // should be unique
alloc(newmem,$1000,INJECT_CUR_AFFECTION)

label(code)
label(return)
label(i_base_aff_addr)

newmem:
  mov [i_base_aff_addr], rcx

code:
  movzx edx,word ptr [rcx]
  xor ecx,ecx
  jmp return
align 10 cc
  i_base_aff_addr:
  dq 0


INJECT_CUR_AFFECTION:
  jmp newmem
return:
registersymbol(INJECT_CUR_AFFECTION)
registersymbol(i_base_aff_addr)

[DISABLE]

INJECT_CUR_AFFECTION:
  db 0F B7 11 33 C9

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+29FD28

sao_hr.exe+29FD1A: CC              - int 3 
sao_hr.exe+29FD1B: CC              - int 3 
sao_hr.exe+29FD1C: CC              - int 3 
sao_hr.exe+29FD1D: CC              - int 3 
sao_hr.exe+29FD1E: CC              - int 3 
sao_hr.exe+29FD1F: CC              - int 3 
sao_hr.exe+29FD20: 48 85 C9        - test rcx,rcx
sao_hr.exe+29FD23: 75 03           - jne sao_hr.exe+29FD28
sao_hr.exe+29FD25: 32 C0           - xor al,al
sao_hr.exe+29FD27: C3              - ret 
// ---------- INJECTING HERE ----------
sao_hr.exe+29FD28: 0F B7 11        - movzx edx,word ptr [rcx]
// ---------- DONE INJECTING  ----------
sao_hr.exe+29FD2B: 33 C9           - xor ecx,ecx
sao_hr.exe+29FD2D: E9 2E FF FF FF  - jmp sao_hr.exe+29FC60
sao_hr.exe+29FD32: CC              - int 3 
sao_hr.exe+29FD33: CC              - int 3 
sao_hr.exe+29FD34: CC              - int 3 
sao_hr.exe+29FD35: CC              - int 3 
sao_hr.exe+29FD36: CC              - int 3 
sao_hr.exe+29FD37: CC              - int 3 
sao_hr.exe+29FD38: CC              - int 3 
sao_hr.exe+29FD39: CC              - int 3 
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>82</ID>
          <Description>"Available during mood action"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>74</ID>
          <Description>"Base addr."</Description>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>8 Bytes</VariableType>
          <Address>i_base_aff_addr</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>75</ID>
          <Description>"Affection (2700 = Max)"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_aff_addr</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>76</ID>
          <Description>"Love Effect Buff"</Description>
          <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Byte</VariableType>
          <Address>i_base_aff_addr</Address>
          <Offsets>
            <Offset>103</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>79</ID>
          <Description>"Source mood"</Description>
          <DropDownList DisplayValueAsItem="1">:Normal
1:Entertained
10:Excited
11:Happy
100:Connected
110:Playful
111:Blissful
1000:Intimate
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>Binary</VariableType>
          <BitStart>0</BitStart>
          <BitLength>4</BitLength>
          <ShowAsBinary>1</ShowAsBinary>
          <Address>sao_hr.exe+B97af0</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>77</ID>
          <Description>"Current mood"</Description>
          <DropDownListLink>Source mood</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Binary</VariableType>
          <BitStart>0</BitStart>
          <BitLength>4</BitLength>
          <ShowAsBinary>1</ShowAsBinary>
          <Address>i_base_aff_addr</Address>
          <Offsets>
            <Offset>10b</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>8</ID>
      <Description>"Player: min. Skill points"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SET_PLAYER_SKILLPOINTS,sao_hr.exe,0F B7 41 F4 48 8D 49 30) // should be unique
alloc(newmem,$1000,INJECT_SET_PLAYER_SKILLPOINTS)

label(code)
label(return)

newmem:
  push rax
  xor rax, rax
  mov ax, word ptr [rcx-0C]
  cmp ax, 4
  jae endp
  mov ax, 4
  mov word ptr [rcx-0C], ax

endp:
  pop rax

code:
  movzx eax,word ptr [rcx-0C]
  lea rcx,[rcx+30]
  jmp return


INJECT_SET_PLAYER_SKILLPOINTS:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_SET_PLAYER_SKILLPOINTS)

[DISABLE]

INJECT_SET_PLAYER_SKILLPOINTS:
  db 0F B7 41 F4 48 8D 49 30

unregistersymbol(INJECT_SET_PLAYER_SKILLPOINTS)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+1B4613

sao_hr.exe+1B45F2: 48 83 EC 20     - sub rsp,20
sao_hr.exe+1B45F6: 33 DB           - xor ebx,ebx
sao_hr.exe+1B45F8: E8 A3 FD 1A 00  - call sao_hr.exe+3643A0
sao_hr.exe+1B45FD: 44 8B C3        - mov r8d,ebx
sao_hr.exe+1B4600: 44 8B CB        - mov r9d,ebx
sao_hr.exe+1B4603: 44 8B D3        - mov r10d,ebx
sao_hr.exe+1B4606: 44 8D 5B 08     - lea r11d,[rbx+08]
sao_hr.exe+1B460A: 48 8D 48 10     - lea rcx,[rax+10]
sao_hr.exe+1B460E: 66 90           - nop 2
sao_hr.exe+1B4610: 0F B7 11        - movzx edx,word ptr [rcx]
// ---------- INJECTING HERE ----------
sao_hr.exe+1B4613: 0F B7 41 F4     - movzx eax,word ptr [rcx-0C]
// ---------- DONE INJECTING  ----------
sao_hr.exe+1B4617: 48 8D 49 30     - lea rcx,[rcx+30]
sao_hr.exe+1B461B: 44 03 D2        - add r10d,edx
sao_hr.exe+1B461E: 0F B7 51 DC     - movzx edx,word ptr [rcx-24]
sao_hr.exe+1B4622: 03 D8           - add ebx,eax
sao_hr.exe+1B4624: 44 03 CA        - add r9d,edx
sao_hr.exe+1B4627: 0F B7 51 E8     - movzx edx,word ptr [rcx-18]
sao_hr.exe+1B462B: 44 03 C2        - add r8d,edx
sao_hr.exe+1B462E: 49 FF CB        - dec r11
sao_hr.exe+1B4631: 75 DD           - jne sao_hr.exe+1B4610
sao_hr.exe+1B4633: 43 8D 04 08     - lea eax,[r8+r9]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>9</ID>
          <Description>"Usage: Open skills menu"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>15</ID>
      <Description>"Min. "use item"  / materials after use/pick up/crafting"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_USE_ITEM,sao_hr.exe,8B 43 04 48 8B 7C 24 30) // should be unique
alloc(newmem,$1000,INJECT_USE_ITEM)

label(code)
label(return)
label(i_min_use_item_count)

newmem:

code:
  mov eax,[rbx+04]

  //
  cmp eax, [i_min_use_item_count]
  jae @F
  mov eax, [i_min_use_item_count]
  mov [rbx+04], eax

  //
@@:
  mov rdi,[rsp+30]
  jmp return
align 10 cc
  i_min_use_item_count:
  dd 34


INJECT_USE_ITEM:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_USE_ITEM)
registersymbol(i_min_use_item_count)

[DISABLE]

INJECT_USE_ITEM:
  db 8B 43 04 48 8B 7C 24 30

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+3680DA

sao_hr.exe+3680BE: 85 C0           - test eax,eax
sao_hr.exe+3680C0: 78 18           - js sao_hr.exe+3680DA
sao_hr.exe+3680C2: 8D 47 FF        - lea eax,[rdi-01]
sao_hr.exe+3680C5: 83 F8 3B        - cmp eax,3B
sao_hr.exe+3680C8: 77 10           - ja sao_hr.exe+3680DA
sao_hr.exe+3680CA: B8 01 00 00 00  - mov eax,00000001
sao_hr.exe+3680CF: 48 8B 7C 24 30  - mov rdi,[rsp+30]
sao_hr.exe+3680D4: 48 83 C4 20     - add rsp,20
sao_hr.exe+3680D8: 5B              - pop rbx
sao_hr.exe+3680D9: C3              - ret 
// ---------- INJECTING HERE ----------
sao_hr.exe+3680DA: 8B 43 04        - mov eax,[rbx+04]
// ---------- DONE INJECTING  ----------
sao_hr.exe+3680DD: 48 8B 7C 24 30  - mov rdi,[rsp+30]
sao_hr.exe+3680E2: 48 83 C4 20     - add rsp,20
sao_hr.exe+3680E6: 5B              - pop rbx
sao_hr.exe+3680E7: C3              - ret 
sao_hr.exe+3680E8: 33 C0           - xor eax,eax
sao_hr.exe+3680EA: 48 83 C4 20     - add rsp,20
sao_hr.exe+3680EE: 5B              - pop rbx
sao_hr.exe+3680EF: C3              - ret 
sao_hr.exe+3680F0: 48 89 5C 24 20  - mov [rsp+20],rbx
sao_hr.exe+3680F5: 55              - push rbp
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>84</ID>
          <Description>"Min. count per action"</Description>
          <DropDownList DisplayValueAsItem="1">10:10
200:200
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>i_min_use_item_count</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>18</ID>
      <Description>"Battle: SP regen multiplier for all chars."</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SP_REGEN,sao_hr.exe,66 01 02 0F B7 02) // should be unique
alloc(newmem,$1000,INJECT_SP_REGEN)

label(code)
label(return)
label(vf_sp_regen_multi)

newmem:
  push rbx
  //mov bx, [rdx-4]
  //cmp bx, 4
  //jne endp

  xor rbx, rbx
  mov bx, ax
  cvtsi2ss xmm15, ebx
  vmovss xmm14, [vf_sp_regen_multi]
  vmulss xmm15, xmm15, xmm14
  cvtss2si ebx, xmm15
  mov ax, bx

endp:
  pop rbx

code:
  add [rdx],ax
  movzx eax,word ptr [rdx]
  jmp return
align 10 cc
  vf_sp_regen_multi:
  dd (float)25

INJECT_SP_REGEN:
  jmp newmem
  nop
return:
registersymbol(INJECT_SP_REGEN)
registersymbol(vf_sp_regen_multi)

[DISABLE]

INJECT_SP_REGEN:
  db 66 01 02 0F B7 02

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+272E3B

sao_hr.exe+272E17: F3 0F 11 42 08                 - movss [rdx+08],xmm0
sao_hr.exe+272E1C: 0F 57 C0                       - xorps xmm0,xmm0
sao_hr.exe+272E1F: 0F 2F D0                       - comiss xmm2,xmm0
sao_hr.exe+272E22: 76 17                          - jna sao_hr.exe+272E3B
sao_hr.exe+272E24: 0F BF 42 02                    - movsx eax,word ptr [rdx+02]
sao_hr.exe+272E28: 66 0F 6E C0                    - movd xmm0,eax
sao_hr.exe+272E2C: 0F 5B C0                       - cvtdq2ps xmm0,xmm0
sao_hr.exe+272E2F: F3 0F 59 C3                    - mulss xmm0,xmm3
sao_hr.exe+272E33: F3 0F 59 C2                    - mulss xmm0,xmm2
sao_hr.exe+272E37: F3 0F 2C C0                    - cvttss2si eax,xmm0
// ---------- INJECTING HERE ----------
sao_hr.exe+272E3B: 66 01 02                       - add [rdx],ax
// ---------- DONE INJECTING  ----------
sao_hr.exe+272E3E: 0F B7 02                       - movzx eax,word ptr [rdx]
sao_hr.exe+272E41: 66 39 42 02                    - cmp [rdx+02],ax
sao_hr.exe+272E45: 66 0F 4C 42 02                 - cmovl ax,[rdx+02]
sao_hr.exe+272E4A: 66 89 02                       - mov [rdx],ax
sao_hr.exe+272E4D: C3                             - ret 
sao_hr.exe+272E4E: CC                             - int 3 
sao_hr.exe+272E4F: CC                             - int 3 
sao_hr.exe+272E50: C7 05 06 7D 87 00 E6 03 E6 03  - mov [sao_hr.exe+AEAB60],03E603E6
sao_hr.exe+272E5A: C7 05 00 7D 87 00 E6 03 E6 03  - mov [sao_hr.exe+AEAB64],03E603E6
sao_hr.exe+272E64: C3                             - ret 
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>19</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_sp_regen_multi</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>50</ID>
      <Description>"Battle: Weapon professionally XP multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SKILL_PT_MULTI,sao_hr.exe,03 D7 45 33 FF) // should be unique
alloc(newmem,$1000,INJECT_SKILL_PT_MULTI)

label(code)
label(return)
label(vf_skill_pt_multi)

newmem:
  vmovss xmm14, [vf_skill_pt_multi]
  cvtsi2ss xmm15, edi
  vmulss xmm15, xmm15, xmm14
  cvtss2si edi, xmm15

code:
  add edx,edi
  xor r15d,r15d
  jmp return
align 10 cc
  vf_skill_pt_multi:
  dd (float)10.5

INJECT_SKILL_PT_MULTI:
  jmp newmem
return:
registersymbol(INJECT_SKILL_PT_MULTI)
registersymbol(vf_skill_pt_multi)

[DISABLE]

INJECT_SKILL_PT_MULTI:
  db 03 D7 45 33 FF

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+1B259D

sao_hr.exe+1B256D: E8 4E FF FF FF        - call sao_hr.exe+1B24C0
sao_hr.exe+1B2572: 48 85 C0              - test rax,rax
sao_hr.exe+1B2575: 0F 84 C1 00 00 00     - je sao_hr.exe+1B263C
sao_hr.exe+1B257B: 44 0F B7 40 02        - movzx r8d,word ptr [rax+02]
sao_hr.exe+1B2580: B9 10 27 00 00        - mov ecx,00002710
sao_hr.exe+1B2585: 66 41 3B C8           - cmp cx,r8w
sao_hr.exe+1B2589: 0F 86 AD 00 00 00     - jbe sao_hr.exe+1B263C
sao_hr.exe+1B258F: 41 0F B7 D0           - movzx edx,r8w
sao_hr.exe+1B2593: 48 89 6C 24 40        - mov [rsp+40],rbp
sao_hr.exe+1B2598: 4C 89 7C 24 20        - mov [rsp+20],r15
// ---------- INJECTING HERE ----------
sao_hr.exe+1B259D: 03 D7                 - add edx,edi
// ---------- DONE INJECTING  ----------
sao_hr.exe+1B259F: 45 33 FF              - xor r15d,r15d
sao_hr.exe+1B25A2: 3B D1                 - cmp edx,ecx
sao_hr.exe+1B25A4: 7F 08                 - jg sao_hr.exe+1B25AE
sao_hr.exe+1B25A6: 8B CA                 - mov ecx,edx
sao_hr.exe+1B25A8: 85 D2                 - test edx,edx
sao_hr.exe+1B25AA: 41 0F 48 CF           - cmovs ecx,r15d
sao_hr.exe+1B25AE: 44 39 3D 7B 03 92 00  - cmp [sao_hr.exe+AD2930],r15d
sao_hr.exe+1B25B5: 66 89 48 02           - mov [rax+02],cx
sao_hr.exe+1B25B9: 41 8B EF              - mov ebp,r15d
sao_hr.exe+1B25BC: 41 8B FF              - mov edi,r15d
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>51</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_skill_pt_multi</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>21</ID>
      <Description>"Battle: skill mastery multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SKILL_MASTERY_MULTI,sao_hr.exe,44 03 C6 45 85 C0) // should be unique
alloc(newmem,$1000,INJECT_SKILL_MASTERY_MULTI)

label(code)
label(return)
label(vf_skill_mastery_multi)
label(i_base_skill_mastery_addr_1)
label(i_base_skill_mastery_addr_2)
label(i_base_skill_mastery_addr_3)
label(i_base_skill_mastery_addr_4)
label(i_base_skill_mastery_addr_index)

newmem:
  cvtsi2ss xmm15, esi
  vmovss xmm14, [vf_skill_mastery_multi]
  vmulss xmm15, xmm15, xmm14
  cvtss2si esi, xmm15

  push r15
  push r14


  mov r15, i_base_skill_mastery_addr_1
  mov r14d, [i_base_skill_mastery_addr_index]

  lea r15, [r15+r14d*8]
  mov [r15], rax
  inc dword ptr [i_base_skill_mastery_addr_index]
  cmp dword ptr [i_base_skill_mastery_addr_index], 4
  jb @F
  mov dword ptr [i_base_skill_mastery_addr_index], 0

@@:

endp:
  pop r14
  pop r15


code:
  add r8d,esi
  test r8d,r8d
  jmp return
align 10 cc
  vf_skill_mastery_multi:
  dd (float)10.2
  align 8 cc
  i_base_skill_mastery_addr_1:
  dq 0
  i_base_skill_mastery_addr_2:
  dq 0
  i_base_skill_mastery_addr_3:
  dq 0
  i_base_skill_mastery_addr_4:
  dq 0
  i_base_skill_mastery_addr_index:
  dd 0

INJECT_SKILL_MASTERY_MULTI:
  jmp newmem
  nop
return:
registersymbol(INJECT_SKILL_MASTERY_MULTI)
registersymbol(vf_skill_mastery_multi)
registersymbol(i_base_skill_mastery_addr_1)
registersymbol(i_base_skill_mastery_addr_2)
registersymbol(i_base_skill_mastery_addr_3)
registersymbol(i_base_skill_mastery_addr_4)
registersymbol(i_base_skill_mastery_addr_index)

[DISABLE]

INJECT_SKILL_MASTERY_MULTI:
  db 44 03 C6 45 85 C0

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+1B2722

sao_hr.exe+1B26F8: 44 0F B7 80 82 31 00 00  - movzx r8d,word ptr [rax+00003182]
sao_hr.exe+1B2700: 48 8D 88 80 01 00 00     - lea rcx,[rax+00000180]
sao_hr.exe+1B2707: 8B D7                    - mov edx,edi
sao_hr.exe+1B2709: E8 02 FC FF FF           - call sao_hr.exe+1B2310
sao_hr.exe+1B270E: 48 8B D8                 - mov rbx,rax
sao_hr.exe+1B2711: 48 85 C0                 - test rax,rax
sao_hr.exe+1B2714: 74 5B                    - je sao_hr.exe+1B2771
sao_hr.exe+1B2716: 44 0F B7 40 08           - movzx r8d,word ptr [rax+08]
sao_hr.exe+1B271B: 33 D2                    - xor edx,edx
sao_hr.exe+1B271D: B9 50 C3 00 00           - mov ecx,0000C350
// ---------- INJECTING HERE ----------
sao_hr.exe+1B2722: 44 03 C6                 - add r8d,esi
// ---------- DONE INJECTING  ----------
sao_hr.exe+1B2725: 45 85 C0                 - test r8d,r8d
sao_hr.exe+1B2728: 41 0F 4F D0              - cmovg edx,r8d
sao_hr.exe+1B272C: 44 8B 05 E5 01 92 00     - mov r8d,[sao_hr.exe+AD2918]
sao_hr.exe+1B2733: 3B D1                    - cmp edx,ecx
sao_hr.exe+1B2735: 66 0F 4C CA              - cmovl cx,dx
sao_hr.exe+1B2739: 8B D7                    - mov edx,edi
sao_hr.exe+1B273B: 66 89 48 08              - mov [rax+08],cx
sao_hr.exe+1B273F: 48 8B 0D CA 01 92 00     - mov rcx,[sao_hr.exe+AD2910]
sao_hr.exe+1B2746: E8 E5 FC FF FF           - call sao_hr.exe+1B2430
sao_hr.exe+1B274B: 48 85 C0                 - test rax,rax
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>22</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_skill_mastery_multi</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>23</ID>
          <Description>"Last skill mastery #1"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_skill_mastery_addr_1</Address>
          <Offsets>
            <Offset>8</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>24</ID>
          <Description>"Last skill mastery #2"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_skill_mastery_addr_2</Address>
          <Offsets>
            <Offset>8</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>25</ID>
          <Description>"Last skill mastery #3"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_skill_mastery_addr_3</Address>
          <Offsets>
            <Offset>8</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>26</ID>
          <Description>"Last skill mastery #4"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_skill_mastery_addr_4</Address>
          <Offsets>
            <Offset>8</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>39</ID>
      <Description>"Battle: EXP multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_EXP_MULTI,sao_hr.exe,41 03 1E 8D 42 FF) // should be unique
alloc(newmem,$1000,INJECT_EXP_MULTI)

label(code)
label(return)
label(vf_exp_multi)

newmem:
  push rax
  mov eax, [r14]
  cvtsi2ss xmm15, eax
  vmovss xmm14, [vf_exp_multi]
  vmulss xmm15, xmm15, xmm14
  cvtss2si eax, xmm15
  mov [r14], eax
  pop rax


code:
  add ebx,[r14]
  lea eax,[rdx-01]
  jmp return
align 10 cc
  vf_exp_multi:
  dd (float)1.12

INJECT_EXP_MULTI:
  jmp newmem
  nop
return:
registersymbol(INJECT_EXP_MULTI)
registersymbol(vf_exp_multi)

[DISABLE]

INJECT_EXP_MULTI:
  db 41 03 1E 8D 42 FF

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+26A824

sao_hr.exe+26A7FC: 3D E8 03 00 00        - cmp eax,000003E8
sao_hr.exe+26A801: 48 8B 05 30 03 88 00  - mov rax,[sao_hr.exe+AEAB38]
sao_hr.exe+26A808: 7C 06                 - jl sao_hr.exe+26A810
sao_hr.exe+26A80A: 0F BF 48 1E           - movsx ecx,word ptr [rax+1E]
sao_hr.exe+26A80E: EB 04                 - jmp sao_hr.exe+26A814
sao_hr.exe+26A810: 0F BF 48 1C           - movsx ecx,word ptr [rax+1C]
sao_hr.exe+26A814: 8B 17                 - mov edx,[rdi]
sao_hr.exe+26A816: 3B CA                 - cmp ecx,edx
sao_hr.exe+26A818: 0F 8E A7 00 00 00     - jng sao_hr.exe+26A8C5
sao_hr.exe+26A81E: 8B 0D 28 03 88 00     - mov ecx,[sao_hr.exe+AEAB4C]
// ---------- INJECTING HERE ----------
sao_hr.exe+26A824: 41 03 1E              - add ebx,[r14]
// ---------- DONE INJECTING  ----------
sao_hr.exe+26A827: 8D 42 FF              - lea eax,[rdx-01]
sao_hr.exe+26A82A: 3B C8                 - cmp ecx,eax
sao_hr.exe+26A82C: 7F 03                 - jg sao_hr.exe+26A831
sao_hr.exe+26A82E: 8D 41 FF              - lea eax,[rcx-01]
sao_hr.exe+26A831: 48 63 C8              - movsxd  rcx,eax
sao_hr.exe+26A834: 48 8B 05 E5 02 88 00  - mov rax,[sao_hr.exe+AEAB20]
sao_hr.exe+26A83B: 44 8B 04 88           - mov r8d,[rax+rcx*4]
sao_hr.exe+26A83F: 44 3B C3              - cmp r8d,ebx
sao_hr.exe+26A842: 7F 7E                 - jg sao_hr.exe+26A8C2
sao_hr.exe+26A844: 40 B6 01              - mov sil,01
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>40</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_exp_multi</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>41</ID>
      <Description>"Battle: HP regen multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_HP_REGEN,sao_hr.exe,44 03 C2 79 07 C7) // should be unique
alloc(newmem,$1000,INJECT_HP_REGEN)

label(code)
label(return)
label(vf_hp_regen_multi)

newmem:
  pushf

  cmp byte ptr [rcx+1F3], #60
  je endp
  cmp word ptr [rcx+C], 0
  je endp
  cmp word ptr [rcx+12], 0
  je endp
  cmp dword ptr [rcx+4], C8
  jbe endp

  cvtsi2ss xmm15, edx
  vmovss xmm14, [vf_hp_regen_multi]
  vmulss xmm15, xmm14, xmm15
  cvtss2si edx, xmm15

endp:
  popf

code:
  add r8d,edx
  reassemble(INJECT_HP_REGEN+3)
  //jns sao_hr.exe+26A8EF
  jmp return
align 10 cc
  vf_hp_regen_multi:
  dd (float)5

INJECT_HP_REGEN:
  jmp newmem
return:
registersymbol(INJECT_HP_REGEN)
registersymbol(vf_hp_regen_multi)

[DISABLE]

INJECT_HP_REGEN:
  db 44 03 C2 79 07

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+26A8E3

sao_hr.exe+26A8C2: 41 89 1E           - mov [r14],ebx
sao_hr.exe+26A8C5: 48 8B 5C 24 38     - mov rbx,[rsp+38]
sao_hr.exe+26A8CA: 48 8B 7C 24 40     - mov rdi,[rsp+40]
sao_hr.exe+26A8CF: 40 0F B6 C6        - movzx eax,sil
sao_hr.exe+26A8D3: 48 8B 74 24 30     - mov rsi,[rsp+30]
sao_hr.exe+26A8D8: 48 83 C4 20        - add rsp,20
sao_hr.exe+26A8DC: 41 5E              - pop r14
sao_hr.exe+26A8DE: C3                 - ret 
sao_hr.exe+26A8DF: CC                 - int 3 
sao_hr.exe+26A8E0: 44 8B 01           - mov r8d,[rcx]
// ---------- INJECTING HERE ----------
sao_hr.exe+26A8E3: 44 03 C2           - add r8d,edx
// ---------- DONE INJECTING  ----------
sao_hr.exe+26A8E6: 79 07              - jns sao_hr.exe+26A8EF
sao_hr.exe+26A8E8: C7 01 00 00 00 00  - mov [rcx],00000000
sao_hr.exe+26A8EE: C3                 - ret 
sao_hr.exe+26A8EF: 44 39 41 04        - cmp [rcx+04],r8d
sao_hr.exe+26A8F3: 44 0F 4C 41 04     - cmovl r8d,[rcx+04]
sao_hr.exe+26A8F8: 44 89 01           - mov [rcx],r8d
sao_hr.exe+26A8FB: C3                 - ret 
sao_hr.exe+26A8FC: CC                 - int 3 
sao_hr.exe+26A8FD: CC                 - int 3 
sao_hr.exe+26A8FE: CC                 - int 3 
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>42</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_hp_regen_multi</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>48</ID>
      <Description>"Battle: Try to keep min. HP for player"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_INF_HP,sao_hr.exe,44 89 01 C3 CC) // should be unique
alloc(newmem,$1000,INJECT_INF_HP)

label(code)
label(return)
label(vf_hp_min_factor)
label(i_base_player_hp_addr)

newmem:
  cmp byte ptr [rcx+1F3], #60
  je endp0
  cmp dword ptr [rcx+1DC], 1
  jne endp0
  cmp word ptr [rcx+C], 0
  je endp0
  cmp word ptr [rcx+12], 0
  je endp0
  cmp dword ptr [rcx+4], C8
  jbe endp0

  mov [i_base_player_hp_addr], rcx

  push rax
  vmovss xmm14, [vf_hp_min_factor]
  mov eax, [rcx+4]
  cvtsi2ss xmm15, eax
  cvtsi2ss xmm13, r8d
  vmulss xmm15, xmm15, xmm14
  vucomiss xmm13, xmm15
  jae endp
  cvtss2si r8d, xmm15

endp:
  pop rax


endp0:

code:
  mov [rcx],r8d
  ret 
  int 3 
  jmp return
align 10 cc
  i_base_player_hp_addr:
  dq 0
  vf_hp_min_factor:
  dd (float)0.5


INJECT_INF_HP:
  jmp newmem
return:
registersymbol(INJECT_INF_HP)
registersymbol(vf_hp_min_factor)
registersymbol(i_base_player_hp_addr)

[DISABLE]

INJECT_INF_HP:
  db 44 89 01 C3 CC

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+26A8F8

sao_hr.exe+26A8D8: 48 83 C4 20        - add rsp,20
sao_hr.exe+26A8DC: 41 5E              - pop r14
sao_hr.exe+26A8DE: C3                 - ret 
sao_hr.exe+26A8DF: CC                 - int 3 
sao_hr.exe+26A8E0: 44 8B 01           - mov r8d,[rcx]
INJECT_HP_REGEN: E9 18 57 D2 FF     - jmp 13FF90000
sao_hr.exe+26A8E8: C7 01 00 00 00 00  - mov [rcx],00000000
sao_hr.exe+26A8EE: C3                 - ret 
sao_hr.exe+26A8EF: 44 39 41 04        - cmp [rcx+04],r8d
sao_hr.exe+26A8F3: 44 0F 4C 41 04     - cmovl r8d,[rcx+04]
// ---------- INJECTING HERE ----------
sao_hr.exe+26A8F8: 44 89 01           - mov [rcx],r8d
// ---------- DONE INJECTING  ----------
sao_hr.exe+26A8FB: C3                 - ret 
sao_hr.exe+26A8FC: CC                 - int 3 
sao_hr.exe+26A8FD: CC                 - int 3 
sao_hr.exe+26A8FE: CC                 - int 3 
sao_hr.exe+26A8FF: CC                 - int 3 
sao_hr.exe+26A900: 83 C1 32           - add ecx,32
sao_hr.exe+26A903: 45 85 C0           - test r8d,r8d
sao_hr.exe+26A906: 0F 88 C4 D0 F1 FF  - js sao_hr.exe+1879D0
sao_hr.exe+26A90C: E9 CF D0 F1 FF     - jmp sao_hr.exe+1879E0
sao_hr.exe+26A911: CC                 - int 3 
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>102</ID>
          <Description>"Base addr"</Description>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>8 Bytes</VariableType>
          <Address>i_base_player_hp_addr</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>46</ID>
          <Description>"Not god mode"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>49</ID>
          <Description>"HP keep Factor (compared to max HP)"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_hp_min_factor</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>101</ID>
          <Description>"inf. HP for player"</Description>
          <Options moHideChildren="1"/>
          <Color>FF0000</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-18
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_GOD_MODE,sao_hr.exe,39 01 0F 9E C0) // should be unique
alloc(newmem,$1000,INJECT_GOD_MODE)

label(code)
label(return)
label(is_party_hp_full)

newmem:
  db EB 3B 54 68 69 73 20 74 61 62 6C 65 20 63 6F 6D
  db 65 73 20 66 72 6F 6D 20 68 74 74 70
  db 73 3A 2F 2F 6F 70 65 6E 63 68 65 61 74 74 61 62
  db 6C 65 73 2E 63 6F 6D 20
  db 2F 20 43 45 20 37 2E 34 2B

  push r15

  mov r15, [i_base_player_hp_addr]
  cmp r15, rcx

  jne chk2
  mov r15d, [rcx+4]
  mov [rcx], r15d

  mov r15d, [rcx+218]
  mov [i_player_mark_value], r15d
  jmp endp

chk2:
  cmp dword ptr [is_party_hp_full], 1
  jne endp
  mov r15d, [rcx+218]
  cmp r15d, [i_player_mark_value]
  jne endp
  mov r15d, [rcx+4]
  mov [rcx], r15d

endp:
  pop r15

code:
  cmp [rcx],eax
  setle al
  jmp return
align 10 cc
  i_player_mark_value:
  dd 0
  is_party_hp_full:
  dd 0

INJECT_GOD_MODE:
  jmp newmem
return:
registersymbol(INJECT_GOD_MODE)
registersymbol(is_party_hp_full)

[DISABLE]

INJECT_GOD_MODE:
  db 39 01 0F 9E C0

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+2729B2

sao_hr.exe+272992: E8 29 06 F6 FF        - call sao_hr.exe+1D2FC0
sao_hr.exe+272997: 48 89 05 A2 81 87 00  - mov [sao_hr.exe+AEAB40],rax
sao_hr.exe+27299E: 48 8D 4C 24 30        - lea rcx,[rsp+30]
sao_hr.exe+2729A3: E8 F8 5D 43 00        - call sao_hr.exe+6A87A0
sao_hr.exe+2729A8: 48 83 C4 78           - add rsp,78
sao_hr.exe+2729AC: C3                    - ret 
sao_hr.exe+2729AD: CC                    - int 3 
sao_hr.exe+2729AE: CC                    - int 3 
sao_hr.exe+2729AF: CC                    - int 3 
sao_hr.exe+2729B0: 33 C0                 - xor eax,eax
// ---------- INJECTING HERE ----------
sao_hr.exe+2729B2: 39 01                 - cmp [rcx],eax
// ---------- DONE INJECTING  ----------
sao_hr.exe+2729B4: 0F 9E C0              - setle al
sao_hr.exe+2729B7: C3                    - ret 
sao_hr.exe+2729B8: CC                    - int 3 
sao_hr.exe+2729B9: CC                    - int 3 
sao_hr.exe+2729BA: CC                    - int 3 
sao_hr.exe+2729BB: CC                    - int 3 
sao_hr.exe+2729BC: CC                    - int 3 
sao_hr.exe+2729BD: CC                    - int 3 
sao_hr.exe+2729BE: CC                    - int 3 
sao_hr.exe+2729BF: CC                    - int 3 
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>103</ID>
              <Description>"inf. HP for party?"</Description>
              <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>is_party_hp_full</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>59</ID>
          <Description>"Stats+"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>58</ID>
              <Description>"LV"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>2 Bytes</VariableType>
              <Address>i_base_player_hp_addr</Address>
              <Offsets>
                <Offset>C</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>57</ID>
              <Description>"EXP"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_player_hp_addr</Address>
              <Offsets>
                <Offset>8</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>56</ID>
              <Description>"Current HP"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_player_hp_addr</Address>
              <Offsets>
                <Offset>0</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>61</ID>
              <Description>"Max HP"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>808080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_player_hp_addr</Address>
              <Offsets>
                <Offset>4</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>60</ID>
              <Description>"Current SP"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>2 Bytes</VariableType>
              <Address>i_base_player_hp_addr</Address>
              <Offsets>
                <Offset>10</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>55</ID>
      <Description>"Battle: Fast command cooldown"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_FAST_COOLDOWN,sao_hr.exe,F3 0F 10 16 0F 28 DE) // should be unique
alloc(newmem,$1000,INJECT_FAST_COOLDOWN)

label(code)
label(return)

newmem:
  vmovss xmm14, [vf_max_cooldown]
  vmovss xmm15, [rsi]
  vucomiss xmm15, xmm14
  jbe code
  vmovss [rsi], xmm14

code:
  movss xmm2,[rsi]
  movaps xmm3,xmm6
  jmp return
align 10 cc
  vf_max_cooldown:
  dd (float)60

INJECT_FAST_COOLDOWN:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_FAST_COOLDOWN)

[DISABLE]

INJECT_FAST_COOLDOWN:
  db F3 0F 10 16 0F 28 DE

unregistersymbol(INJECT_FAST_COOLDOWN)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+3E6AF5

sao_hr.exe+3E6AD1: F3 0F 10 76 04              - movss xmm6,[rsi+04]
sao_hr.exe+3E6AD6: EB 1D                       - jmp sao_hr.exe+3E6AF5
sao_hr.exe+3E6AD8: 0F BF 10                    - movsx edx,word ptr [rax]
sao_hr.exe+3E6ADB: 0F B6 48 02                 - movzx ecx,byte ptr [rax+02]
sao_hr.exe+3E6ADF: 41 83 C8 FF                 - or r8d,-01
sao_hr.exe+3E6AE3: E8 58 0D F8 FF              - call sao_hr.exe+367840
sao_hr.exe+3E6AE8: 48 85 C0                    - test rax,rax
sao_hr.exe+3E6AEB: 74 08                       - je sao_hr.exe+3E6AF5
sao_hr.exe+3E6AED: 66 0F 6E 70 2C              - movd xmm6,[rax+2C]
sao_hr.exe+3E6AF2: 0F 5B F6                    - cvtdq2ps xmm6,xmm6
// ---------- INJECTING HERE ----------
sao_hr.exe+3E6AF5: F3 0F 10 16                 - movss xmm2,[rsi]
// ---------- DONE INJECTING  ----------
sao_hr.exe+3E6AF9: 0F 28 DE                    - movaps xmm3,xmm6
sao_hr.exe+3E6AFC: 8B D5                       - mov edx,ebp
sao_hr.exe+3E6AFE: 48 8B CB                    - mov rcx,rbx
sao_hr.exe+3E6B01: E8 4A F1 FF FF              - call sao_hr.exe+3E5C50
sao_hr.exe+3E6B06: 33 D2                       - xor edx,edx
sao_hr.exe+3E6B08: 41 C6 84 1E 24 03 00 00 01  - mov byte ptr [r14+rbx+00000324],01
sao_hr.exe+3E6B11: 38 93 38 03 00 00           - cmp [rbx+00000338],dl
sao_hr.exe+3E6B17: 74 23                       - je sao_hr.exe+3E6B3C
sao_hr.exe+3E6B19: F3 0F 10 06                 - movss xmm0,[rsi]
sao_hr.exe+3E6B1D: 41 0F BF 07                 - movsx eax,word ptr [r15]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>72</ID>
      <Description>"Battle: Slow chain countdown"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-17
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SLOW_CHAIN_COUNTDOWN,sao_hr.exe,F3 0F 5C C8 0F 2F F1 F3 0F 11 8F 24) // should be unique
alloc(newmem,$1000,INJECT_SLOW_CHAIN_COUNTDOWN)

label(code)
label(return)
label(vf_chain_slow_speed)

newmem:
  vmovss xmm15, [vf_chain_slow_speed]
  vdivss xmm0, xmm0, xmm15

code:
  subss xmm1,xmm0
  comiss xmm6,xmm1
  jmp return
align 10 cc
  vf_chain_slow_speed:
  dd (float)3.33333

INJECT_SLOW_CHAIN_COUNTDOWN:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_SLOW_CHAIN_COUNTDOWN)
registersymbol(vf_chain_slow_speed)

[DISABLE]

INJECT_SLOW_CHAIN_COUNTDOWN:
  db F3 0F 5C C8 0F 2F F1

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+209C6E

sao_hr.exe+209C44: E8 27 04 F8 FF           - call sao_hr.exe+18A070
sao_hr.exe+209C49: 84 C0                    - test al,al
sao_hr.exe+209C4B: 75 3E                    - jne sao_hr.exe+209C8B
sao_hr.exe+209C4D: 38 87 9D F8 00 00        - cmp [rdi+0000F89D],al
sao_hr.exe+209C53: 75 36                    - jne sao_hr.exe+209C8B
sao_hr.exe+209C55: 83 BF 20 F8 00 00 00     - cmp dword ptr [rdi+0000F820],00
sao_hr.exe+209C5C: 76 2D                    - jna sao_hr.exe+209C8B
sao_hr.exe+209C5E: 48 8B CF                 - mov rcx,rdi
sao_hr.exe+209C61: E8 2A C4 FD FF           - call sao_hr.exe+1E6090
sao_hr.exe+209C66: F3 0F 10 8F 24 F8 00 00  - movss xmm1,[rdi+0000F824]
// ---------- INJECTING HERE ----------
sao_hr.exe+209C6E: F3 0F 5C C8              - subss xmm1,xmm0
// ---------- DONE INJECTING  ----------
sao_hr.exe+209C72: 0F 2F F1                 - comiss xmm6,xmm1
sao_hr.exe+209C75: F3 0F 11 8F 24 F8 00 00  - movss [rdi+0000F824],xmm1
sao_hr.exe+209C7D: 72 0C                    - jb sao_hr.exe+209C8B
sao_hr.exe+209C7F: 48 8B 07                 - mov rax,[rdi]
sao_hr.exe+209C82: 48 8B CF                 - mov rcx,rdi
sao_hr.exe+209C85: FF 90 38 08 00 00        - call qword ptr [rax+00000838]
sao_hr.exe+209C8B: 48 8B CF                 - mov rcx,rdi
sao_hr.exe+209C8E: E8 3D BD FD FF           - call sao_hr.exe+1E59D0
sao_hr.exe+209C93: 80 BF C1 F8 00 00 00     - cmp byte ptr [rdi+0000F8C1],00
sao_hr.exe+209C9A: 0F 28 B4 24 A0 00 00 00  - movaps xmm6,[rsp+000000A0]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>83</ID>
          <Description>"Slow speed"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_chain_slow_speed</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>69</ID>
      <Description>"Battle: Chain multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-17
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_CHAIN_MULTI,sao_hr.exe,41 8D 40 01 B9 E7 03 00 00) // should be unique
alloc(newmem,$1000,INJECT_CHAIN_MULTI)

label(code)
label(return)
label(vf_battle_chain_multi)

newmem:
  mov eax, [rdx+0000F820]
  cvtsi2ss xmm15, eax
  lea eax,[r8+01]
  cvtsi2ss xmm14, eax

  vucomiss xmm15, xmm14
  jae code

  vmovss xmm13, [vf_battle_chain_multi]
  vsubss xmm14, xmm14, xmm15
  vmulss xmm14, xmm14, xmm13
  vaddss xmm14, xmm15, xmm14

  cvtss2si eax, xmm14
  jmp code1


code:
  lea eax,[r8+01]

code1:
  mov ecx,000003E7
  jmp return
align 10 cc
  vf_battle_chain_multi:
  dd (float)2.25


INJECT_CHAIN_MULTI:
  jmp newmem
  nop 4
return:
registersymbol(INJECT_CHAIN_MULTI)
registersymbol(vf_battle_chain_multi)

[DISABLE]

INJECT_CHAIN_MULTI:
  db 41 8D 40 01 B9 E7 03 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+200381

sao_hr.exe+200348: 41 8B CA                 - mov ecx,r10d
sao_hr.exe+20034B: F3 48 0F 2A C8           - cvtsi2ss xmm1,rax
sao_hr.exe+200350: F3 0F 59 4C CB 04        - mulss xmm1,[rbx+rcx*8+04]
sao_hr.exe+200356: F3 0F 5C C1              - subss xmm0,xmm1
sao_hr.exe+20035A: F3 0F 11 82 24 F8 00 00  - movss [rdx+0000F824],xmm0
sao_hr.exe+200362: F3 0F 10 82 24 F8 00 00  - movss xmm0,[rdx+0000F824]
sao_hr.exe+20036A: 48 8B 1C 24              - mov rbx,[rsp]
sao_hr.exe+20036E: 0F C6 C0 00              - shufps xmm0,xmm0,00
sao_hr.exe+200372: 0F 5F 05 17 B5 60 00     - maxps xmm0,[sao_hr.exe+80B890]
sao_hr.exe+200379: F3 0F 11 82 24 F8 00 00  - movss [rdx+0000F824],xmm0
// ---------- INJECTING HERE ----------
sao_hr.exe+200381: 41 8D 40 01              - lea eax,[r8+01]
// ---------- DONE INJECTING  ----------
sao_hr.exe+200385: B9 E7 03 00 00           - mov ecx,000003E7
sao_hr.exe+20038A: 3B C1                    - cmp eax,ecx
sao_hr.exe+20038C: 0F 47 C1                 - cmova eax,ecx
sao_hr.exe+20038F: 89 82 20 F8 00 00        - mov [rdx+0000F820],eax
sao_hr.exe+200395: 48 83 C4 08              - add rsp,08
sao_hr.exe+200399: C3                       - ret 
sao_hr.exe+20039A: CC                       - int 3 
sao_hr.exe+20039B: CC                       - int 3 
sao_hr.exe+20039C: CC                       - int 3 
sao_hr.exe+20039D: CC                       - int 3 
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>70</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_battle_chain_multi</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>64</ID>
      <Description>"Recast time speed up multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-17
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SHORT_RECAST_TIME,sao_hr.exe,F3 0F 11 07 76 44) // should be unique
alloc(newmem,$1000,INJECT_SHORT_RECAST_TIME)

label(code)
label(return)
label(vf_recast_time_multi)

newmem:
  pushf
  vpxor xmm15, xmm15, xmm15
  vcomiss xmm0, xmm15
  jbe endp

  vmovss xmm15, [rdi]
  vcomiss xmm15, xmm0
  jb endp

  vsubss xmm14, xmm15, xmm0
  vmovss xmm13, [vf_recast_time_multi]
  vmulss xmm14, xmm14, xmm13
  vsubss xmm0, xmm15, xmm14

endp:
  popf

code:
  movss [rdi],xmm0
  jna sao_hr.exe+20E5B5
  jmp return
align 10 cc
  vf_recast_time_multi:
  dd (float)7.5


INJECT_SHORT_RECAST_TIME:
  jmp newmem
  nop
return:
registersymbol(INJECT_SHORT_RECAST_TIME)
registersymbol(vf_recast_time_multi)

[DISABLE]

INJECT_SHORT_RECAST_TIME:
  db F3 0F 11 07 76 44

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+20E56B

sao_hr.exe+20E545: 48 89 6C 24 50     - mov [rsp+50],rbp
sao_hr.exe+20E54A: 48 89 7C 24 58     - mov [rsp+58],rdi
sao_hr.exe+20E54F: 0F 29 7C 24 20     - movaps [rsp+20],xmm7
sao_hr.exe+20E554: 0F 57 FF           - xorps xmm7,xmm7
sao_hr.exe+20E557: 8D 6B 01           - lea ebp,[rbx+01]
sao_hr.exe+20E55A: 48 8D 79 04        - lea rdi,[rcx+04]
sao_hr.exe+20E55E: 66 90              - nop 2
sao_hr.exe+20E560: F3 0F 10 07        - movss xmm0,[rdi]
sao_hr.exe+20E564: F3 0F 5C C6        - subss xmm0,xmm6
sao_hr.exe+20E568: 0F 2F F8           - comiss xmm7,xmm0
// ---------- INJECTING HERE ----------
sao_hr.exe+20E56B: F3 0F 11 07        - movss [rdi],xmm0
// ---------- DONE INJECTING  ----------
sao_hr.exe+20E56F: 76 44              - jna sao_hr.exe+20E5B5
sao_hr.exe+20E571: 8B 86 00 06 00 00  - mov eax,[rsi+00000600]
sao_hr.exe+20E577: 2B C3              - sub eax,ebx
sao_hr.exe+20E579: FF C8              - dec eax
sao_hr.exe+20E57B: 85 C0              - test eax,eax
sao_hr.exe+20E57D: 7E 26              - jle sao_hr.exe+20E5A5
sao_hr.exe+20E57F: 48 98              - cdqe 
sao_hr.exe+20E581: 4C 8D 04 40        - lea r8,[rax+rax*2]
sao_hr.exe+20E585: 48 63 C5           - movsxd  rax,ebp
sao_hr.exe+20E588: 48 8D 0C 40        - lea rcx,[rax+rax*2]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>65</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_recast_time_multi</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>87</ID>
      <Description>"Blacksmith XP multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : sao_hr.exe
  Version: 
  Date   : 2022-10-18
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_BLACKSMITH_EXP_MULTI,sao_hr.exe,03 D8 B8 9C 63 00 00) // should be unique
alloc(newmem,$1000,INJECT_BLACKSMITH_EXP_MULTI)

label(code)
label(return)
label(vf_blacksmith_exp_multi)
label(i_base_blacksmith_exp_addr)

newmem:
  mov [i_base_blacksmith_exp_addr], rcx

  cvtsi2ss xmm15, eax
  vmovss xmm14, [vf_blacksmith_exp_multi]
  vmulss xmm15, xmm15, xmm14
  vcvtss2si eax, xmm15

code:
  add ebx,eax
  mov eax,0000639C
  jmp return
align 10 cc
  vf_blacksmith_exp_multi:
  dd (float)2.5
  i_base_blacksmith_exp_addr:
  dq 0


INJECT_BLACKSMITH_EXP_MULTI:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_BLACKSMITH_EXP_MULTI)
registersymbol(vf_blacksmith_exp_multi)
registersymbol(i_base_blacksmith_exp_addr)

[DISABLE]

INJECT_BLACKSMITH_EXP_MULTI:
  db 03 D8 B8 9C 63 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: sao_hr.exe+184C96

sao_hr.exe+184C7D: CC                       - int 3 
sao_hr.exe+184C7E: CC                       - int 3 
sao_hr.exe+184C7F: CC                       - int 3 
sao_hr.exe+184C80: 48 85 C9                 - test rcx,rcx
sao_hr.exe+184C83: 74 53                    - je sao_hr.exe+184CD8
sao_hr.exe+184C85: 57                       - push rdi
sao_hr.exe+184C86: 48 83 EC 20              - sub rsp,20
sao_hr.exe+184C8A: 48 89 5C 24 30           - mov [rsp+30],rbx
sao_hr.exe+184C8F: 0F B7 59 04              - movzx ebx,word ptr [rcx+04]
sao_hr.exe+184C93: 0F BF C2                 - movsx eax,dx
// ---------- INJECTING HERE ----------
sao_hr.exe+184C96: 03 D8                    - add ebx,eax
// ---------- DONE INJECTING  ----------
sao_hr.exe+184C98: B8 9C 63 00 00           - mov eax,0000639C
sao_hr.exe+184C9D: 48 8B F9                 - mov rdi,rcx
sao_hr.exe+184CA0: 3B D8                    - cmp ebx,eax
sao_hr.exe+184CA2: 0F 4F D8                 - cmovg ebx,eax
sao_hr.exe+184CA5: 66 0F 6E C3              - movd xmm0,ebx
sao_hr.exe+184CA9: 0F 5B C0                 - cvtdq2ps xmm0,xmm0
sao_hr.exe+184CAC: F3 0F 5E 05 A0 EF 67 00  - divss xmm0,[sao_hr.exe+803C54]
sao_hr.exe+184CB4: E8 EB 5E 56 00           - call sao_hr.exe+6EABA4
sao_hr.exe+184CB9: B9 FF 00 00 00           - mov ecx,000000FF
sao_hr.exe+184CBE: 66 89 5F 04              - mov [rdi+04],bx
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>86</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>vf_blacksmith_exp_multi</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>88</ID>
          <Description>"EXP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_blacksmith_exp_addr</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>62</ID>
      <Description>"Sword Art Online: Hollow Realization Deluxe Edition  /  https://opencheattables.com  /  CE 7.4+"</Description>
      <Color>400080</Color>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <LuaScript>function onMemRecPostExecute(memoryrecord, newState, succeeded )
    if memoryrecord.Type == vtAutoAssembler and memoryrecord.Script:find("NO_ACTIVATE") and newState and succeeded then
        memoryrecord.disableWithoutExecute()
    end
end


IDs = {82, 9, 74, 84, 19, 51, 22, 40, 42, 102, 46, 49, 103, 61, 83, 70, 65, 86,
       }

function contains(table, val)
   local i = 0
   for i=1, #table do
      if table[i] == val then
         return true
      end
   end
   return false
end


function onMemRecPreExecute(memoryrecord, newstate)
    if contains(IDs, memoryrecord.ID) and newstate then
	    memoryrecord.OnActivate = function(memoryrecord, before, currentstate)
		    return false
	    end
    end
end
</LuaScript>
</CheatTable>
