<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="46">
  <CheatEntries>
    <CheatEntry>
      <ID>110</ID>
      <Description>"Toggle Compact View"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end

if not toggleCompactView then
    function toggleCompactView(sender, forceEnable)
        local isCompactMode = not (compactViewMenuItem.Caption == 'Compact View Mode')
        if forceEnable ~= nil then
            isCompactMode = not forceEnable
        end

        synchronize(function()
            compactViewMenuItem.Caption = isCompactMode and 'Compact View Mode' or 'Full View Mode'
            getMainForm().Splitter1.Visible = isCompactMode
            getMainForm().Panel4.Visible    = isCompactMode
            getMainForm().Panel5.Visible    = isCompactMode
        end)
    end
end

if not createCompactViewMenu then
    function createCompactViewMenu()
        if isCompactMenuCreated then return end

        synchronize(function()
            local mainMenu = getMainForm().Menu.Items
            compactViewMenuItem = createMenuItem(mainMenu)
            compactViewMenuItem.Caption = 'Compact View Mode'
            compactViewMenuItem.OnClick = toggleCompactView
            mainMenu.add(compactViewMenuItem)
        end)

        isCompactMenuCreated = true
    end
end

createCompactViewMenu()
toggleCompactView(nil, true)

[DISABLE]
{$lua}
if toggleCompactView then
    toggleCompactView(nil, false)
end
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>48</ID>
      <Description>"正體中文 / English switch"</Description>
      <Color>008000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if memrec then print(memrec.Description) end
getLuaEngine().menuItem5.doClick()
--getMemoryRecordByDescription
getAddressList().getMemoryRecordByID(4).Description = '戰鬥：HP/MP/CP (受攻擊時)'
getAddressList().getMemoryRecordByID(6).Description = '角色HP'
getAddressList().getMemoryRecordByID(8).Description = '恢復EP?'
getAddressList().getMemoryRecordByID(9).Description = '恢復CP?'
getAddressList().getMemoryRecordByID(26).Description = '戰鬥：恢復HP (和上方二選一)'
getAddressList().getMemoryRecordByID(14).Description = '施法後滿EP'
getAddressList().getMemoryRecordByID(18).Description = '施法後滿CP'
getAddressList().getMemoryRecordByID(16).Description = '戰技後滿CP'
getAddressList().getMemoryRecordByID(24).Description = '戰鬥：傷害倍率'
getAddressList().getMemoryRecordByID(25).Description = '對敵人傷害倍率'
getAddressList().getMemoryRecordByID(27).Description = '受攻擊減傷倍率'
getAddressList().getMemoryRecordByID(20).Description = '最小耀晶石數量 (使用：開啟選單'
getAddressList().getMemoryRecordByID(29).Description = '最小值'
getAddressList().getMemoryRecordByID(22).Description = '道具數最少50 (原本數量要&gt;=2; 使用：開啟逐一道具頁面 / 讀檔)'
getAddressList().getMemoryRecordByID(42).Description = 'DP'
getAddressList().getMemoryRecordByID(43).Description = '目前DP (打開搜查手冊)'
getAddressList().getMemoryRecordByID(44).Description = '任務完成時額外的DP'
getAddressList().getMemoryRecordByID(28).Description = '精簡模式'
getAddressList().getMemoryRecordByID(91).Description = '角色狀態檢視'
getLuaEngine().Close()
[DISABLE]
{$lua}
if syntaxcheck then return end
if memrec then print(memrec.Description) end
getLuaEngine().menuItem5.doClick()

getAddressList().getMemoryRecordByID(4).Description = 'Battle: HP/EP/CP (when get hit)'
getAddressList().getMemoryRecordByID(6).Description = 'Player HP'
getAddressList().getMemoryRecordByID(8).Description = 'Full EP?'
getAddressList().getMemoryRecordByID(9).Description = 'Full CP?'
getAddressList().getMemoryRecordByID(26).Description = 'Battle: HP always full (choose one; method 2)'
getAddressList().getMemoryRecordByID(14).Description = 'Battle: when cast: full EP'
getAddressList().getMemoryRecordByID(18).Description = 'Battle: when cast: full CP'
getAddressList().getMemoryRecordByID(16).Description = 'Battle: when use CP: full CP'
getAddressList().getMemoryRecordByID(24).Description = 'Battle: Damage multiplier'
getAddressList().getMemoryRecordByID(25).Description = 'Multiplier to emeny'
getAddressList().getMemoryRecordByID(27).Description = 'Divisor to player'
getAddressList().getMemoryRecordByID(20).Description = 'Min. Sepith (active: open item menu)'
getAddressList().getMemoryRecordByID(29).Description = 'Min. value'
getAddressList().getMemoryRecordByID(22).Description = 'Min. item 50 (count must &gt;= 2; to use: select tab in item menu / load save)'
getAddressList().getMemoryRecordByID(42).Description = 'DP'
getAddressList().getMemoryRecordByID(43).Description = 'Cur. DP (Open DP menu)'
getAddressList().getMemoryRecordByID(44).Description = 'Extra DP for each quest'
getAddressList().getMemoryRecordByID(28).Description = 'Compact Mode'
getAddressList().getMemoryRecordByID(91).Description = 'Char. status viewer'
getLuaEngine().Close()


</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>4</ID>
      <Description>"Battle: HP/EP/CP (when get hit)"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_BATTLE,$process,44 89 82 78 02 00 00) // should be unique
alloc(newmem,$1000,INJECT_BATTLE)

label(code)
label(return)
label(is_set_hp)
label(set_hp_option)
label(vf_hp_divisor)
label(is_set_cp)
label(is_full_mp)
label(is_set_enemy_hp)
label(set_enemy_hp_option)
label(vf_hp_multi)

newmem:
  cmp dword ptr [rdx+000002A0], 0 // team seq id.
  je to_enemy
  cmp dword ptr [rdx+00000268], C8 // max CP
  jne to_enemy
  cmp dword ptr [rdx+0000029C], C8 // max CP
  jne to_enemy
  cmp word ptr [rdx+0000027E], 0 // max mp
  je to_enemy
  cmp dword ptr [is_set_hp], 1
  jne check_mp
  cmp dword ptr [set_hp_option], 0
  je check_mp
  cmp dword ptr [set_hp_option], 1
  je hp_full
  cmp dword ptr [set_hp_option], 2
  je hp_low_pt
  jmp check_mp


hp_full:
  mov r8d, [rdx+00000274]
  mov [rdx+00000278],r8d
  jmp check_mp

hp_low_pt:
  mov r8d, 10
  jmp check_mp

check_mp:
  cmp dword ptr [is_full_mp], 1
  jne check_cp
  push rax
  mov ax, [rdx+0000027E]
  mov [rdx+00000280], ax
  pop rax
  jmp check_cp

check_cp:
  cmp dword ptr [is_set_cp], 1
  jne code
  mov word ptr [rdx+00000282], C8
  jmp code

to_enemy:
  cmp dword ptr [is_set_enemy_hp], 1
  jne code
  cmp dword ptr [set_enemy_hp_option], 2
  jne check_enemy_hp_1hk


check_enemy_hp_full:
  cmp dword ptr [is_set_enemy_hp], 1
  jne check_enemy_hp_1hk
  mov r8d, [rdx+00000274]
  jmp code

check_enemy_hp_1hk:
  cmp dword ptr [is_set_enemy_hp], 2
  jne code
  mov r8d, 0

code:
  mov [rdx+00000278],r8d
  jmp return

align 10 cc
  is_set_hp:
  dd 1
  set_hp_option: // 0: Normal, 1: Full, 2:low HP
  dd 0
  vf_hp_divisor:
  dd (float)2
  is_set_cp:
  dd 1
  is_full_mp:
  dd 1
  is_set_enemy_hp: //Set damage to enemy?
  dd 0
  set_enemy_hp_option: // 0: Normal, 1:full, 2: 1hk
  dd 0
  vf_hp_multi: //Dagame to enemy multiplier
  dd (float)1.2


INJECT_BATTLE:
  jmp newmem
  nop 2
return:

registersymbol(is_set_hp)
registersymbol(set_hp_option)
registersymbol(vf_hp_divisor)
registersymbol(is_set_cp)
registersymbol(is_full_mp)
registersymbol(is_set_enemy_hp)
registersymbol(set_enemy_hp_option)
registersymbol(vf_hp_multi)
registersymbol(INJECT_BATTLE)

[DISABLE]

INJECT_BATTLE:
  db 44 89 82 78 02 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+193765

ed72_steam.exe+193741: 48 83 EC 20           - sub rsp,20
ed72_steam.exe+193745: 44 8B 8A 78 02 00 00  - mov r9d,[rdx+00000278]
ed72_steam.exe+19374C: 45 8B F0              - mov r14d,r8d
ed72_steam.exe+19374F: 41 8B C1              - mov eax,r9d
ed72_steam.exe+193752: 48 8B F2              - mov rsi,rdx
ed72_steam.exe+193755: 41 2B C0              - sub eax,r8d
ed72_steam.exe+193758: 48 8B E9              - mov rbp,rcx
ed72_steam.exe+19375B: 45 33 C0              - xor r8d,r8d
ed72_steam.exe+19375E: 45 3B CE              - cmp r9d,r14d
ed72_steam.exe+193761: 44 0F 47 C0           - cmova r8d,eax
// ---------- INJECTING HERE ----------
ed72_steam.exe+193765: 44 89 82 78 02 00 00  - mov [rdx+00000278],r8d
// ---------- DONE INJECTING  ----------
ed72_steam.exe+19376C: F6 42 04 08           - test byte ptr [rdx+04],08
ed72_steam.exe+193770: 74 19                 - je ed72_steam.exe+19378B
ed72_steam.exe+193772: B8 CD CC CC CC        - mov eax,CCCCCCCD
ed72_steam.exe+193777: F7 A2 74 02 00 00     - mul [rdx+00000274]
ed72_steam.exe+19377D: C1 EA 03              - shr edx,03
ed72_steam.exe+193780: 44 3B C2              - cmp r8d,edx
ed72_steam.exe+193783: 73 06                 - jae ed72_steam.exe+19378B
ed72_steam.exe+193785: 89 96 78 02 00 00     - mov [rsi+00000278],edx
ed72_steam.exe+19378B: 45 8B C6              - mov r8d,r14d
ed72_steam.exe+19378E: 48 8B D6              - mov rdx,rsi
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>6</ID>
          <Description>"Player HP"</Description>
          <DropDownList DisplayValueAsItem="1">0:Normal
1:Full
2:Low HP
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>set_hp_option</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Full EP?"</Description>
          <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_full_mp</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>9</ID>
          <Description>"Full CP?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_set_cp</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>26</ID>
      <Description>"Battle: HP always full (choose one; method 2)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_PARTY_HP,$process,8B 82 78 02 00 00 0F 57 C9 0F 57 D2) // should be unique
alloc(newmem,$1000,INJECT_PARTY_HP)

label(code)
label(return)

newmem:

  cmp dword ptr [rdx+00000268], #200 // max CP
  jne code
  cmp word ptr [rdx+0000027E], 0 // max mp
  je code
  cmp word ptr [rdx+000002A0], 0 // team seq id.
  je code

  mov eax,[rdx+00000274]
  mov [rdx+00000278], eax

code:
  mov eax,[rdx+00000278]
  jmp return

INJECT_PARTY_HP:
  jmp newmem
  nop
return:
registersymbol(INJECT_PARTY_HP)

[DISABLE]

INJECT_PARTY_HP:
  db 8B 82 78 02 00 00

unregistersymbol(INJECT_PARTY_HP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+1B0D4B

ed72_steam.exe+1B0D22: F7 82 A4 02 00 00 00 80 00 80  - test [rdx+000002A4],80008000
ed72_steam.exe+1B0D2C: 48 8D 8A B0 02 00 00           - lea rcx,[rdx+000002B0]
ed72_steam.exe+1B0D33: 74 16                          - je ed72_steam.exe+1B0D4B
ed72_steam.exe+1B0D35: 41 8B C6                       - mov eax,r14d
ed72_steam.exe+1B0D38: F7 01 00 80 00 80              - test [rcx],80008000
ed72_steam.exe+1B0D3E: 75 3E                          - jne ed72_steam.exe+1B0D7E
ed72_steam.exe+1B0D40: FF C0                          - inc eax
ed72_steam.exe+1B0D42: 48 83 C1 20                    - add rcx,20
ed72_steam.exe+1B0D46: 83 F8 21                       - cmp eax,21
ed72_steam.exe+1B0D49: 7C ED                          - jl ed72_steam.exe+1B0D38
// ---------- INJECTING HERE ----------
ed72_steam.exe+1B0D4B: 8B 82 78 02 00 00              - mov eax,[rdx+00000278]
// ---------- DONE INJECTING  ----------
ed72_steam.exe+1B0D51: 0F 57 C9                       - xorps xmm1,xmm1
ed72_steam.exe+1B0D54: 0F 57 D2                       - xorps xmm2,xmm2
ed72_steam.exe+1B0D57: F3 48 0F 2A D0                 - cvtsi2ss xmm2,rax
ed72_steam.exe+1B0D5C: 8B 82 74 02 00 00              - mov eax,[rdx+00000274]
ed72_steam.exe+1B0D62: F3 48 0F 2A C8                 - cvtsi2ss xmm1,rax
ed72_steam.exe+1B0D67: 0F 28 C1                       - movaps xmm0,xmm1
ed72_steam.exe+1B0D6A: F3 0F 59 05 A2 4D 2C 00        - mulss xmm0,[ed72_steam.exe+475B14]
ed72_steam.exe+1B0D72: 0F 2F C2                       - comiss xmm0,xmm2
ed72_steam.exe+1B0D75: 76 13                          - jna ed72_steam.exe+1B0D8A
ed72_steam.exe+1B0D77: B9 02 00 00 00                 - mov ecx,00000002
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>14</ID>
      <Description>"Battle: when cast: full EP"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_FULL_EP,$process,66 89 8B 80 02 00 00 66 85) // should be unique
alloc(newmem,$1000,INJECT_FULL_EP)

label(code)
label(return)

newmem:
  mov cx,[rbx+0000027E]

code:
  mov [rbx+00000280],cx
  jmp return

INJECT_FULL_EP:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_FULL_EP)

[DISABLE]

INJECT_FULL_EP:
  db 66 89 8B 80 02 00 00

unregistersymbol(INJECT_FULL_EP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+1999BF

ed72_steam.exe+19999B: 75 08                 - jne ed72_steam.exe+1999A5
ed72_steam.exe+19999D: 0F B7 12              - movzx edx,word ptr [rdx]
ed72_steam.exe+1999A0: E8 9B 4C 0B 00        - call ed72_steam.exe+24E640
ed72_steam.exe+1999A5: 0F B7 BB 80 02 00 00  - movzx edi,word ptr [rbx+00000280]
ed72_steam.exe+1999AC: 33 D2                 - xor edx,edx
ed72_steam.exe+1999AE: 0F B7 CF              - movzx ecx,di
ed72_steam.exe+1999B1: 66 2B C8              - sub cx,ax
ed72_steam.exe+1999B4: 3B F8                 - cmp edi,eax
ed72_steam.exe+1999B6: B8 00 40 00 00        - mov eax,00004000
ed72_steam.exe+1999BB: 66 0F 4C CA           - cmovl cx,dx
// ---------- INJECTING HERE ----------
ed72_steam.exe+1999BF: 66 89 8B 80 02 00 00  - mov [rbx+00000280],cx
// ---------- DONE INJECTING  ----------
ed72_steam.exe+1999C6: 66 85 43 02           - test [rbx+02],ax
ed72_steam.exe+1999CA: 0F 84 A6 00 00 00     - je ed72_steam.exe+199A76
ed72_steam.exe+1999D0: 0F B7 03              - movzx eax,word ptr [rbx]
ed72_steam.exe+1999D3: 0F 57 D2              - xorps xmm2,xmm2
ed72_steam.exe+1999D6: 0F B7 93 7E 02 00 00  - movzx edx,word ptr [rbx+0000027E]
ed72_steam.exe+1999DD: 0F 57 C9              - xorps xmm1,xmm1
ed72_steam.exe+1999E0: 4C 69 C0 38 02 00 00  - imul r8,rax,00000238
ed72_steam.exe+1999E7: F3 48 0F 2A CF        - cvtsi2ss xmm1,rdi
ed72_steam.exe+1999EC: 0F B7 C9              - movzx ecx,cx
ed72_steam.exe+1999EF: F3 48 0F 2A D1        - cvtsi2ss xmm2,rcx
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>18</ID>
      <Description>"Battle: when cast: full CP"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript Async="1">{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_FULL_CP2,$process,66 89 8A 82 02 00 00) // should be unique
alloc(newmem,$1000,INJECT_FULL_CP2)


label(code)
label(return)

newmem:
  cmp dword ptr [rdx+0000027E], 0
  je code
  cmp dword ptr [rdx+0000029C], C8
  jne code
  cmp dword ptr [rdx+00000268], C8
  jne code

  mov cx, C8

code:
  mov [rdx+00000282],cx
  jmp return

INJECT_FULL_CP2:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_FULL_CP2)

[DISABLE]

INJECT_FULL_CP2:
  db 66 89 8A 82 02 00 00

unregistersymbol(INJECT_FULL_CP2)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+199B75

ed72_steam.exe+199B47: 83 F8 62                 - cmp eax,62
ed72_steam.exe+199B4A: 7C 09                    - jl ed72_steam.exe+199B55
ed72_steam.exe+199B4C: 41 B8 62 00 00 00        - mov r8d,00000062
ed72_steam.exe+199B52: 44 2B C1                 - sub r8d,ecx
ed72_steam.exe+199B55: 0F B7 82 9C 02 00 00     - movzx eax,word ptr [rdx+0000029C]
ed72_steam.exe+199B5C: 48 89 B4 24 A8 00 00 00  - mov [rsp+000000A8],rsi
ed72_steam.exe+199B64: 0F B7 B2 82 02 00 00     - movzx esi,word ptr [rdx+00000282]
ed72_steam.exe+199B6B: 42 8D 0C 06              - lea ecx,[rsi+r8]
ed72_steam.exe+199B6F: 3B C8                    - cmp ecx,eax
ed72_steam.exe+199B71: 66 0F 4D C8              - cmovge cx,ax
// ---------- INJECTING HERE ----------
ed72_steam.exe+199B75: 66 89 8A 82 02 00 00     - mov [rdx+00000282],cx
// ---------- DONE INJECTING  ----------
ed72_steam.exe+199B7C: 0F B7 42 02              - movzx eax,word ptr [rdx+02]
ed72_steam.exe+199B80: BA 00 40 00 00           - mov edx,00004000
ed72_steam.exe+199B85: 66 85 C2                 - test dx,ax
ed72_steam.exe+199B88: 0F 84 C2 00 00 00        - je ed72_steam.exe+199C50
ed72_steam.exe+199B8E: F7 D0                    - not eax
ed72_steam.exe+199B90: 0F BA E0 0D              - bt eax,0D
ed72_steam.exe+199B94: 0F 83 B6 00 00 00        - jae ed72_steam.exe+199C50
ed72_steam.exe+199B9A: 0F B7 93 9C 02 00 00     - movzx edx,word ptr [rbx+0000029C]
ed72_steam.exe+199BA1: 0F 57 D2                 - xorps xmm2,xmm2
ed72_steam.exe+199BA4: 0F B7 03                 - movzx eax,word ptr [rbx]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>16</ID>
      <Description>"Battle: when use CP: full CP"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_BATTLE_CP,$process,66 89 82 82 02 00 00) // should be unique
alloc(newmem,$1000,INJECT_BATTLE_CP)

label(code)
label(return)

newmem:
  mov ax, C8

code:
  mov [rdx+00000282],ax
  jmp return

INJECT_BATTLE_CP:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_BATTLE_CP)

[DISABLE]

INJECT_BATTLE_CP:
  db 66 89 82 82 02 00 00

unregistersymbol(INJECT_BATTLE_CP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+199D6A

ed72_steam.exe+199D42: 4C 89 6C 24 60        - mov [rsp+60],r13
ed72_steam.exe+199D47: 0F B7 C7              - movzx eax,di
ed72_steam.exe+199D4A: 66 41 2B C0           - sub ax,r8w
ed72_steam.exe+199D4E: 4C 89 74 24 28        - mov [rsp+28],r14
ed72_steam.exe+199D53: 45 33 F6              - xor r14d,r14d
ed72_steam.exe+199D56: B9 00 40 00 00        - mov ecx,00004000
ed72_steam.exe+199D5B: 41 3B F8              - cmp edi,r8d
ed72_steam.exe+199D5E: 45 0F B6 E9           - movzx r13d,r9l
ed72_steam.exe+199D62: 48 8B DA              - mov rbx,rdx
ed72_steam.exe+199D65: 66 41 0F 4C C6        - cmovl ax,r14w
// ---------- INJECTING HERE ----------
ed72_steam.exe+199D6A: 66 89 82 82 02 00 00  - mov [rdx+00000282],ax
// ---------- DONE INJECTING  ----------
ed72_steam.exe+199D71: 66 85 4A 02           - test [rdx+02],cx
ed72_steam.exe+199D75: 0F 84 5B 01 00 00     - je ed72_steam.exe+199ED6
ed72_steam.exe+199D7B: 0F B7 C8              - movzx ecx,ax
ed72_steam.exe+199D7E: 0F 57 D2              - xorps xmm2,xmm2
ed72_steam.exe+199D81: 0F B7 02              - movzx eax,word ptr [rdx]
ed72_steam.exe+199D84: 0F 57 C9              - xorps xmm1,xmm1
ed72_steam.exe+199D87: 48 69 D0 38 02 00 00  - imul rdx,rax,00000238
ed72_steam.exe+199D8E: F3 48 0F 2A D1        - cvtsi2ss xmm2,rcx
ed72_steam.exe+199D93: 48 89 6C 24 50        - mov [rsp+50],rbp
ed72_steam.exe+199D98: B8 1F 85 EB 51        - mov eax,51EB851F
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>24</ID>
      <Description>"Battle: Damage multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_DAMAGE_MULTI,$process,45 8B C1 45 8B E9) // should be unique
alloc(newmem,$1000,INJECT_DAMAGE_MULTI)

label(code)
label(return)
label(vf_damage_mul)
label(vf_damage_div)

newmem:
  cmp dword ptr [rdx+00000268], C8 // max CP
  jne to_enemy
  cmp word ptr [rdx+0000027E], 0 // max mp
  je to_enemy
  cmp dword ptr [rdx+000002A0], 0 // team seq id.
  je to_enemy

  vmovss xmm14, [vf_damage_div]
  cvtsi2ss xmm15, r9d
  vdivss xmm13, xmm15, xmm14
  cvtss2si r9d, xmm13
  jmp code

to_enemy: // damage to enemy
  vmovss xmm14, [vf_damage_mul]
  cvtsi2ss xmm15, r9d
  vmulss xmm13, xmm14, xmm15
  cvtss2si r9d, xmm13

code:
  mov r8d,r9d
  mov r13d,r9d
  jmp return

align 10 cc
  vf_damage_mul:
  dd (float)1.8
  vf_damage_div:
  dd (float)1.3333333

INJECT_DAMAGE_MULTI:
  jmp newmem
  nop
return:
registersymbol(vf_damage_div)
registersymbol(vf_damage_mul)
registersymbol(INJECT_DAMAGE_MULTI)

[DISABLE]

INJECT_DAMAGE_MULTI:
  db 45 8B C1 45 8B E9

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+1603CA

ed72_steam.exe+1603AA: 48 89 74 24 18              - mov [rsp+18],rsi
ed72_steam.exe+1603AF: 44 89 4C 24 20              - mov [rsp+20],r9d
ed72_steam.exe+1603B4: 57                          - push rdi
ed72_steam.exe+1603B5: 41 54                       - push r12
ed72_steam.exe+1603B7: 41 55                       - push r13
ed72_steam.exe+1603B9: 41 56                       - push r14
ed72_steam.exe+1603BB: 41 57                       - push r15
ed72_steam.exe+1603BD: 48 83 EC 30                 - sub rsp,30
ed72_steam.exe+1603C1: 4D 8B F8                    - mov r15,r8
ed72_steam.exe+1603C4: 44 0F 29 44 24 20           - movaps [rsp+20],xmm8
// ---------- INJECTING HERE ----------
ed72_steam.exe+1603CA: 45 8B C1                    - mov r8d,r9d
// ---------- DONE INJECTING  ----------
ed72_steam.exe+1603CD: 45 8B E9                    - mov r13d,r9d
ed72_steam.exe+1603D0: 48 8B FA                    - mov rdi,rdx
ed72_steam.exe+1603D3: 48 8B D9                    - mov rbx,rcx
ed72_steam.exe+1603D6: E8 35 68 FF FF              - call ed72_steam.exe+156C10
ed72_steam.exe+1603DB: 48 8B AF 30 02 00 00        - mov rbp,[rdi+00000230]
ed72_steam.exe+1603E2: 45 33 E4                    - xor r12d,r12d
ed72_steam.exe+1603E5: F3 44 0F 10 05 5A 56 31 00  - movss xmm8,[ed72_steam.exe+475A48]
ed72_steam.exe+1603EE: 41 BE 01 00 00 00           - mov r14d,00000001
ed72_steam.exe+1603F4: F6 85 70 01 00 00 08        - test byte ptr [rbp+00000170],08
ed72_steam.exe+1603FB: 0F 85 BC 01 00 00           - jne ed72_steam.exe+1605BD
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>25</ID>
          <Description>"Multiplier to emeny"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>vf_damage_mul</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>27</ID>
          <Description>"Divisor to player"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>vf_damage_div</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>20</ID>
      <Description>"Min. Sepith (active: open item menu)"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript Async="1">{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_MIN_SEPITH,$process,48 8B 47 20 45 8B 04 06) // should be unique
alloc(newmem,$1000,INJECT_MIN_SEPITH)

label(code)
label(return)
label(i_min_sepith_val)

newmem:

code:
  mov rax,[rdi+20]

  mov r8w,[r14+rax]
  cmp r8w, [i_min_sepith_val]
  jae endp
  mov r8w, [i_min_sepith_val]
  mov [r14+rax], r8w

endp:
  mov r8d,[r14+rax]
  jmp return

align 10 cc
  i_min_sepith_val:
  dw #2000

INJECT_MIN_SEPITH:
  jmp newmem
  nop 3
return:
registersymbol(i_min_sepith_val)
registersymbol(INJECT_MIN_SEPITH)

[DISABLE]

INJECT_MIN_SEPITH:
  db 48 8B 47 20 45 8B 04 06

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+1D6597

ed72_steam.exe+1D656B: 8D 76 01              - lea esi,[rsi+01]
ed72_steam.exe+1D656E: 83 FB 70              - cmp ebx,70
ed72_steam.exe+1D6571: 7C 8D                 - jl ed72_steam.exe+1D6500
ed72_steam.exe+1D6573: 41 8B F4              - mov esi,r12d
ed72_steam.exe+1D6576: 41 BE EC 45 00 00     - mov r14d,000045EC
ed72_steam.exe+1D657C: 0F 1F 40 00           - nop dword ptr [rax+00]
ed72_steam.exe+1D6580: 48 8B 47 38           - mov rax,[rdi+38]
ed72_steam.exe+1D6584: 48 8D 15 CD 0C 29 00  - lea rdx,[ed72_steam.exe+467258]
ed72_steam.exe+1D658B: 48 8D 4C 24 50        - lea rcx,[rsp+50]
ed72_steam.exe+1D6590: 0F BF 98 98 01 00 00  - movsx ebx,word ptr [rax+00000198]
// ---------- INJECTING HERE ----------
ed72_steam.exe+1D6597: 48 8B 47 20           - mov rax,[rdi+20]
// ---------- DONE INJECTING  ----------
ed72_steam.exe+1D659B: 45 8B 04 06           - mov r8d,[r14+rax]
ed72_steam.exe+1D659F: E8 AC 23 ED FF        - call ed72_steam.exe+A8950
ed72_steam.exe+1D65A4: 48 8B 4F 38           - mov rcx,[rdi+38]
ed72_steam.exe+1D65A8: 8D 04 1E              - lea eax,[rsi+rbx]
ed72_steam.exe+1D65AB: 45 8D 47 05           - lea r8d,[r15+05]
ed72_steam.exe+1D65AF: 44 89 64 24 30        - mov [rsp+30],r12d
ed72_steam.exe+1D65B4: 44 03 C0              - add r8d,eax
ed72_steam.exe+1D65B7: 4C 8D 4C 24 50        - lea r9,[rsp+50]
ed72_steam.exe+1D65BC: 8D 55 1A              - lea edx,[rbp+1A]
ed72_steam.exe+1D65BF: 8B 81 84 01 00 00     - mov eax,[rcx+00000184]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>88</ID>
          <Description>"Turn when not in use"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>29</ID>
          <Description>"Min. value"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_min_sepith_val</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>22</ID>
      <Description>"Min. item 50 (count must &gt;= 2; to use: select tab in item menu / load save)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_MIN_ITEM_50,$process,0F B7 46 02 41 0F B6 CB) // should be unique
alloc(newmem,$1000,INJECT_MIN_ITEM_50)

label(code)
label(return)

newmem:

code:
  movzx eax,word ptr [rsi+02]

  //start injection
  cmp ax, 2
  jl orig_code
  cmp ax, #50
  jae orig_code
  mov ax, #50

set_num:
  mov word ptr [rsi+02], ax

orig_code:
  //end injection

  movzx ecx,r11l
  jmp return

INJECT_MIN_ITEM_50:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_MIN_ITEM_50)

[DISABLE]

INJECT_MIN_ITEM_50:
  db 0F B7 46 02 41 0F B6 CB

unregistersymbol(INJECT_MIN_ITEM_50)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+1D5D46

ed72_steam.exe+1D5D22: 4D 8B CA                 - mov r9,r10
ed72_steam.exe+1D5D25: 41 8B 92 58 01 00 00     - mov edx,[r10+00000158]
ed72_steam.exe+1D5D2C: E8 5F 79 06 00           - call ed72_steam.exe+23D690
ed72_steam.exe+1D5D31: 85 C0                    - test eax,eax
ed72_steam.exe+1D5D33: 74 5D                    - je ed72_steam.exe+1D5D92
ed72_steam.exe+1D5D35: 4D 85 D2                 - test r10,r10
ed72_steam.exe+1D5D38: 74 58                    - je ed72_steam.exe+1D5D92
ed72_steam.exe+1D5D3A: 49 8B 92 20 01 00 00     - mov rdx,[r10+00000120]
ed72_steam.exe+1D5D41: 48 85 D2                 - test rdx,rdx
ed72_steam.exe+1D5D44: 74 24                    - je ed72_steam.exe+1D5D6A
// ---------- INJECTING HERE ----------
ed72_steam.exe+1D5D46: 0F B7 46 02              - movzx eax,word ptr [rsi+02]
// ---------- DONE INJECTING  ----------
ed72_steam.exe+1D5D4A: 41 0F B6 CB              - movzx ecx,r11l
ed72_steam.exe+1D5D4E: C1 E1 0C                 - shl ecx,0C
ed72_steam.exe+1D5D51: 0B C8                    - or ecx,eax
ed72_steam.exe+1D5D53: 0F B7 C5                 - movzx eax,bp
ed72_steam.exe+1D5D56: C1 E1 10                 - shl ecx,10
ed72_steam.exe+1D5D59: 0B C8                    - or ecx,eax
ed72_steam.exe+1D5D5B: 49 0F BF 82 80 01 00 00  - movsx rax,word ptr [r10+00000180]
ed72_steam.exe+1D5D63: 89 0C 82                 - mov [rdx+rax*4],ecx
ed72_steam.exe+1D5D66: 4C 8B 53 38              - mov r10,[rbx+38]
ed72_steam.exe+1D5D6A: 49 8B 8A 48 01 00 00     - mov rcx,[r10+00000148]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>91</ID>
      <Description>"Char. status viewer"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed72_steam.exe
  Version: 
  Date   : 2022-11-27
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_VIEW_CHAR_STAT,$process,45 8B 45 10 48 8D 15 ?? ?? ?? ?? 48 8D) // should be unique
alloc(newmem,$1000,INJECT_VIEW_CHAR_STAT)
alloc(INJECT_VIEW_CHAR_STATo, 11)

label(code)
label(return)
label(i_base_char_stat_addr)


INJECT_VIEW_CHAR_STATo:
  readmem(INJECT_VIEW_CHAR_STAT, 11)


newmem:
  mov [i_base_char_stat_addr], r13

code:
  mov r8d,[r13+10]
  reassemble(INJECT_VIEW_CHAR_STAT+4)
  //lea rdx,[ed72_steam.exe+467280]
  jmp return
align 10 cc
  i_base_char_stat_addr:
  dq 0


INJECT_VIEW_CHAR_STAT:
  jmp newmem
  nop 6
return:
registersymbol(INJECT_VIEW_CHAR_STAT)
registersymbol(i_base_char_stat_addr)
registersymbol(INJECT_VIEW_CHAR_STATo)

[DISABLE]

INJECT_VIEW_CHAR_STAT:
  db 45 8B 45 10 48 8D 15 2D 21 29 00

unregistersymbol(*)
unregistersymbol(INJECT_VIEW_CHAR_STATo)
dealloc(newmem)
dealloc(INJECT_VIEW_CHAR_STATo)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+1D5148

ed72_steam.exe+1D511A: 41 B9 10 00 00 00        - mov r9d,00000010
ed72_steam.exe+1D5120: 89 74 24 28              - mov [rsp+28],esi
ed72_steam.exe+1D5124: 49 8B CC                 - mov rcx,r12
ed72_steam.exe+1D5127: F3 44 0F 11 44 24 20     - movss [rsp+20],xmm8
ed72_steam.exe+1D512E: E8 3D 2A 08 00           - call ed72_steam.exe+257B70
ed72_steam.exe+1D5133: 48 FF 45 A0              - inc qword ptr [rbp-60]
ed72_steam.exe+1D5137: 41 FF C7                 - inc r15d
ed72_steam.exe+1D513A: 49 83 C6 02              - add r14,02
ed72_steam.exe+1D513E: 41 83 FF 09              - cmp r15d,09
ed72_steam.exe+1D5142: 0F 8C 18 FE FF FF        - jl ed72_steam.exe+1D4F60
// ---------- INJECTING HERE ----------
ed72_steam.exe+1D5148: 45 8B 45 10              - mov r8d,[r13+10]
// ---------- DONE INJECTING  ----------
ed72_steam.exe+1D514C: 48 8D 15 2D 21 29 00     - lea rdx,[ed72_steam.exe+467280]
ed72_steam.exe+1D5153: 48 8D 4D 00              - lea rcx,[rbp+00]
ed72_steam.exe+1D5157: E8 F4 37 ED FF           - call ed72_steam.exe+A8950
ed72_steam.exe+1D515C: 49 8B 44 24 38           - mov rax,[r12+38]
ed72_steam.exe+1D5161: 4C 8D 4D 00              - lea r9,[rbp+00]
ed72_steam.exe+1D5165: F3 0F 10 35 9F 13 2A 00  - movss xmm6,[ed72_steam.exe+47650C]
ed72_steam.exe+1D516D: 49 8B 4C 24 18           - mov rcx,[r12+18]
ed72_steam.exe+1D5172: 89 74 24 30              - mov [rsp+30],esi
ed72_steam.exe+1D5176: F3 0F 10 80 74 01 00 00  - movss xmm0,[rax+00000174]
ed72_steam.exe+1D517E: F3 0F 10 88 70 01 00 00  - movss xmm1,[rax+00000170]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>92</ID>
          <Description>"Base addr."</Description>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>8 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>93</ID>
          <Description>"Level"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>8</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>94</ID>
          <Description>"Max HP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>95</ID>
          <Description>"HP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>96</ID>
          <Description>"Max EP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>A</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>97</ID>
          <Description>"EP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>98</ID>
          <Description>"CP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>E</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>99</ID>
          <Description>"EXP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>10</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>100</ID>
          <Description>"STR"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>14</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>101</ID>
          <Description>"DEF"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>16</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>102</ID>
          <Description>"ATS"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>18</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>103</ID>
          <Description>"ADF"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>1A</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>104</ID>
          <Description>"DEX"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>1C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>105</ID>
          <Description>"AGL"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>1E</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>106</ID>
          <Description>"MOV"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>20</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>107</ID>
          <Description>"SPD"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>22</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>108</ID>
          <Description>"CP?"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_base_char_stat_addr</Address>
          <Offsets>
            <Offset>28</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>109</ID>
      <Description>"_WIP"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>42</ID>
          <Description>"DP"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : ed72_steam.exe
  Version:
  Date   : 2022-11-27
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_DP_GAIN,$process,01 8A E8 45 00 00) // should be unique
alloc(newmem,$1000,INJECT_DP_GAIN)
aobscanmodule(INJECT_GET_DP_VALUE,$process,44 8B 88 F0 5B 0C 00) // should be unique
alloc(newmem2,$1000,INJECT_GET_DP_VALUE)


label(code)
label(return)
label(i_extra_dp_for_quest)
label(i_dp_value_addr)

newmem:
  push rcx
  lea rcx, [rdx+000045E8]
  mov [i_dp_value_addr], rcx

  mov ecx, dword ptr [i_extra_dp_for_quest]
  add [rdx+000045E8], ecx
  pop rcx

code:
  add [rdx+000045E8],ecx
  jmp return

align 10 cc
  i_extra_dp_for_quest:
  dd 1
  i_dp_value_addr:
  dq 0

INJECT_DP_GAIN:
  jmp newmem
  nop
return:
registersymbol(i_dp_value_addr)
registersymbol(i_extra_dp_for_quest)
registersymbol(INJECT_DP_GAIN)

label(code2)
label(return2)

newmem2:
  cmp qword ptr [i_dp_value_addr], 0
  jne @F
  push rcx
  lea rcx, [rax+000C5BF0]
  mov [i_dp_value_addr], rcx
  pop rcx

code2:
  //mov r9d,[rax+000E42F0]
  //jmp return2
  mov r9d,[rax+000C5BF0]
  jmp return

INJECT_GET_DP_VALUE:
  jmp newmem2
  nop 2
return2:
registersymbol(INJECT_GET_DP_VALUE)

[DISABLE]

INJECT_DP_GAIN:
  db 01 8A E8 45 00 00

unregistersymbol(*)
dealloc(newmem)

INJECT_GET_DP_VALUE:
  db 44 8B 88 F0 5B 0C 00

unregistersymbol(INJECT_GET_DP_VALUE)
dealloc(newmem2)

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+277D14

ed72_steam.exe+277CDF: 8B 80 24 61 00 00           - mov eax,[rax+00006124]
ed72_steam.exe+277CE5: 89 81 30 01 00 00           - mov [rcx+00000130],eax
ed72_steam.exe+277CEB: 48 8B 46 20                 - mov rax,[rsi+20]
ed72_steam.exe+277CEF: 49 8B 0E                    - mov rcx,[r14]
ed72_steam.exe+277CF2: 0F B7 80 E8 45 00 00        - movzx eax,word ptr [rax+000045E8]
ed72_steam.exe+277CF9: 66 89 81 80 01 00 00        - mov [rcx+00000180],ax
ed72_steam.exe+277D00: 48 8B 56 20                 - mov rdx,[rsi+20]
ed72_steam.exe+277D04: 41 0F B6 40 04              - movzx eax,byte ptr [r8+04]
ed72_steam.exe+277D09: 43 0F BF 8C 91 28 46 00 00  - movsx ecx,word ptr [r9+r10*4+00004628]
ed72_steam.exe+277D12: 03 C8                       - add ecx,eax
// ---------- INJECTING HERE ----------
ed72_steam.exe+277D14: 01 8A E8 45 00 00           - add [rdx+000045E8],ecx
// ---------- DONE INJECTING  ----------
ed72_steam.exe+277D1A: 8B 8A E8 45 00 00           - mov ecx,[rdx+000045E8]
ed72_steam.exe+277D20: 33 DB                       - xor ebx,ebx
ed72_steam.exe+277D22: 49 8B 06                    - mov rax,[r14]
ed72_steam.exe+277D25: 66 89 88 78 01 00 00        - mov [rax+00000178],cx
ed72_steam.exe+277D2C: 8B CB                       - mov ecx,ebx
ed72_steam.exe+277D2E: 4C 8B 5E 20                 - mov r11,[rsi+20]
ed72_steam.exe+277D32: 8B C3                       - mov eax,ebx
ed72_steam.exe+277D34: 41 8B 93 E8 45 00 00        - mov edx,[r11+000045E8]
ed72_steam.exe+277D3B: 0F 1F 44 00 00              - nop dword ptr [rax+rax+00]
ed72_steam.exe+277D40: 3B 54 85 90                 - cmp edx,[rbp+rax*4-70]
}

{
// ORIGINAL CODE - INJECTION POINT: ed72_steam.exe+19757E

ed72_steam.exe+19754F: CC                    - int 3
ed72_steam.exe+197550: 40 57                 - push rdi
ed72_steam.exe+197552: 48 83 EC 50           - sub rsp,50
ed72_steam.exe+197556: 48 8B 81 E8 C2 03 00  - mov rax,[rcx+0003C2E8]
ed72_steam.exe+19755D: BA 81 FF FF FF        - mov edx,FFFFFF81
ed72_steam.exe+197562: 48 8B F9              - mov rdi,rcx
ed72_steam.exe+197565: 44 0F 29 44 24 20     - movaps [rsp+20],xmm8
ed72_steam.exe+19756B: B9 7F 00 00 00        - mov ecx,0000007F
ed72_steam.exe+197570: 83 B8 90 5C 0C 00 00  - cmp dword ptr [rax+000C5C90],00
ed72_steam.exe+197577: 44 8B 80 F4 5B 0C 00  - mov r8d,[rax+000C5BF4]
// ---------- INJECTING HERE ----------
ed72_steam.exe+19757E: 44 8B 88 F0 5B 0C 00  - mov r9d,[rax+000C5BF0]
// ---------- DONE INJECTING  ----------
ed72_steam.exe+197585: 44 0F 45 C2           - cmovne r8d,edx
ed72_steam.exe+197589: 83 B8 94 5C 0C 00 00  - cmp dword ptr [rax+000C5C94],00
ed72_steam.exe+197590: 44 0F 45 C1           - cmovne r8d,ecx
ed72_steam.exe+197594: 83 B8 8C 5C 0C 00 00  - cmp dword ptr [rax+000C5C8C],00
ed72_steam.exe+19759B: 44 0F 45 CA           - cmovne r9d,edx
ed72_steam.exe+19759F: 83 B8 88 5C 0C 00 00  - cmp dword ptr [rax+000C5C88],00
ed72_steam.exe+1975A6: 44 0F 45 C9           - cmovne r9d,ecx
ed72_steam.exe+1975AA: 80 B8 E4 5B 0C 00 00  - cmp byte ptr [rax+000C5BE4],00
ed72_steam.exe+1975B1: 75 73                 - jne ed72_steam.exe+197626
ed72_steam.exe+1975B3: 41 8B C1              - mov eax,r9d
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>43</ID>
              <Description>"Cur. DP (Open DP menu)"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>i_dp_value_addr</Address>
              <Offsets>
                <Offset>0</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>44</ID>
              <Description>"Extra DP for each quest"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>i_extra_dp_for_quest</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>85</ID>
      <Description>"英雄傳說 碧之軌跡：改  /  https://opencheattables.com"</Description>
      <Color>00A400</Color>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <LuaScript>--lua scripts that table checkbox will not be checked with "NO_ACTIVATE" in comment
function onMemRecPostExecute(memoryrecord, newState, succeeded )
    if memoryrecord.Type == vtAutoAssembler and memoryrecord.Script:find("NO_ACTIVATE") and newState and succeeded then
        memoryrecord.disableWithoutExecute()
    end
end
</LuaScript>
</CheatTable>
