<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="46">
  <CheatEntries>
    <CheatEntry>
      <ID>87</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(38).Description = '戰鬥：XP加成'
getAddressList().getMemoryRecordByID(39).Description = '加成倍率'
getAddressList().getMemoryRecordByID(40).Description = '戰鬥結束後回滿HPEP?'
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(30).Description = '丟棄道具後數量80 (原本數量要 &gt;=2)'
getAddressList().getMemoryRecordByID(32).Description = '道具賣出/Exchange：收入倍率'
getAddressList().getMemoryRecordByID(33).Description = 'Mira (啟用：打開選單)'
getAddressList().getMemoryRecordByID(34).Description = '賣出/exchange倍率'
getAddressList().getMemoryRecordByID(37).Description = '買/裝備/使用/烹飪：道具數量變70以上 (數量1時可能沒作用)'
getAddressList().getMemoryRecordByID(46).Description = '最後道具數量'
getAddressList().getMemoryRecordByID(47).Description = '最後道具ID'
getAddressList().getMemoryRecordByID(42).Description = 'DP'
getAddressList().getMemoryRecordByID(43).Description = '目前DP (打開搜查手冊)'
getAddressList().getMemoryRecordByID(44).Description = '任務完成時額外的DP'
getAddressList().getMemoryRecordByID(28).Description = '精簡模式'
getAddressList().getMemoryRecordByID(55).Description = '傳送門：同一張地圖 (***請勿鎖定數值)'
getAddressList().getMemoryRecordByID(67).Description = '**注意：有點小bug'
getAddressList().getMemoryRecordByID(56).Description = '座標存至暫存點#1?'
getAddressList().getMemoryRecordByID(57).Description = '座標存至暫存點#2?'
getAddressList().getMemoryRecordByID(68).Description = '座標存至暫存點#3?'
getAddressList().getMemoryRecordByID(58).Description = '傳送至暫存點#1?'
getAddressList().getMemoryRecordByID(59).Description = '傳送至暫存點#2?'
getAddressList().getMemoryRecordByID(69).Description = '傳送至暫存點#3?'
getAddressList().getMemoryRecordByID(60).Description = '暫存點#1.X'
getAddressList().getMemoryRecordByID(61).Description = '暫存點#1.Y'
getAddressList().getMemoryRecordByID(65).Description = '暫存點#1.Z'
getAddressList().getMemoryRecordByID(62).Description = '暫存點#2.X'
getAddressList().getMemoryRecordByID(63).Description = '暫存點#2.Y'
getAddressList().getMemoryRecordByID(66).Description = '暫存點#2.Z'
getAddressList().getMemoryRecordByID(70).Description = '暫存點#3.X'
getAddressList().getMemoryRecordByID(71).Description = '暫存點#3.Y'
getAddressList().getMemoryRecordByID(72).Description = '暫存點#3.Z'
getAddressList().getMemoryRecordByID(52).Description = '座標X：'
getAddressList().getMemoryRecordByID(53).Description = '座標Y：'
getAddressList().getMemoryRecordByID(64).Description = '座標Z：'
getAddressList().getMemoryRecordByID(79).Description = '先制攻擊/戰鬥勝利次數'
getAddressList().getMemoryRecordByID(84).Description = '戰鬥勝利次數'
getAddressList().getMemoryRecordByID(80).Description = '先制攻擊次數'
getAddressList().getMemoryRecordByID(82).Description = 'S-Break次數?'

[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(38).Description = 'Battle: XP multiplier'
getAddressList().getMemoryRecordByID(39).Description = 'Multiplier'
getAddressList().getMemoryRecordByID(40).Description = 'Recover HPEP after battle?'
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(30).Description = 'Drop item from menu: # of item &gt;= 80 (must &gt;=2)'
getAddressList().getMemoryRecordByID(32).Description = 'Item Sell/Exchange: mira multiplier'
getAddressList().getMemoryRecordByID(33).Description = 'Mira (active: open menu)'
getAddressList().getMemoryRecordByID(34).Description = 'Sell/exchange multiplier'
getAddressList().getMemoryRecordByID(37).Description = 'Buy/Equip/Use item/Cook: stack# &gt;= 70 (may not work if count = 1)'
getAddressList().getMemoryRecordByID(46).Description = 'Last item amount'
getAddressList().getMemoryRecordByID(47).Description = 'Last item ID'
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(55).Description = 'Teleport: the same map (***do not lock these values)'
getAddressList().getMemoryRecordByID(67).Description = '**Warning: buggy'
getAddressList().getMemoryRecordByID(56).Description = 'Store into Set #1?'
getAddressList().getMemoryRecordByID(57).Description = 'Store into Set #2?'
getAddressList().getMemoryRecordByID(68).Description = 'Store into Set #3?'
getAddressList().getMemoryRecordByID(58).Description = 'Teleport to Set #1?'
getAddressList().getMemoryRecordByID(59).Description = 'Teleport to Set #2?'
getAddressList().getMemoryRecordByID(69).Description = 'Teleport to Set #3?'
getAddressList().getMemoryRecordByID(60).Description = 'Set #1.X'
getAddressList().getMemoryRecordByID(61).Description = 'Set #1.Y'
getAddressList().getMemoryRecordByID(65).Description = 'Set #1.Z'
getAddressList().getMemoryRecordByID(62).Description = 'Set #2.X'
getAddressList().getMemoryRecordByID(63).Description = 'Set #2.Y'
getAddressList().getMemoryRecordByID(66).Description = 'Set #2.Z'
getAddressList().getMemoryRecordByID(70).Description = 'Set #3.X'
getAddressList().getMemoryRecordByID(71).Description = 'Set #3.Y'
getAddressList().getMemoryRecordByID(72).Description = 'Set #3.Z'
getAddressList().getMemoryRecordByID(52).Description = 'Coord: X'
getAddressList().getMemoryRecordByID(53).Description = 'Coord: Y'
getAddressList().getMemoryRecordByID(64).Description = 'Coord: Z'
getAddressList().getMemoryRecordByID(79).Description = 'Preemptive attack / battle count'
getAddressList().getMemoryRecordByID(84).Description = 'Battle count'
getAddressList().getMemoryRecordByID(80).Description = 'Preemptive Count'
getAddressList().getMemoryRecordByID(82).Description = 'S-Break?'


</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   : ed71_steam.exe
  Version: 
  Date   : 2022-04-10
  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: ed71_steam.exe+11FCBD

ed71_steam.exe+11FC9C: 45 8B D8                             - mov r11d,r8d
ed71_steam.exe+11FC9F: 48 8B DA                             - mov rbx,rdx
ed71_steam.exe+11FCA2: 41 8B C2                             - mov eax,r10d
ed71_steam.exe+11FCA5: 0F 57 C9                             - xorps xmm1,xmm1
ed71_steam.exe+11FCA8: 41 2B C0                             - sub eax,r8d
ed71_steam.exe+11FCAB: 0F 57 D2                             - xorps xmm2,xmm2
ed71_steam.exe+11FCAE: 45 33 C0                             - xor r8d,r8d
ed71_steam.exe+11FCB1: 45 3B D3                             - cmp r10d,r11d
ed71_steam.exe+11FCB4: F3 49 0F 2A D2                       - cvtsi2ss xmm2,r10
ed71_steam.exe+11FCB9: 44 0F 47 C0                          - cmova r8d,eax
// ---------- INJECTING HERE ----------
ed71_steam.exe+11FCBD: 44 89 82 78 02 00 00                 - mov [rdx+00000278],r8d
// ---------- DONE INJECTING  ----------
ed71_steam.exe+11FCC4: 0F B7 02                             - movzx eax,word ptr [rdx]
ed71_steam.exe+11FCC7: 8B 8B 74 02 00 00                    - mov ecx,[rbx+00000274]
ed71_steam.exe+11FCCD: F3 0F 10 1D BB 0E 22 00              - movss xmm3,[ed71_steam.exe+340B90]
ed71_steam.exe+11FCD5: 48 6B D0 2C                          - imul rdx,rax,2C
ed71_steam.exe+11FCD9: 41 8B C0                             - mov eax,r8d
ed71_steam.exe+11FCDC: F3 48 0F 2A C8                       - cvtsi2ss xmm1,rax
ed71_steam.exe+11FCE1: 42 C6 84 0A 94 D1 0C 00 01           - mov byte ptr [rdx+r9+000CD194],01
ed71_steam.exe+11FCEA: 8B C1                                - mov eax,ecx
ed71_steam.exe+11FCEC: 4A C7 84 0A 88 D1 0C 00 00 00 80 3F  - mov qword ptr [rdx+r9+000CD188],3F800000
ed71_steam.exe+11FCF8: 42 C7 84 0A 70 D1 0C 00 00 00 7A 44  - mov [rdx+r9+000CD170],447A0000
}
</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   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  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: ed71_steam.exe+175BB7

ed71_steam.exe+175B94: 48 8D 82 B0 02 00 00     - lea rax,[rdx+000002B0]
ed71_steam.exe+175B9B: 44 39 B2 A4 02 00 00     - cmp [rdx+000002A4],r14d
ed71_steam.exe+175BA2: 7D 13                    - jnl ed71_steam.exe+175BB7
ed71_steam.exe+175BA4: 41 8B CE                 - mov ecx,r14d
ed71_steam.exe+175BA7: 44 39 30                 - cmp [rax],r14d
ed71_steam.exe+175BAA: 7C 3E                    - jl ed71_steam.exe+175BEA
ed71_steam.exe+175BAC: FF C1                    - inc ecx
ed71_steam.exe+175BAE: 48 83 C0 20              - add rax,20
ed71_steam.exe+175BB2: 83 F9 21                 - cmp ecx,21
ed71_steam.exe+175BB5: 7C F0                    - jl ed71_steam.exe+175BA7
// ---------- INJECTING HERE ----------
ed71_steam.exe+175BB7: 8B 82 78 02 00 00        - mov eax,[rdx+00000278]
// ---------- DONE INJECTING  ----------
ed71_steam.exe+175BBD: 0F 57 C9                 - xorps xmm1,xmm1
ed71_steam.exe+175BC0: 0F 57 D2                 - xorps xmm2,xmm2
ed71_steam.exe+175BC3: F3 48 0F 2A D0           - cvtsi2ss xmm2,rax
ed71_steam.exe+175BC8: 8B 82 74 02 00 00        - mov eax,[rdx+00000274]
ed71_steam.exe+175BCE: F3 48 0F 2A C8           - cvtsi2ss xmm1,rax
ed71_steam.exe+175BD3: 0F 28 C1                 - movaps xmm0,xmm1
ed71_steam.exe+175BD6: F3 0F 59 05 46 A6 1C 00  - mulss xmm0,[ed71_steam.exe+340224]
ed71_steam.exe+175BDE: 0F 2F C2                 - comiss xmm0,xmm2
ed71_steam.exe+175BE1: 76 13                    - jna ed71_steam.exe+175BF6
ed71_steam.exe+175BE3: 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   : ed71_steam.exe
  Version: 
  Date   : 2022-04-10
  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: ed71_steam.exe+16007F

ed71_steam.exe+16005B: 75 08                 - jne ed71_steam.exe+160065
ed71_steam.exe+16005D: 0F B7 12              - movzx edx,word ptr [rdx]
ed71_steam.exe+160060: E8 5B A8 0A 00        - call ed71_steam.exe+20A8C0
ed71_steam.exe+160065: 0F B7 BB 80 02 00 00  - movzx edi,word ptr [rbx+00000280]
ed71_steam.exe+16006C: 33 D2                 - xor edx,edx
ed71_steam.exe+16006E: 0F B7 CF              - movzx ecx,di
ed71_steam.exe+160071: 66 2B C8              - sub cx,ax
ed71_steam.exe+160074: 3B F8                 - cmp edi,eax
ed71_steam.exe+160076: B8 00 40 00 00        - mov eax,00004000
ed71_steam.exe+16007B: 66 0F 4C CA           - cmovl cx,dx
// ---------- INJECTING HERE ----------
ed71_steam.exe+16007F: 66 89 8B 80 02 00 00  - mov [rbx+00000280],cx
// ---------- DONE INJECTING  ----------
ed71_steam.exe+160086: 66 85 43 02           - test [rbx+02],ax
ed71_steam.exe+16008A: 0F 84 A6 00 00 00     - je ed71_steam.exe+160136
ed71_steam.exe+160090: 0F B7 03              - movzx eax,word ptr [rbx]
ed71_steam.exe+160093: 0F 57 D2              - xorps xmm2,xmm2
ed71_steam.exe+160096: 0F B7 93 7E 02 00 00  - movzx edx,word ptr [rbx+0000027E]
ed71_steam.exe+16009D: 0F 57 C9              - xorps xmm1,xmm1
ed71_steam.exe+1600A0: 4C 69 C0 38 02 00 00  - imul r8,rax,00000238
ed71_steam.exe+1600A7: F3 48 0F 2A CF        - cvtsi2ss xmm1,rdi
ed71_steam.exe+1600AC: 0F B7 C9              - movzx ecx,cx
ed71_steam.exe+1600AF: 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   : ed71_steam.exe
  Version: 
  Date   : 2022-04-10
  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: ed71_steam.exe+16022B

ed71_steam.exe+1601FD: 83 F8 62                 - cmp eax,62
ed71_steam.exe+160200: 7C 09                    - jl ed71_steam.exe+16020B
ed71_steam.exe+160202: 41 B8 62 00 00 00        - mov r8d,00000062
ed71_steam.exe+160208: 44 2B C1                 - sub r8d,ecx
ed71_steam.exe+16020B: 0F B7 82 9C 02 00 00     - movzx eax,word ptr [rdx+0000029C]
ed71_steam.exe+160212: 48 89 BC 24 A8 00 00 00  - mov [rsp+000000A8],rdi
ed71_steam.exe+16021A: 0F B7 BA 82 02 00 00     - movzx edi,word ptr [rdx+00000282]
ed71_steam.exe+160221: 42 8D 0C 07              - lea ecx,[rdi+r8]
ed71_steam.exe+160225: 3B C8                    - cmp ecx,eax
ed71_steam.exe+160227: 66 0F 4D C8              - cmovge cx,ax
// ---------- INJECTING HERE ----------
ed71_steam.exe+16022B: 66 89 8A 82 02 00 00     - mov [rdx+00000282],cx
// ---------- DONE INJECTING  ----------
ed71_steam.exe+160232: 0F B7 42 02              - movzx eax,word ptr [rdx+02]
ed71_steam.exe+160236: BA 00 40 00 00           - mov edx,00004000
ed71_steam.exe+16023B: 66 85 C2                 - test dx,ax
ed71_steam.exe+16023E: 0F 84 BF 00 00 00        - je ed71_steam.exe+160303
ed71_steam.exe+160244: F7 D0                    - not eax
ed71_steam.exe+160246: 0F BA E0 0D              - bt eax,0D
ed71_steam.exe+16024A: 0F 83 B3 00 00 00        - jae ed71_steam.exe+160303
ed71_steam.exe+160250: 0F B7 93 9C 02 00 00     - movzx edx,word ptr [rbx+0000029C]
ed71_steam.exe+160257: 0F 57 D2                 - xorps xmm2,xmm2
ed71_steam.exe+16025A: 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   : ed71_steam.exe
  Version: 
  Date   : 2022-04-10
  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: ed71_steam.exe+160408

ed71_steam.exe+1603E2: 48 89 6C 24 40        - mov [rsp+40],rbp
ed71_steam.exe+1603E7: 0F B7 C6              - movzx eax,si
ed71_steam.exe+1603EA: 66 41 2B C0           - sub ax,r8w
ed71_steam.exe+1603EE: 4C 89 7C 24 50        - mov [rsp+50],r15
ed71_steam.exe+1603F3: 33 ED                 - xor ebp,ebp
ed71_steam.exe+1603F5: B9 00 40 00 00        - mov ecx,00004000
ed71_steam.exe+1603FA: 41 3B F0              - cmp esi,r8d
ed71_steam.exe+1603FD: 45 0F B6 F9           - movzx r15d,r9l
ed71_steam.exe+160401: 48 8B DA              - mov rbx,rdx
ed71_steam.exe+160404: 66 0F 4C C5           - cmovl ax,bp
// ---------- INJECTING HERE ----------
ed71_steam.exe+160408: 66 89 82 82 02 00 00  - mov [rdx+00000282],ax
// ---------- DONE INJECTING  ----------
ed71_steam.exe+16040F: 66 85 4A 02           - test [rdx+02],cx
ed71_steam.exe+160413: 0F 84 3D 01 00 00     - je ed71_steam.exe+160556
ed71_steam.exe+160419: 0F B7 C8              - movzx ecx,ax
ed71_steam.exe+16041C: 0F 57 D2              - xorps xmm2,xmm2
ed71_steam.exe+16041F: 0F B7 02              - movzx eax,word ptr [rdx]
ed71_steam.exe+160422: 0F 57 C9              - xorps xmm1,xmm1
ed71_steam.exe+160425: 48 69 D0 38 02 00 00  - imul rdx,rax,00000238
ed71_steam.exe+16042C: F3 48 0F 2A D1        - cvtsi2ss xmm2,rcx
ed71_steam.exe+160431: 4C 89 74 24 48        - mov [rsp+48],r14
ed71_steam.exe+160436: B8 1F 85 EB 51        - mov eax,51EB851F
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>38</ID>
      <Description>"Battle: XP multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_XP_MULTI,$process,57 08 0F 11 07 41 0F 10 4E 10 0F 11 4F 10 41 0F 10 46 20) // should be unique
alloc(newmem,$1000,INJECT_XP_MULTI)

label(code)
label(return)
label(vf_xp_multi)
label(is_recover_hpep)

newmem:
  push rax
  push rbx
  mov eax, [rdi+10]
code:
  movups [rdi+10],xmm1
  mov ebx, [rdi+10]
  sub ebx, eax
  cvtsi2ss xmm15, ebx
  vmovss xmm14, [vf_xp_multi]
  vmulss xmm15, xmm15, xmm14
  cvtss2si ebx, xmm15
  add eax, ebx
  mov [rdi+10], eax

  cmp dword ptr [is_recover_hpep], 1
  jne @F
  mov eax, [rdi]
  mov [rdi+4], eax
  mov ax, [rdi+A]
  mov [rdi+C], ax

@@:
  pop rbx
  pop rax
  movups xmm0,[r14+20]
  jmp return

align 10 cc
  is_recover_hpep:
  dd 1
  vf_xp_multi:
  dd (float)1.2


INJECT_XP_MULTI+0A:
  jmp newmem
  nop 4
return:
registersymbol(is_recover_hpep)
registersymbol(vf_xp_multi)
registersymbol(INJECT_XP_MULTI)

[DISABLE]

INJECT_XP_MULTI+0A:
  db 0F 11 4F 10 41 0F 10 46 20

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+11999F

ed71_steam.exe+119977: 41 0F 10 06           - movups xmm0,[r14]
ed71_steam.exe+11997B: 0F B7 C0              - movzx eax,ax
ed71_steam.exe+11997E: 49 8D BA F0 00 0E 00  - lea rdi,[r10+000E00F0]
ed71_steam.exe+119985: 83 F8 0C              - cmp eax,0C
ed71_steam.exe+119988: 41 0F 47 C4           - cmova eax,r12d
ed71_steam.exe+11998C: 48 6B C8 34           - imul rcx,rax,34
ed71_steam.exe+119990: 48 03 F9              - add rdi,rcx
ed71_steam.exe+119993: 0F B7 57 08           - movzx edx,word ptr [rdi+08]
ed71_steam.exe+119997: 0F 11 07              - movups [rdi],xmm0
ed71_steam.exe+11999A: 41 0F 10 4E 10        - movups xmm1,[r14+10]
// ---------- INJECTING HERE ----------
ed71_steam.exe+11999F: 0F 11 4F 10           - movups [rdi+10],xmm1
// ---------- DONE INJECTING  ----------
ed71_steam.exe+1199A3: 41 0F 10 46 20        - movups xmm0,[r14+20]
ed71_steam.exe+1199A8: 0F 11 47 20           - movups [rdi+20],xmm0
ed71_steam.exe+1199AC: 41 8B 46 30           - mov eax,[r14+30]
ed71_steam.exe+1199B0: 89 47 30              - mov [rdi+30],eax
ed71_steam.exe+1199B3: 44 0F B7 47 08        - movzx r8d,word ptr [rdi+08]
ed71_steam.exe+1199B8: 41 3B D0              - cmp edx,r8d
ed71_steam.exe+1199BB: 74 38                 - je ed71_steam.exe+1199F5
ed71_steam.exe+1199BD: 0F B7 16              - movzx edx,word ptr [rsi]
ed71_steam.exe+1199C0: 44 8B CB              - mov r9d,ebx
ed71_steam.exe+1199C3: 49 8B CA              - mov rcx,r10
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>39</ID>
          <Description>"Multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>vf_xp_multi</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>40</ID>
          <Description>"Recover HPEP after battle?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_recover_hpep</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>24</ID>
      <Description>"Battle: Damage multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  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.25

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: ed71_steam.exe+128A4A

ed71_steam.exe+128A2A: 48 89 74 24 18        - mov [rsp+18],rsi
ed71_steam.exe+128A2F: 44 89 4C 24 20        - mov [rsp+20],r9d
ed71_steam.exe+128A34: 57                    - push rdi
ed71_steam.exe+128A35: 41 54                 - push r12
ed71_steam.exe+128A37: 41 55                 - push r13
ed71_steam.exe+128A39: 41 56                 - push r14
ed71_steam.exe+128A3B: 41 57                 - push r15
ed71_steam.exe+128A3D: 48 83 EC 30           - sub rsp,30
ed71_steam.exe+128A41: 4D 8B F8              - mov r15,r8
ed71_steam.exe+128A44: 44 0F 29 44 24 20     - movaps [rsp+20],xmm8
// ---------- INJECTING HERE ----------
ed71_steam.exe+128A4A: 45 8B C1              - mov r8d,r9d
// ---------- DONE INJECTING  ----------
ed71_steam.exe+128A4D: 45 8B E9              - mov r13d,r9d
ed71_steam.exe+128A50: 48 8B FA              - mov rdi,rdx
ed71_steam.exe+128A53: 48 8B D9              - mov rbx,rcx
ed71_steam.exe+128A56: E8 35 72 FF FF        - call ed71_steam.exe+11FC90
ed71_steam.exe+128A5B: 48 8B AF 30 02 00 00  - mov rbp,[rdi+00000230]
ed71_steam.exe+128A62: 48 8D 8B 7C D7 0C 00  - lea rcx,[rbx+000CD77C]
ed71_steam.exe+128A69: 45 33 DB              - xor r11d,r11d
ed71_steam.exe+128A6C: 45 8B D3              - mov r10d,r11d
ed71_steam.exe+128A6F: 41 8B D3              - mov edx,r11d
ed71_steam.exe+128A72: 0F 1F 40 00           - nop dword ptr [rax+00]
}
</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>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_MIN_SEPITH,$process,48 8B 47 20 44 8B 04 28) // 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 r8d,[rax+rbp]
  cmp r8d, [i_min_sepith_val]
  jge endp
  mov r8d, [i_min_sepith_val]
  mov [rax+rbp], r8d

endp:
  mov r8d,[rax+rbp]
  jmp return

align 10 cc
  i_min_sepith_val:
  dd #2000

INJECT_MIN_SEPITH:
  jmp newmem
  nop 4
return:
registersymbol(i_min_sepith_val)
registersymbol(INJECT_MIN_SEPITH)

[DISABLE]

INJECT_MIN_SEPITH:
  db 48 8B 47 20 44 8B 04 28

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+19EB17

ed71_steam.exe+19EAE8: 8D 76 01                 - lea esi,[rsi+01]
ed71_steam.exe+19EAEB: 83 FB 70                 - cmp ebx,70
ed71_steam.exe+19EAEE: 7C C0                    - jl ed71_steam.exe+19EAB0
ed71_steam.exe+19EAF0: 41 8B F4                 - mov esi,r12d
ed71_steam.exe+19EAF3: BD EC 44 00 00           - mov ebp,000044EC
ed71_steam.exe+19EAF8: 0F 1F 84 00 00 00 00 00  - nop dword ptr [rax+rax+00000000]
ed71_steam.exe+19EB00: 48 8B 47 38              - mov rax,[rdi+38]
ed71_steam.exe+19EB04: 48 8D 15 8D EA 23 00     - lea rdx,[ed71_steam.exe+3DD598]
ed71_steam.exe+19EB0B: 48 8D 4C 24 50           - lea rcx,[rsp+50]
ed71_steam.exe+19EB10: 0F BF 98 98 01 00 00     - movsx ebx,word ptr [rax+00000198]
// ---------- INJECTING HERE ----------
ed71_steam.exe+19EB17: 48 8B 47 20              - mov rax,[rdi+20]
// ---------- DONE INJECTING  ----------
ed71_steam.exe+19EB1B: 44 8B 04 28              - mov r8d,[rax+rbp]
ed71_steam.exe+19EB1F: E8 FC A3 ED FF           - call ed71_steam.exe+78F20
ed71_steam.exe+19EB24: 48 8B 4F 38              - mov rcx,[rdi+38]
ed71_steam.exe+19EB28: 8D 04 1E                 - lea eax,[rsi+rbx]
ed71_steam.exe+19EB2B: 45 8D 47 05              - lea r8d,[r15+05]
ed71_steam.exe+19EB2F: 44 89 64 24 30           - mov [rsp+30],r12d
ed71_steam.exe+19EB34: 44 03 C0                 - add r8d,eax
ed71_steam.exe+19EB37: 4C 8D 4C 24 50           - lea r9,[rsp+50]
ed71_steam.exe+19EB3C: 41 8D 56 1A              - lea edx,[r14+1A]
ed71_steam.exe+19EB40: 8B 81 84 01 00 00        - mov eax,[rcx+00000184]
}
</AssemblerScript>
      <CheatEntries>
        <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   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_MIN_ITEM_50,$process,0F B7 4E 02 1B D2) // should be unique
alloc(newmem,$1000,INJECT_MIN_ITEM_50)

label(code)
label(return)

newmem:

code:
  movzx ecx,word ptr [rsi+02]

  //start injection
  cmp ecx, 2
  jl @F
  cmp ecx, #50
  jg @F
  mov ecx, #50
  mov word ptr [rsi+02], cx

@@:
  //end injection

  sbb edx,edx
  jmp return

INJECT_MIN_ITEM_50:
  jmp newmem
  nop
return:
registersymbol(INJECT_MIN_ITEM_50)

[DISABLE]

INJECT_MIN_ITEM_50:
  db 0F B7 4E 02 1B D2

unregistersymbol(INJECT_MIN_ITEM_50)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+198D18

ed71_steam.exe+198CF9: 80 E9 17                 - sub cl,17
ed71_steam.exe+198CFC: 80 F9 02                 - cmp cl,02
ed71_steam.exe+198CFF: 77 6A                    - ja ed71_steam.exe+198D6B
ed71_steam.exe+198D01: 48 85 C0                 - test rax,rax
ed71_steam.exe+198D04: 74 65                    - je ed71_steam.exe+198D6B
ed71_steam.exe+198D06: 4C 8B 80 20 01 00 00     - mov r8,[rax+00000120]
ed71_steam.exe+198D0D: 4D 85 C0                 - test r8,r8
ed71_steam.exe+198D10: 74 2C                    - je ed71_steam.exe+198D3E
ed71_steam.exe+198D12: 41 0F B6 C9              - movzx ecx,r9l
ed71_steam.exe+198D16: F6 D9                    - neg cl
// ---------- INJECTING HERE ----------
ed71_steam.exe+198D18: 0F B7 4E 02              - movzx ecx,word ptr [rsi+02]
// ---------- DONE INJECTING  ----------
ed71_steam.exe+198D1C: 1B D2                    - sbb edx,edx
ed71_steam.exe+198D1E: 81 E2 00 10 00 00        - and edx,00001000
ed71_steam.exe+198D24: 0B D1                    - or edx,ecx
ed71_steam.exe+198D26: 0F B7 0E                 - movzx ecx,word ptr [rsi]
ed71_steam.exe+198D29: C1 E2 10                 - shl edx,10
ed71_steam.exe+198D2C: 0B D1                    - or edx,ecx
ed71_steam.exe+198D2E: 48 0F BF 88 80 01 00 00  - movsx rcx,word ptr [rax+00000180]
ed71_steam.exe+198D36: 41 89 14 88              - mov [r8+rcx*4],edx
ed71_steam.exe+198D3A: 48 8B 43 38              - mov rax,[rbx+38]
ed71_steam.exe+198D3E: 4C 8B 80 48 01 00 00     - mov r8,[rax+00000148]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>30</ID>
      <Description>"Drop item from menu: # of item &gt;= 80 (must &gt;=2)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_ITEM_DROP,$process,66 89 82 12 0E 0E 00) // should be unique
alloc(newmem,$1000,INJECT_ITEM_DROP)

label(code)
label(return)

newmem:
  cmp ax, #80
  jg code
  mov ax, #80

code:
  mov [rdx+000E0E12],ax
  jmp return

INJECT_ITEM_DROP:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_ITEM_DROP)

[DISABLE]

INJECT_ITEM_DROP:
  db 66 89 82 12 0E 0E 00

unregistersymbol(INJECT_ITEM_DROP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+207C41

ed71_steam.exe+207C1E: CC                    - int 3 
ed71_steam.exe+207C1F: CC                    - int 3 
ed71_steam.exe+207C20: 4C 8B 0D E1 33 CC 17  - mov r9,[ed71_steam.exe+17ECB008]
ed71_steam.exe+207C27: 4C 63 D2              - movsxd  r10,edx
ed71_steam.exe+207C2A: 49 8B CA              - mov rcx,r10
ed71_steam.exe+207C2D: 4B 8D 14 91           - lea rdx,[r9+r10*4]
ed71_steam.exe+207C31: 0F B7 82 12 0E 0E 00  - movzx eax,word ptr [rdx+000E0E12]
ed71_steam.exe+207C38: 41 3B C0              - cmp eax,r8d
ed71_steam.exe+207C3B: 7E 11                 - jle ed71_steam.exe+207C4E
ed71_steam.exe+207C3D: 66 41 2B C0           - sub ax,r8w
// ---------- INJECTING HERE ----------
ed71_steam.exe+207C41: 66 89 82 12 0E 0E 00  - mov [rdx+000E0E12],ax
// ---------- DONE INJECTING  ----------
ed71_steam.exe+207C48: B8 01 00 00 00        - mov eax,00000001
ed71_steam.exe+207C4D: C3                    - ret 
ed71_steam.exe+207C4E: 75 4C                 - jne ed71_steam.exe+207C9C
ed71_steam.exe+207C50: BA 77 06 00 00        - mov edx,00000677
ed71_steam.exe+207C55: 48 3B CA              - cmp rcx,rdx
ed71_steam.exe+207C58: 7D 2F                 - jnl ed71_steam.exe+207C89
ed71_steam.exe+207C5A: 49 8D 81 14 0E 0E 00  - lea rax,[r9+000E0E14]
ed71_steam.exe+207C61: 48 2B D1              - sub rdx,rcx
ed71_steam.exe+207C64: 4A 8D 04 90           - lea rax,[rax+r10*4]
ed71_steam.exe+207C68: 44 03 D2              - add r10d,edx
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>32</ID>
      <Description>"Item Sell/Exchange: mira multiplier"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

//sell
aobscanmodule(INJECT_MIRA_SELL_MULTI,$process,44 03 C2 44 89 81 DC 42 0E 00) // should be unique
alloc(newmem,$1000,INJECT_MIRA_SELL_MULTI)

//exchange
aobscanmodule(INJECT_MIRA_EXCHANGE_MUL,$process,44 03 C7 44 89 81 DC 42 0E 00) // should be unique
alloc(newmem2,$1000,INJECT_MIRA_EXCHANGE_MUL)

//buy
aobscanmodule(INJECT_BUY_ITEM,$process,44 29 B0 DC 42 0E 00) // should be unique
alloc(newmem3,$1000,INJECT_BUY_ITEM)

//get mira
aobscanmodule(INJECT_GET_MIRA,$process,44 8B 80 D4 44 00 00 E8 55) // should be unique
alloc(newmem4,$1000,INJECT_GET_MIRA)

//Start
label(code)
label(return)
label(i_base_mira_addr)
label(vf_mira_sell_mul)

newmem:
  push rax
  lea rax, [rcx+000E42DC]
  mov [i_base_mira_addr], rax
  pop rax

  vmovss xmm14, [vf_mira_sell_mul]
  cvtsi2ss xmm15, edx
  vmulss xmm15, xmm15, xmm14
  cvtss2si edx, xmm15

code:
  add r8d,edx
  mov [rcx+000E42DC],r8d
  jmp return

align 10 cc
  i_base_mira_addr:
  dq 0
  vf_mira_sell_mul:
  dd (float)1.5

INJECT_MIRA_SELL_MULTI:
  jmp newmem
  nop 5
return:
registersymbol(vf_mira_sell_mul)
registersymbol(i_base_mira_addr)
registersymbol(INJECT_MIRA_SELL_MULTI)

//exchange
label(code2)
label(return2)

newmem2:
  push rax
  lea rax, [rcx+000E42DC]
  mov [i_base_mira_addr], rax
  pop rax

  vmovss xmm14, [vf_mira_sell_mul]
  cvtsi2ss xmm15, edi
  vmulss xmm15, xmm15, xmm14
  cvtss2si edi, xmm15

code2:
  add r8d,edi
  mov [rcx+000E42DC],r8d
  jmp return2

INJECT_MIRA_EXCHANGE_MUL:
  jmp newmem2
  nop 5
return2:
registersymbol(INJECT_MIRA_EXCHANGE_MUL)

//buy
label(code3)
label(return3)

newmem3:
  push rbx
  lea rbx, [rax+000E42DC]
  mov [i_base_mira_addr], rbx
  pop rbx

code3:
  sub [rax+000E42DC],r14d
  jmp return3

INJECT_BUY_ITEM:
  jmp newmem3
  nop 2
return3:
registersymbol(INJECT_BUY_ITEM)


//get mira
label(code4)
label(return4)

newmem4:
  push rbx
  lea rbx, [rax+000044D4]
  mov [i_base_mira_addr], rbx
  pop rbx

code4:
  mov r8d,[rax+000044D4]
  jmp return4

INJECT_GET_MIRA:
  jmp newmem4
  nop 2
return4:
registersymbol(INJECT_GET_MIRA)

[DISABLE]

INJECT_MIRA_SELL_MULTI:
  db 44 03 C2 44 89 81 DC 42 0E 00

unregistersymbol(*)
dealloc(newmem)

INJECT_MIRA_EXCHANGE_MUL:
  db 44 03 C7 44 89 81 DC 42 0E 00

unregistersymbol(INJECT_MIRA_EXCHANGE_MUL)
dealloc(newmem2)


INJECT_BUY_ITEM:
  db 44 29 B0 DC 42 0E 00

unregistersymbol(INJECT_BUY_ITEM)
dealloc(newmem3)

INJECT_GET_MIRA:
  db 44 8B 80 D4 44 00 00

unregistersymbol(INJECT_GET_MIRA)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+20766E

ed71_steam.exe+207656: 49 8B C1                       - mov rax,r9
ed71_steam.exe+207659: C3                             - ret 
ed71_steam.exe+20765A: CC                             - int 3 
ed71_steam.exe+20765B: CC                             - int 3 
ed71_steam.exe+20765C: CC                             - int 3 
ed71_steam.exe+20765D: CC                             - int 3 
ed71_steam.exe+20765E: CC                             - int 3 
ed71_steam.exe+20765F: CC                             - int 3 
ed71_steam.exe+207660: 48 8B 0D A1 39 CC 17           - mov rcx,[ed71_steam.exe+17ECB008]
ed71_steam.exe+207667: 44 8B 81 DC 42 0E 00           - mov r8d,[rcx+000E42DC]
// ---------- INJECTING HERE ----------
ed71_steam.exe+20766E: 44 03 C2                       - add r8d,edx
// ---------- DONE INJECTING  ----------
ed71_steam.exe+207671: 44 89 81 DC 42 0E 00           - mov [rcx+000E42DC],r8d
ed71_steam.exe+207678: 41 81 F8 FF E0 F5 05           - cmp r8d,05F5E0FF
ed71_steam.exe+20767F: 7E 10                          - jle ed71_steam.exe+207691
ed71_steam.exe+207681: C7 81 DC 42 0E 00 FF E0 F5 05  - mov [rcx+000E42DC],05F5E0FF
ed71_steam.exe+20768B: 41 B8 FF E0 F5 05              - mov r8d,05F5E0FF
ed71_steam.exe+207691: 41 B9 40 42 0F 00              - mov r9d,000F4240
ed71_steam.exe+207697: B2 0A                          - mov dl,0A
ed71_steam.exe+207699: E9 12 0C F8 FF                 - jmp ed71_steam.exe+1882B0
ed71_steam.exe+20769E: CC                             - int 3 
ed71_steam.exe+20769F: CC                             - int 3 
}

{
ed71_steam.exe+24D05D - 0F29 44 24 60         - movaps [rsp+60],xmm0
ed71_steam.exe+24D062 - F2 0F11 4C 24 70      - movsd [rsp+70],xmm1
ed71_steam.exe+24D068 - C7 44 24 20 FDFFFFFF  - mov [rsp+20],FFFFFFFD
ed71_steam.exe+24D070 - E8 2B320000           - call ed71_steam.exe+2502A0
ed71_steam.exe+24D075 - 85 C0                 - test eax,eax
ed71_steam.exe+24D077 - 0F84 77020000         - je ed71_steam.exe+24D2F4
ed71_steam.exe+24D07D - 48 8B 0D 84DFC717     - mov rcx,[ed71_steam.exe+17ECB008]
ed71_steam.exe+24D084 - 44 8B 81 DC420E00     - mov r8d,[rcx+000E42DC]
ed71_steam.exe+24D08B - 44 03 C7              - add r8d,edi
ed71_steam.exe+24D08E - 44 89 81 DC420E00     - mov [rcx+000E42DC],r8d
ed71_steam.exe+24D095 - 41 81 F8 FFE0F505     - cmp r8d,05F5E0FF
ed71_steam.exe+24D09C - 7E 10                 - jle ed71_steam.exe+24D0AE
ed71_steam.exe+24D09E - C7 81 DC420E00 FFE0F505 - mov [rcx+000E42DC],05F5E0FF
ed71_steam.exe+24D0A8 - 41 B8 FFE0F505        - mov r8d,05F5E0FF
ed71_steam.exe+24D0AE - 41 B9 40420F00        - mov r9d,000F4240
ed71_steam.exe+24D0B4 - B2 0A                 - mov dl,0A

}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>33</ID>
          <Description>"Mira (active: open menu)"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_mira_addr</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>34</ID>
          <Description>"Sell/exchange multiplier"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>vf_mira_sell_mul</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>37</ID>
      <Description>"Buy/Equip/Use item/Cook: stack# &gt;= 70 (may not work if count = 1)"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-11
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_EQUIP_ITEM,$process,41 3B C0 7E 11) // should be unique
alloc(newmem,$1000,INJECT_EQUIP_ITEM)

aobscanmodule(INJECT_UNEQUIP_ITEM,$process,66 41 89 8C 30 12 0E 0E 00 B8) // should be unique
alloc(newmem2,$1000,INJECT_UNEQUIP_ITEM)

label(code)
label(return)
label(i_equip_base_addr)

newmem:
  push rax
  lea rax, [rdx+000E0E12]
  mov [i_equip_base_addr], rax
  pop rax

  cmp ax, [i_min_equip_amount]
  jge code
  mov ax, [i_min_equip_amount]
  mov word ptr [rdx+000E0E12], ax

code:
  cmp eax,r8d
  //jle ed71_steam.exe+207C4E
  reassemble(INJECT_EQUIP_ITEM+3)
  jmp return

align 10 cc
  i_min_equip_amount:
  dw #70
  i_equip_base_addr:
  dq 0

INJECT_EQUIP_ITEM:
  jmp newmem
return:
registersymbol(i_equip_base_addr)
registersymbol(INJECT_EQUIP_ITEM)

label(code2)
label(return2)

newmem2:
  push rax
  lea rax, [r8+rsi+000E0E12]
  mov [i_equip_base_addr], rax
  pop rax

  cmp cx, word ptr [i_min_equip_amount]
  jg code2
  mov cx, word ptr [i_min_equip_amount]

code2:
  mov [r8+rsi+000E0E12],cx
  jmp return2

INJECT_UNEQUIP_ITEM:
  jmp newmem2
  nop 4
return2:
registersymbol(INJECT_UNEQUIP_ITEM)


[DISABLE]

INJECT_EQUIP_ITEM:
  db 41 3B C0 7E 11

unregistersymbol(*)
dealloc(newmem)

INJECT_UNEQUIP_ITEM:
  db 66 41 89 8C 30 12 0E 0E 00

unregistersymbol(INJECT_UNEQUIP_ITEM)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+207C38

ed71_steam.exe+207C1B: CC                    - int 3 
ed71_steam.exe+207C1C: CC                    - int 3 
ed71_steam.exe+207C1D: CC                    - int 3 
ed71_steam.exe+207C1E: CC                    - int 3 
ed71_steam.exe+207C1F: CC                    - int 3 
ed71_steam.exe+207C20: 4C 8B 0D E1 33 CC 17  - mov r9,[ed71_steam.exe+17ECB008]
ed71_steam.exe+207C27: 4C 63 D2              - movsxd  r10,edx
ed71_steam.exe+207C2A: 49 8B CA              - mov rcx,r10
ed71_steam.exe+207C2D: 4B 8D 14 91           - lea rdx,[r9+r10*4]
ed71_steam.exe+207C31: 0F B7 82 12 0E 0E 00  - movzx eax,word ptr [rdx+000E0E12]
// ---------- INJECTING HERE ----------
ed71_steam.exe+207C38: 41 3B C0              - cmp eax,r8d
// ---------- DONE INJECTING  ----------
ed71_steam.exe+207C3B: 7E 11                 - jle ed71_steam.exe+207C4E
ed71_steam.exe+207C3D: 66 41 2B C0           - sub ax,r8w
ed71_steam.exe+207C41: 66 89 82 12 0E 0E 00  - mov [rdx+000E0E12],ax
ed71_steam.exe+207C48: B8 01 00 00 00        - mov eax,00000001
ed71_steam.exe+207C4D: C3                    - ret 
ed71_steam.exe+207C4E: 75 4C                 - jne ed71_steam.exe+207C9C
ed71_steam.exe+207C50: BA 77 06 00 00        - mov edx,00000677
ed71_steam.exe+207C55: 48 3B CA              - cmp rcx,rdx
ed71_steam.exe+207C58: 7D 2F                 - jnl ed71_steam.exe+207C89
ed71_steam.exe+207C5A: 49 8D 81 14 0E 0E 00  - lea rax,[r9+000E0E14]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>46</ID>
          <Description>"Last item amount"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_equip_base_addr</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>47</ID>
          <Description>"Last item ID"</Description>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_equip_base_addr</Address>
          <Offsets>
            <Offset>-2</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>42</ID>
      <Description>"DP"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-12
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_DP_GAIN,$process,01 8A E8 44 00 00) // should be unique
alloc(newmem,$1000,INJECT_DP_GAIN)
aobscanmodule(INJECT_GET_DP_VALUE,$process,44 8B 88 F0 42 0E 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+000044E8]
  mov [i_dp_value_addr], rcx

  mov ecx, dword ptr [i_extra_dp_for_quest]
  add [rdx+000044E8],ecx
  pop rcx

code:
  add [rdx+000044E8],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+000E42F0]
  mov [i_dp_value_addr], rcx
  pop rcx

code2:
  mov r9d,[rax+000E42F0]
  jmp return2

INJECT_GET_DP_VALUE:
  jmp newmem2
  nop 2
return2:
registersymbol(INJECT_GET_DP_VALUE)

[DISABLE]

INJECT_DP_GAIN:
  db 01 8A E8 44 00 00

unregistersymbol(*)
dealloc(newmem)

INJECT_GET_DP_VALUE:
  db 44 8B 88 F0 42 0E 00

unregistersymbol(INJECT_GET_DP_VALUE)
dealloc(newmem2)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+2326D4

ed71_steam.exe+23269F: 8B 80 44 5F 00 00           - mov eax,[rax+00005F44]
ed71_steam.exe+2326A5: 89 81 30 01 00 00           - mov [rcx+00000130],eax
ed71_steam.exe+2326AB: 49 8B 46 20                 - mov rax,[r14+20]
ed71_steam.exe+2326AF: 48 8B 0E                    - mov rcx,[rsi]
ed71_steam.exe+2326B2: 0F B7 80 E8 44 00 00        - movzx eax,word ptr [rax+000044E8]
ed71_steam.exe+2326B9: 66 89 81 80 01 00 00        - mov [rcx+00000180],ax
ed71_steam.exe+2326C0: 49 8B 56 20                 - mov rdx,[r14+20]
ed71_steam.exe+2326C4: 41 0F B6 40 04              - movzx eax,byte ptr [r8+04]
ed71_steam.exe+2326C9: 43 0F BF 8C 91 28 45 00 00  - movsx ecx,word ptr [r9+r10*4+00004528]
ed71_steam.exe+2326D2: 03 C8                       - add ecx,eax
// ---------- INJECTING HERE ----------
ed71_steam.exe+2326D4: 01 8A E8 44 00 00           - add [rdx+000044E8],ecx
// ---------- DONE INJECTING  ----------
ed71_steam.exe+2326DA: 8B 8A E8 44 00 00           - mov ecx,[rdx+000044E8]
ed71_steam.exe+2326E0: 33 DB                       - xor ebx,ebx
ed71_steam.exe+2326E2: 48 8B 06                    - mov rax,[rsi]
ed71_steam.exe+2326E5: 66 89 88 78 01 00 00        - mov [rax+00000178],cx
ed71_steam.exe+2326EC: 8B CB                       - mov ecx,ebx
ed71_steam.exe+2326EE: 4D 8B 5E 20                 - mov r11,[r14+20]
ed71_steam.exe+2326F2: 8B C3                       - mov eax,ebx
ed71_steam.exe+2326F4: 41 8B 93 E8 44 00 00        - mov edx,[r11+000044E8]
ed71_steam.exe+2326FB: 0F 1F 44 00 00              - nop dword ptr [rax+rax+00]
ed71_steam.exe+232700: 3B 54 84 78                 - cmp edx,[rsp+rax*4+78]
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>43</ID>
          <Description>"Cur. DP (Open DP menu)"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <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>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_extra_dp_for_quest</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>55</ID>
      <Description>"Teleport: the same map (***do not lock these values)"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-12
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_GET_SET_LOC,$process,0F 10 B3 80 00 00 00 49) // should be unique
alloc(newmem,$1000,INJECT_GET_SET_LOC)

label(code)
label(return)
label(is_store_pair1)
label(is_teleport_pair_1)
label(pair1_x)
label(pair1_y)
label(pair1_z)
label(is_store_pair2)
label(is_teleport_pair_2)
label(pair2_x)
label(pair2_y)
label(pair2_z)
label(is_store_pair3)
label(is_teleport_pair_3)
label(pair3_x)
label(pair3_y)
label(pair3_z)


{
  vmovss xmm14, [rbx+00000080] X
  vmovss xmm15, [rbx+00000084] Y
  vmovss xmm13, [rbx+00000088] Z
}


newmem:
  cmp dword ptr [is_store_pair1], 1
  jne @F
  mov dword ptr [is_store_pair1], 0
  vmovss xmm14, [rbx+00000080]
  vmovss xmm15, [rbx+00000084]
  vmovss xmm13, [rbx+00000088]
  vmovss [pair1_x], xmm14
  vmovss [pair1_y], xmm15
  vmovss [pair1_z], xmm13
  jmp code

@@:
  cmp dword ptr [is_store_pair2], 1
  jne @F
  mov dword ptr [is_store_pair2], 0
  vmovss xmm14, [rbx+00000080]
  vmovss xmm15, [rbx+00000084]
  vmovss xmm13, [rbx+00000088]
  vmovss [pair2_x], xmm14
  vmovss [pair2_y], xmm15
  vmovss [pair2_z], xmm13
  jmp code

@@:
  cmp dword ptr [is_store_pair3], 1
  jne @F
  mov dword ptr [is_store_pair3], 0
  vmovss xmm14, [rbx+00000080]
  vmovss xmm15, [rbx+00000084]
  vmovss xmm13, [rbx+000000880]
  vmovss [pair3_x], xmm14
  vmovss [pair3_y], xmm15
  vmovss [pair3_z], xmm13
  jmp code

@@:
  cmp dword ptr [is_teleport_pair_1], 1
  jne @F
  mov dword ptr [is_teleport_pair_1], 0
  vmovss xmm14, [pair1_x]
  vmovss xmm15, [pair1_y]
  vmovss xmm13, [pair1_z]
  vmovss xmm12, [vf_001]
  vaddss xmm13, xmm13, xmm12
  vmovss [rbx+00000080], xmm14
  vmovss [rbx+00000084], xmm15
  vmovss [rbx+00000088], xmm13
  jmp code

@@:
  cmp dword ptr [is_teleport_pair_2], 1
  jne @F
  mov dword ptr [is_teleport_pair_2], 0
  vmovss xmm14, [pair2_x]
  vmovss xmm15, [pair2_y]
  vmovss xmm13, [pair2_z]
  vmovss xmm12, [vf_001]
  vaddss xmm13, xmm13, xmm12
  vmovss [rbx+00000080], xmm14
  vmovss [rbx+00000084], xmm15
  vmovss [rbx+00000088], xmm13
  jmp code

@@:
  cmp dword ptr [is_teleport_pair_3], 1
  jne @F
  mov dword ptr [is_teleport_pair_3], 0
  vmovss xmm14, [pair3_x]
  vmovss xmm15, [pair3_y]
  vmovss xmm13, [pair3_z]
  vmovss xmm12, [vf_001]
  vaddss xmm13, xmm13, xmm12
  vmovss [rbx+00000080], xmm14
  vmovss [rbx+00000084], xmm15
  vmovss [rbx+00000088], xmm13
  jmp code

endp:

code:
  movups xmm6,[rbx+00000080]
  jmp return

align 10 cc
  is_store_pair1:
  dd 0
  is_store_pair2:
  dd 0
  is_store_pair3:
  dd 0
  is_teleport_pair_1:
  dd 0
  is_teleport_pair_2:
  dd 0
  is_teleport_pair_3:
  dd 0
  pair1_x:
  dd 0
  pair1_y:
  dd 0
  pair1_z:
  dd 0
  pair2_x:
  dd 0
  pair2_y:
  dd 0
  pair2_z:
  dd 0
  pair3_x:
  dd 0
  pair3_y:
  dd 0
  pair3_z:
  dd 0
  vf_001:
  dd (float)0.01

INJECT_GET_SET_LOC:
  jmp newmem
  nop 2
return:

registersymbol(is_store_pair1)
registersymbol(is_store_pair2)
registersymbol(is_teleport_pair_1)
registersymbol(is_teleport_pair_2)
registersymbol(pair1_x)
registersymbol(pair1_y)
registersymbol(pair1_z)
registersymbol(pair2_x)
registersymbol(pair2_y)
registersymbol(pair2_z)
registersymbol(is_store_pair3)
registersymbol(is_teleport_pair_3)
registersymbol(pair3_x)
registersymbol(pair3_y)
registersymbol(pair3_z)
registersymbol(INJECT_GET_SET_LOC)

[DISABLE]

INJECT_GET_SET_LOC:
  db 0F 10 B3 80 00 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+1FCD5D

ed71_steam.exe+1FCD32: 41 89 4F 20                 - mov [r15+20],ecx
ed71_steam.exe+1FCD36: 8B 48 28                    - mov ecx,[rax+28]
ed71_steam.exe+1FCD39: 41 89 4F 1C                 - mov [r15+1C],ecx
ed71_steam.exe+1FCD3D: 8B 48 10                    - mov ecx,[rax+10]
ed71_steam.exe+1FCD40: 89 8B 80 00 00 00           - mov [rbx+00000080],ecx
ed71_steam.exe+1FCD46: 8B 40 14                    - mov eax,[rax+14]
ed71_steam.exe+1FCD49: 89 83 84 00 00 00           - mov [rbx+00000084],eax
ed71_steam.exe+1FCD4F: E9 A9 02 00 00              - jmp ed71_steam.exe+1FCFFD
ed71_steam.exe+1FCD54: 45 85 E4                    - test r12d,r12d
ed71_steam.exe+1FCD57: 0F 85 C9 00 00 00           - jne ed71_steam.exe+1FCE26
// ---------- INJECTING HERE ----------
ed71_steam.exe+1FCD5D: 0F 10 B3 80 00 00 00        - movups xmm6,[rbx+00000080]
// ---------- DONE INJECTING  ----------
ed71_steam.exe+1FCD64: 49 8B D7                    - mov rdx,r15
ed71_steam.exe+1FCD67: 48 8B CF                    - mov rcx,rdi
ed71_steam.exe+1FCD6A: E8 21 03 03 00              - call ed71_steam.exe+22D090
ed71_steam.exe+1FCD6F: 45 33 C0                    - xor r8d,r8d
ed71_steam.exe+1FCD72: 48 8B D3                    - mov rdx,rbx
ed71_steam.exe+1FCD75: 48 8B CF                    - mov rcx,rdi
ed71_steam.exe+1FCD78: E8 43 FF 02 00              - call ed71_steam.exe+22CCC0
ed71_steam.exe+1FCD7D: 65 48 8B 0C 25 58 00 00 00  - mov rcx,gs:[00000058]
ed71_steam.exe+1FCD86: 44 8B F0                    - mov r14d,eax
ed71_steam.exe+1FCD89: B8 04 00 00 00              - mov eax,00000004
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>67</ID>
          <Description>"**Warning: buggy"</Description>
          <Color>400080</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>56</ID>
          <Description>"Store into Set #1?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_store_pair1</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>57</ID>
          <Description>"Store into Set #2?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_store_pair2</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>68</ID>
          <Description>"Store into Set #3?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_store_pair3</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>58</ID>
          <Description>"Teleport to Set #1?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_teleport_pair_1</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>59</ID>
          <Description>"Teleport to Set #2?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_teleport_pair_2</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>69</ID>
          <Description>"Teleport to Set #3?"</Description>
          <DropDownListLink>Full EP?</DropDownListLink>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_teleport_pair_3</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>60</ID>
          <Description>"Set #1.X"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair1_x</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>61</ID>
          <Description>"Set #1.Y"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair1_y</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>65</ID>
          <Description>"Set #1.Z"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair1_z</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>62</ID>
          <Description>"Set #2.X"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair2_x</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>63</ID>
          <Description>"Set #2.Y"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair2_y</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>66</ID>
          <Description>"Set #2.Z"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair2_z</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>70</ID>
          <Description>"Set #3.X"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair3_x</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>71</ID>
          <Description>"Set #3.Y"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair3_y</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>72</ID>
          <Description>"Set #3.Z"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>pair3_z</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>86</ID>
      <Description>"Coords info (not valid in Eng/Jpn version)"</Description>
      <Options moHideChildren="1"/>
      <Color>808080</Color>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>52</ID>
          <Description>"Coord: X"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>Float</VariableType>
          <Address>ed71_steam.exe+17F900E0</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>53</ID>
          <Description>"Coord: Y"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>Float</VariableType>
          <Address>ed71_steam.exe+17F900E4</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>64</ID>
          <Description>"Coord: Z"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>808080</Color>
          <VariableType>Float</VariableType>
          <Address>ed71_steam.exe+17F900E8</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>79</ID>
      <Description>"Preemptive attack / battle count"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : ed71_steam.exe
  Version: 
  Date   : 2022-04-13
  Author : bbfox @ https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_PREEMPTIVE_ATTACK_CNT,$process,F2 0F 10 87 C0 62 00 00) // should be unique
alloc(newmem,$1000,INJECT_PREEMPTIVE_ATTACK_CNT)

label(code)
label(return)
label(i_pree_basse_addr)

newmem:
  push rax
  lea rax, [rdi+000062C0]
  mov [i_pree_basse_addr], rax
  pop rax

code:
  movsd xmm0,[rdi+000062C0]
  jmp return

align 10 cc
  i_pree_basse_addr:
  dq 0

INJECT_PREEMPTIVE_ATTACK_CNT:
  jmp newmem
  nop 3
return:
registersymbol(i_pree_basse_addr)
registersymbol(INJECT_PREEMPTIVE_ATTACK_CNT)

[DISABLE]

INJECT_PREEMPTIVE_ATTACK_CNT:
  db F2 0F 10 87 C0 62 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: ed71_steam.exe+119851

ed71_steam.exe+11981A: 89 44 24 60              - mov [rsp+60],eax
ed71_steam.exe+11981E: 0F 10 87 80 51 00 00     - movups xmm0,[rdi+00005180]
ed71_steam.exe+119825: 0F 11 49 60              - movups [rcx+60],xmm1
ed71_steam.exe+119829: 0F 11 45 90              - movups [rbp-70],xmm0
ed71_steam.exe+11982D: 0F 10 87 90 51 00 00     - movups xmm0,[rdi+00005190]
ed71_steam.exe+119834: 0F 11 45 A0              - movups [rbp-60],xmm0
ed71_steam.exe+119838: F2 0F 10 87 A0 51 00 00  - movsd xmm0,[rdi+000051A0]
ed71_steam.exe+119840: F2 0F 11 44 24 78        - movsd [rsp+78],xmm0
ed71_steam.exe+119846: 0F 10 87 B0 62 00 00     - movups xmm0,[rdi+000062B0]
ed71_steam.exe+11984D: 0F 11 45 B0              - movups [rbp-50],xmm0
// ---------- INJECTING HERE ----------
ed71_steam.exe+119851: F2 0F 10 87 C0 62 00 00  - movsd xmm0,[rdi+000062C0]
// ---------- DONE INJECTING  ----------
ed71_steam.exe+119859: F2 0F 11 45 80           - movsd [rbp-80],xmm0
ed71_steam.exe+11985E: 0F 10 87 BC 60 00 00     - movups xmm0,[rdi+000060BC]
ed71_steam.exe+119865: 0F 11 44 24 40           - movups [rsp+40],xmm0
ed71_steam.exe+11986A: F2 0F 10 87 CC 60 00 00  - movsd xmm0,[rdi+000060CC]
ed71_steam.exe+119872: F2 0F 11 45 88           - movsd [rbp-78],xmm0
ed71_steam.exe+119877: 75 21                    - jne ed71_steam.exe+11989A
ed71_steam.exe+119879: 48 8B CB                 - mov rcx,rbx
ed71_steam.exe+11987C: E8 9F F2 FF FF           - call ed71_steam.exe+118B20
ed71_steam.exe+119881: 84 C0                    - test al,al
ed71_steam.exe+119883: 75 15                    - jne ed71_steam.exe+11989A
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>84</ID>
          <Description>"Battle count"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_pree_basse_addr</Address>
          <Offsets>
            <Offset>-C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>80</ID>
          <Description>"Preemptive Count"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_pree_basse_addr</Address>
          <Offsets>
            <Offset>0</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>82</ID>
          <Description>"S-Break?"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_pree_basse_addr</Address>
          <Offsets>
            <Offset>-4</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>81</ID>
          <Description>"??"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_pree_basse_addr</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>83</ID>
          <Description>"??"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>2 Bytes</VariableType>
          <Address>i_pree_basse_addr</Address>
          <Offsets>
            <Offset>-8</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>85</ID>
      <Description>"英雄傳說 零之軌跡：改  / https://opencheattables.com"</Description>
      <Color>00A200</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>
