<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="46">
  <CheatEntries>
    <CheatEntry>
      <ID>1</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>42</ID>
      <Description>"Toggle scripts (auto attach)"</Description>
      <Color>4080FF</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript Async="1">[ENABLE]
{$lua}
if (syntaxcheck) then return end
synchronize(function()
  getLuaEngine().menuItem5.doClick()
  getLuaEngine().Close()
end)

-- attach process
local processName = "DQIandIIHD2DRemake.exe"
local pid = getProcessIDFromProcessName(processName)
if pid ~= nil and pid &gt; 0 then
  local currentPid = getOpenedProcessID() or 0
  if currentPid ~= pid then
    openProcess(processName)
    print("Attached to: " .. processName)
    Sleep(333)
  else
    print("Already attached to: " .. processName)
  end
end
synchronize(function()
  getLuaEngine().Close()
end)

local enableBattleScripts = {
  1, -- "Toggle Compact View"
  2, -- "Get gold"
  8, -- "Browse and set item amount"
  12, -- "Battle: inf MP"
  16, -- "Char viewer"
  35, -- "Field: browse usable spell and restore MP"
  36, -- "Field: MP no decrease after casting"
  37, -- "Field trap: zero damage"
  38, -- "Longer holy protection / holy water duration"
  47, -- "Longer stealth duration"
}
local addressList = getAddressList()
synchronize(function()
  for _, id in ipairs(enableBattleScripts) do
    local memRec = addressList.getMemoryRecordByID(id)
    if memRec and not memRec.Active then
      memRec.Active = true
      sleep(30)
    end
    addressList.refresh()
  end
end)
synchronize(function() getLuaEngine().Close() end)
[DISABLE]
{$lua}
if (syntaxcheck) then return end
synchronize(function()
  getLuaEngine().menuItem5.doClick()
  getLuaEngine().Close()
end)

local disableBattleScripts = {
  68, -- "Enemy Max HP must &lt;="
  64, -- "Battle: Keep alive"
  47, -- "Longer stealth duration"
  15, -- "Enemy fast kill"
  67, -- "Fast LV-up"
  59, -- "[DQ2] inf. spin the lottery drum / item use"
  51, -- "[DQ2] Get some stats (achievement related?)"
  41, -- "DRAGON QUEST I &amp; II HD-2D Remake  /  https://openchetatables.com"
  38, -- "Longer holy protection / holy water duration"
  37, -- "Field trap: zero damage"
  36, -- "Field: MP no decrease after casting"
  35, -- "Field: browse usable spell and restore MP"
  16, -- "Char viewer"
  13, -- "Battle: HP options"
  12, -- "Battle: inf MP"
  8, -- "Browse and set item amount"
  2, -- "Get gold"
  1, -- "Toggle Compact View"
}
local addressList = getAddressList()
synchronize(function()
  for _, id in ipairs(disableBattleScripts) do
    local memRec = addressList.getMemoryRecordByID(id)
    if memRec and memRec.Active then
      memRec.Active = false
      sleep(30)
    end
    addressList.refresh()
  end
end)
synchronize(function() getLuaEngine().Close() end)
-- Comments:
-- ID: 1, Description: "Toggle Compact View", Depth: 0
-- ID: 2, Description: "Get gold", Depth: 0
-- ID: 8, Description: "Browse and set item amount", Depth: 0
-- ID: 12, Description: "Battle: inf MP", Depth: 0
-- ID: 13, Description: "Battle: HP options", Depth: 0
--   ID: 15, Description: "Enemy fast kill", Depth: 1
--     ID: 68, Description: "Enemy Max HP must &lt;=", Depth: 2
-- ID: 67, Description: "Fast LV-up", Depth: 0
-- ID: 35, Description: "Field: browse usable spell and restore MP", Depth: 0
-- ID: 36, Description: "Field: MP no decrease after casting", Depth: 0
-- ID: 37, Description: "Field trap: zero damage", Depth: 0
-- ID: 38, Description: "Longer holy protection / holy water duration", Depth: 0
--   ID: 47, Description: "Longer stealth duration", Depth: 1
-- ID: 16, Description: "Char viewer", Depth: 0
-- ID: 51, Description: "[DQ2] Get some stats (achievement related?)", Depth: 0
-- ID: 59, Description: "[DQ2] inf. spin the lottery drum / item use", Depth: 0
-- ID: 41, Description: "DRAGON QUEST I &amp; II HD-2D Remake  /  https://openchetatables.com", Depth: 0
--   ID: 64, Description: "Battle: Keep alive", Depth: 1


</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>2</ID>
      <Description>"Get gold"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_GET_MONEY,$process,8B 51 28 48 8B 4B 38) // should be unique
alloc(newmem,$100,INJECT_GET_MONEY)

label(code)
label(return i_base_money_addr)

newmem:
  mov [i_base_money_addr], rcx

code:
  mov edx,[rcx+28]
  mov rcx,[rbx+38]
  jmp return
align 10 cc
  i_base_money_addr:
  dq 0

INJECT_GET_MONEY:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_GET_MONEY i_base_money_addr)

[DISABLE]

INJECT_GET_MONEY:
  db 8B 51 28 48 8B 4B 38

unregistersymbol(INJECT_GET_MONEY i_base_money_addr)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+12D3836

DQIandIIHD2DRemake.exe+12D3812: 48 83 EC 20           - sub rsp,20
DQIandIIHD2DRemake.exe+12D3816: 41 B0 01              - mov r8b,01
DQIandIIHD2DRemake.exe+12D3819: 48 8B D9              - mov rbx,rcx
DQIandIIHD2DRemake.exe+12D381C: 48 8B 49 30           - mov rcx,[rcx+30]
DQIandIIHD2DRemake.exe+12D3820: 41 0F B6 D0           - movzx edx,r8b
DQIandIIHD2DRemake.exe+12D3824: E8 07 E1 0F 00        - call DQIandIIHD2DRemake.exe+13D1930
DQIandIIHD2DRemake.exe+12D3829: E8 12 05 DA FF        - call DQIandIIHD2DRemake.exe+1073D40
DQIandIIHD2DRemake.exe+12D382E: 48 8B 08              - mov rcx,[rax]
DQIandIIHD2DRemake.exe+12D3831: 48 85 C9              - test rcx,rcx
DQIandIIHD2DRemake.exe+12D3834: 74 2F                 - je DQIandIIHD2DRemake.exe+12D3865
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+12D3836: 8B 51 28              - mov edx,[rcx+28]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+12D3839: 48 8B 4B 38           - mov rcx,[rbx+38]
DQIandIIHD2DRemake.exe+12D383D: E8 CE CF 11 00        - call DQIandIIHD2DRemake.exe+13F0810
DQIandIIHD2DRemake.exe+12D3842: 41 B8 01 00 00 00     - mov r8d,00000001
DQIandIIHD2DRemake.exe+12D3848: 48 8D 15 99 35 E0 02  - lea rdx,[DQIandIIHD2DRemake.exe+40D6DE8]
DQIandIIHD2DRemake.exe+12D384F: 48 8D 4C 24 30        - lea rcx,[rsp+30]
DQIandIIHD2DRemake.exe+12D3854: E8 D7 21 39 00        - call DQIandIIHD2DRemake.exe+1665A30
DQIandIIHD2DRemake.exe+12D3859: 48 8B 4B 40           - mov rcx,[rbx+40]
DQIandIIHD2DRemake.exe+12D385D: 48 8B 10              - mov rdx,[rax]
DQIandIIHD2DRemake.exe+12D3860: E8 CB C4 11 00        - call DQIandIIHD2DRemake.exe+13EFD30
DQIandIIHD2DRemake.exe+12D3865: 48 83 C4 20           - add rsp,20
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>3</ID>
          <Description>"Gold"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>28</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>4</ID>
          <Description>"Total gold earned"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>2C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>5</ID>
          <Description>"Mini medal"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>34</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>48</ID>
          <Description>"Mini medal earned"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>38</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>49</ID>
          <Description>"??"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>44</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>6</ID>
          <Description>"# of mob kills"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>130</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>7</ID>
          <Description>"# of battles"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_money_addr</Address>
          <Offsets>
            <Offset>134</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>8</ID>
      <Description>"Browse and set item amount"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_BROWSE_ITEM_AND_SET_CNT,$process,41 8B 00 C3 CC) // should be unique
alloc(newmem,$100,INJECT_BROWSE_ITEM_AND_SET_CNT)

label(code)
label(return i_set_item_cnt_to i_set_item_cnt_min)

newmem:
  mov eax, [i_set_item_cnt_min]
  cmp dword ptr [r8], eax
  jb code
  mov eax, [i_set_item_cnt_to]
  cmp [r8], eax
  jae code
  mov [r8], eax

code:
  mov eax,[r8]
  ret 
  int 3 
  jmp return
align 10 cc
  i_set_item_cnt_to:
  dd 32
  i_set_item_cnt_min:
  dd 2

INJECT_BROWSE_ITEM_AND_SET_CNT:
  jmp newmem
return:
registersymbol(INJECT_BROWSE_ITEM_AND_SET_CNT i_set_item_cnt_to i_set_item_cnt_min)

[DISABLE]

INJECT_BROWSE_ITEM_AND_SET_CNT:
  db 41 8B 00 C3 CC

unregistersymbol(INJECT_BROWSE_ITEM_AND_SET_CNT i_set_item_cnt_to)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: INJECT_BROWSE_ITEM_AND_SET_CNT

DQIandIIHD2DRemake.exe+10A0277: 44 39 5A 08  - cmp [rdx+08],r11d
DQIandIIHD2DRemake.exe+10A027B: 75 09        - jne DQIandIIHD2DRemake.exe+10A0286
DQIandIIHD2DRemake.exe+10A027D: 41 8B 4A 04  - mov ecx,[r10+04]
DQIandIIHD2DRemake.exe+10A0281: 39 4A 0C     - cmp [rdx+0C],ecx
DQIandIIHD2DRemake.exe+10A0284: 74 0C        - je INJECT_BROWSE_ITEM_AND_SET_CNT
DQIandIIHD2DRemake.exe+10A0286: 48 83 C0 10  - add rax,10
DQIandIIHD2DRemake.exe+10A028A: 49 3B C1     - cmp rax,r9
DQIandIIHD2DRemake.exe+10A028D: 75 E1        - jne DQIandIIHD2DRemake.exe+10A0270
DQIandIIHD2DRemake.exe+10A028F: 33 C0        - xor eax,eax
DQIandIIHD2DRemake.exe+10A0291: C3           - ret
// ---------- INJECTING HERE ----------
INJECT_BROWSE_ITEM_AND_SET_CNT: 41 8B 00     - mov eax,[r8]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+10A0295: C3           - ret
DQIandIIHD2DRemake.exe+10A0296: CC           - int 3
DQIandIIHD2DRemake.exe+10A0297: CC           - int 3
DQIandIIHD2DRemake.exe+10A0298: CC           - int 3
DQIandIIHD2DRemake.exe+10A0299: CC           - int 3
DQIandIIHD2DRemake.exe+10A029A: CC           - int 3
DQIandIIHD2DRemake.exe+10A029B: CC           - int 3
DQIandIIHD2DRemake.exe+10A029C: CC           - int 3
DQIandIIHD2DRemake.exe+10A029D: CC           - int 3
DQIandIIHD2DRemake.exe+10A029E: CC           - int 3
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>9</ID>
          <Description>"Notice: affects import item too, be careful!"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>10</ID>
          <Description>"Item amount must &gt;="</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_set_item_cnt_min</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>11</ID>
          <Description>"Set to"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_set_item_cnt_to</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>12</ID>
      <Description>"Battle: inf MP"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_INF_MP,$process,3B D0 0F 4C C2 89 81 AC) // should be unique
alloc(newmem,$1000,INJECT_INF_MP)

label(code)
label(return)

newmem:
  cmp dword ptr [rcx+00000190], 0
  je code
  cmp dword ptr [rcx+000001E0], 0
  jne code

  cmp edx,eax
  cmovg eax,edx
  jmp return

code:
  cmp edx,eax
  cmovl eax,edx
  jmp return

INJECT_INF_MP:
  jmp newmem
return:
registersymbol(INJECT_INF_MP)

[DISABLE]

INJECT_INF_MP:
  db 3B D0 0F 4C C2

unregistersymbol(INJECT_INF_MP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+F3C805

DQIandIIHD2DRemake.exe+F3C7EB: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C7EC: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C7ED: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C7EE: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C7EF: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C7F0: 85 D2                          - test edx,edx
DQIandIIHD2DRemake.exe+F3C7F2: 79 0B                          - jns DQIandIIHD2DRemake.exe+F3C7FF
DQIandIIHD2DRemake.exe+F3C7F4: C7 81 AC 01 00 00 00 00 00 00  - mov [rcx+000001AC],00000000
DQIandIIHD2DRemake.exe+F3C7FE: C3                             - ret 
DQIandIIHD2DRemake.exe+F3C7FF: 8B 81 A8 01 00 00              - mov eax,[rcx+000001A8]
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+F3C805: 3B D0                          - cmp edx,eax
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+F3C807: 0F 4C C2                       - cmovl eax,edx
DQIandIIHD2DRemake.exe+F3C80A: 89 81 AC 01 00 00              - mov [rcx+000001AC],eax
DQIandIIHD2DRemake.exe+F3C810: C3                             - ret 
DQIandIIHD2DRemake.exe+F3C811: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C812: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C813: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C814: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C815: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C816: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C817: CC                             - int 3 
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>13</ID>
      <Description>"Battle: HP options"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://openchetatables.com
}

[ENABLE]

aobscanmodule(INJECT_BATTLE_HP,$process,89 81 A4 01 00 00 C3) // should be unique
alloc(newmem,$1000,INJECT_BATTLE_HP)

label(code)
label(return)
label(vf_min_hp_pct i_enemy_hp_option is_check_dq2_flag i_min_enemy_hp_check_for_1hk i_last_enemy_addr)
newmem:
  cmp dword ptr [rcx+00000190], 0
  je to_enemy
  cmp dword ptr [rcx+000001E0], 0
  jne to_enemy

  cmp dword ptr [is_check_dq2_flag], 1
  jne @F
  cmp dword ptr [rcx+000001CC], 0
  jne to_enemy

@@:
  push rdx
  mov edx, [rcx+000001A0]
  vcvtsi2ss xmm15, xmm15, edx
  vmovss xmm14, [vf_min_hp_pct]
  vmulss xmm14, xmm14, xmm15
  vcvtss2si edx, xmm14
  cmp eax, edx
  cmovl eax, edx

endp:
  pop rdx

  jmp code

to_enemy:
  mov [i_last_enemy_addr], rcx
  cmp dword ptr [i_enemy_hp_option], 0
  je code

  push rbx
  mov ebx, [i_min_enemy_hp_check_for_1hk]
  cmp [rcx+000001A0], ebx
  pop rbx
  jae code

  cmp eax, 1
  jbe code
  mov eax, 1

code:
  mov [rcx+000001A4],eax
  jmp return
align 10 cc
  vf_min_hp_pct:
  dd (float)0.49
  i_enemy_hp_option:
  dd 0
  is_check_dq2_flag:
  dd 0
  i_min_enemy_hp_check_for_1hk:
  dd #1000
  i_last_enemy_addr:
  dq 0

INJECT_BATTLE_HP:
  jmp newmem
  nop
return:
registersymbol(INJECT_BATTLE_HP)
registersymbol(vf_min_hp_pct i_enemy_hp_option is_check_dq2_flag i_min_enemy_hp_check_for_1hk i_last_enemy_addr)
[DISABLE]

INJECT_BATTLE_HP:
  db 89 81 A4 01 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+F3C69A

DQIandIIHD2DRemake.exe+F3C67D: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67E: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67F: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C680: 85 D2                          - test edx,edx
DQIandIIHD2DRemake.exe+F3C682: 79 0B                          - jns DQIandIIHD2DRemake.exe+F3C68F
DQIandIIHD2DRemake.exe+F3C684: C7 81 A4 01 00 00 00 00 00 00  - mov [rcx+000001A4],00000000
DQIandIIHD2DRemake.exe+F3C68E: C3                             - ret 
DQIandIIHD2DRemake.exe+F3C68F: 8B 81 A0 01 00 00              - mov eax,[rcx+000001A0]
DQIandIIHD2DRemake.exe+F3C695: 3B D0                          - cmp edx,eax
DQIandIIHD2DRemake.exe+F3C697: 0F 4C C2                       - cmovl eax,edx
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+F3C69A: 89 81 A4 01 00 00              - mov [rcx+000001A4],eax
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+F3C6A0: C3                             - ret 
DQIandIIHD2DRemake.exe+F3C6A1: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A2: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A3: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A4: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A5: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A6: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A7: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A8: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A9: CC                             - int 3 
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>57</ID>
          <Description>"extra checks for DQ2?"</Description>
          <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>is_check_dq2_flag</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>14</ID>
          <Description>"min. HP ratio"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>vf_min_hp_pct</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>15</ID>
          <Description>"Enemy fast kill"</Description>
          <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_enemy_hp_option</Address>
          <CheatEntries>
            <CheatEntry>
              <ID>68</ID>
              <Description>"Enemy Max HP must &lt;="</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_min_enemy_hp_check_for_1hk</Address>
              <CheatEntries>
                <CheatEntry>
                  <ID>69</ID>
                  <Description>"Max HP"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>FF8080</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_last_enemy_addr</Address>
                  <Offsets>
                    <Offset>1A0</Offset>
                  </Offsets>
                </CheatEntry>
                <CheatEntry>
                  <ID>70</ID>
                  <Description>"HP"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>FF8080</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_last_enemy_addr</Address>
                  <Offsets>
                    <Offset>1A4</Offset>
                  </Offsets>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>67</ID>
      <Description>"Fast LV-up"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-11-08
  Author :
}

[ENABLE]

aobscanmodule(INJECT_FAST_LV_UP,$process,4C 8B AC 24 E8 00 00 00 41 0F) // should be unique
alloc(newmem,$1000,INJECT_FAST_LV_UP)

label(code)
label(return)

newmem:
  mov [rbx+20], eax

code:
  mov r13,[rsp+000000E8]
  jmp return

INJECT_FAST_LV_UP:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_FAST_LV_UP)

[DISABLE]

INJECT_FAST_LV_UP:
  db 4C 8B AC 24 E8 00 00 00

unregistersymbol(INJECT_FAST_LV_UP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+F2981E

DQIandIIHD2DRemake.exe+F297EB: 49 8B 4F 38              - mov rcx,[r15+38]
DQIandIIHD2DRemake.exe+F297EF: 49 8B 5F 68              - mov rbx,[r15+68]
DQIandIIHD2DRemake.exe+F297F3: 0F B6 91 BA 00 00 00     - movzx edx,byte ptr [rcx+000000BA]
DQIandIIHD2DRemake.exe+F297FA: 48 8B CB                 - mov rcx,rbx
DQIandIIHD2DRemake.exe+F297FD: E8 EE 85 17 00           - call DQIandIIHD2DRemake.exe+10A1DF0
DQIandIIHD2DRemake.exe+F29802: 41 BD 00 00 00 00        - mov r13d,00000000
DQIandIIHD2DRemake.exe+F29808: 3B 43 20                 - cmp eax,[rbx+20]
DQIandIIHD2DRemake.exe+F2980B: 0F 8E AF FD FF FF        - jng DQIandIIHD2DRemake.exe+F295C0
DQIandIIHD2DRemake.exe+F29811: 44 0F B6 75 67           - movzx r14d,byte ptr [rbp+67]
DQIandIIHD2DRemake.exe+F29816: 4C 8B A4 24 F0 00 00 00  - mov r12,[rsp+000000F0]
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+F2981E: 4C 8B AC 24 E8 00 00 00  - mov r13,[rsp+000000E8]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+F29826: 41 0F B6 C6              - movzx eax,r14b
DQIandIIHD2DRemake.exe+F2982A: 48 8B BC 24 F8 00 00 00  - mov rdi,[rsp+000000F8]
DQIandIIHD2DRemake.exe+F29832: 48 8B 9C 24 28 01 00 00  - mov rbx,[rsp+00000128]
DQIandIIHD2DRemake.exe+F2983A: 45 88 B7 A0 06 00 00     - mov [r15+000006A0],r14b
DQIandIIHD2DRemake.exe+F29841: 4C 8B B4 24 E0 00 00 00  - mov r14,[rsp+000000E0]
DQIandIIHD2DRemake.exe+F29849: 48 81 C4 00 01 00 00     - add rsp,00000100
DQIandIIHD2DRemake.exe+F29850: 41 5F                    - pop r15
DQIandIIHD2DRemake.exe+F29852: 5E                       - pop rsi
DQIandIIHD2DRemake.exe+F29853: 5D                       - pop rbp
DQIandIIHD2DRemake.exe+F29854: C3                       - ret 
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>35</ID>
      <Description>"Field: browse usable spell and restore MP"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://openchetatables.com
}

[ENABLE]

aobscanmodule(INJECT_FIELD_BROWSE_HEAL_SPELL,$process,8B 50 34 39 56 14) // should be unique
alloc(newmem,$1000,INJECT_FIELD_BROWSE_HEAL_SPELL)

label(code)
label(return)

newmem:
  mov edx,[rax+30]
  mov [rax+34], edx
code:
  //mov edx,[rax+34]
  cmp [rsi+14],edx
  jmp return

INJECT_FIELD_BROWSE_HEAL_SPELL:
  jmp newmem
  nop
return:
registersymbol(INJECT_FIELD_BROWSE_HEAL_SPELL)

[DISABLE]

INJECT_FIELD_BROWSE_HEAL_SPELL:
  db 8B 50 34 39 56 14

unregistersymbol(INJECT_FIELD_BROWSE_HEAL_SPELL)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+12F0670

DQIandIIHD2DRemake.exe+12F0650: 8D 55 04           - lea edx,[rbp+04]
DQIandIIHD2DRemake.exe+12F0653: E8 58 4C DB FF     - call DQIandIIHD2DRemake.exe+10A52B0
DQIandIIHD2DRemake.exe+12F0658: 84 C0              - test al,al
DQIandIIHD2DRemake.exe+12F065A: 75 5F              - jne DQIandIIHD2DRemake.exe+12F06BB
DQIandIIHD2DRemake.exe+12F065C: 48 8B 4B 58        - mov rcx,[rbx+58]
DQIandIIHD2DRemake.exe+12F0660: 8D 55 10           - lea edx,[rbp+10]
DQIandIIHD2DRemake.exe+12F0663: E8 48 4C DB FF     - call DQIandIIHD2DRemake.exe+10A52B0
DQIandIIHD2DRemake.exe+12F0668: 84 C0              - test al,al
DQIandIIHD2DRemake.exe+12F066A: 75 4F              - jne DQIandIIHD2DRemake.exe+12F06BB
DQIandIIHD2DRemake.exe+12F066C: 48 8B 43 58        - mov rax,[rbx+58]
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+12F0670: 8B 50 34           - mov edx,[rax+34]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+12F0673: 39 56 14           - cmp [rsi+14],edx
DQIandIIHD2DRemake.exe+12F0676: 7F 43              - jg DQIandIIHD2DRemake.exe+12F06BB
DQIandIIHD2DRemake.exe+12F0678: E8 63 90 DE FF     - call DQIandIIHD2DRemake.exe+10D96E0
DQIandIIHD2DRemake.exe+12F067D: 33 D2              - xor edx,edx
DQIandIIHD2DRemake.exe+12F067F: 48 8B CE           - mov rcx,rsi
DQIandIIHD2DRemake.exe+12F0682: E8 E9 FA BB FF     - call DQIandIIHD2DRemake.exe+EB0170
DQIandIIHD2DRemake.exe+12F0687: 48 8B D8           - mov rbx,rax
DQIandIIHD2DRemake.exe+12F068A: 48 85 C0           - test rax,rax
DQIandIIHD2DRemake.exe+12F068D: 0F 84 9F 00 00 00  - je DQIandIIHD2DRemake.exe+12F0732
DQIandIIHD2DRemake.exe+12F0693: E8 48 90 DE FF     - call DQIandIIHD2DRemake.exe+10D96E0
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>36</ID>
      <Description>"Field: MP no decrease after casting"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://openchetatables.com
}

[ENABLE]

aobscanmodule(INJECT_FIELD_CAST_SPELL,$process,41 29 45 34 41 8B 45 34) // should be unique
alloc(newmem,$1000,INJECT_FIELD_CAST_SPELL)

label(code)
label(return)

newmem:
  cmp eax, 0
  jl code
  xor eax, eax
code:
  sub [r13+34],eax
  mov eax,[r13+34]
  jmp return

INJECT_FIELD_CAST_SPELL:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_FIELD_CAST_SPELL)

[DISABLE]

INJECT_FIELD_CAST_SPELL:
  db 41 29 45 34 41 8B 45 34

unregistersymbol(INJECT_FIELD_CAST_SPELL)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+10B15BA

DQIandIIHD2DRemake.exe+10B1596: 33 C9                    - xor ecx,ecx
DQIandIIHD2DRemake.exe+10B1598: E8 F3 5D 18 00           - call DQIandIIHD2DRemake.exe+1237390
DQIandIIHD2DRemake.exe+10B159D: 4C 8D 45 97              - lea r8,[rbp-69]
DQIandIIHD2DRemake.exe+10B15A1: 40 88 75 97              - mov [rbp-69],sil
DQIandIIHD2DRemake.exe+10B15A5: 48 8D 55 EF              - lea rdx,[rbp-11]
DQIandIIHD2DRemake.exe+10B15A9: 48 8B C8                 - mov rcx,rax
DQIandIIHD2DRemake.exe+10B15AC: E8 3F 34 18 00           - call DQIandIIHD2DRemake.exe+12349F0
DQIandIIHD2DRemake.exe+10B15B1: 40 38 75 97              - cmp [rbp-69],sil
DQIandIIHD2DRemake.exe+10B15B5: 74 12                    - je DQIandIIHD2DRemake.exe+10B15C9
DQIandIIHD2DRemake.exe+10B15B7: 8B 45 B7                 - mov eax,[rbp-49]
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+10B15BA: 41 29 45 34              - sub [r13+34],eax
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+10B15BE: 41 8B 45 34              - mov eax,[r13+34]
DQIandIIHD2DRemake.exe+10B15C2: 0F 48 C6                 - cmovs eax,esi
DQIandIIHD2DRemake.exe+10B15C5: 41 89 45 34              - mov [r13+34],eax
DQIandIIHD2DRemake.exe+10B15C9: 48 8B 4D 0F              - mov rcx,[rbp+0F]
DQIandIIHD2DRemake.exe+10B15CD: 40 B6 01                 - mov sil,01
DQIandIIHD2DRemake.exe+10B15D0: 48 85 C9                 - test rcx,rcx
DQIandIIHD2DRemake.exe+10B15D3: 74 05                    - je DQIandIIHD2DRemake.exe+10B15DA
DQIandIIHD2DRemake.exe+10B15D5: E8 F6 90 4B 00           - call DQIandIIHD2DRemake.exe+156A6D0
DQIandIIHD2DRemake.exe+10B15DA: 4C 8B AC 24 C0 00 00 00  - mov r13,[rsp+000000C0]
DQIandIIHD2DRemake.exe+10B15E2: 4D 85 E4                 - test r12,r12
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>37</ID>
      <Description>"Field trap: zero damage"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIIIHD2DRemake.exe
  Version: 
  Date   : 2025-05-29
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_FIELD_NO_DAMAGE,$process,29 51 2C 48 8B D9) // should be unique
alloc(newmem,$1000,INJECT_FIELD_NO_DAMAGE)

label(code)
label(return)

newmem:
  cmp edx, 0
  jbe code
  xor edx, edx

code:
  sub [rcx+2C],edx
  mov rbx,rcx
  jmp return

INJECT_FIELD_NO_DAMAGE:
  jmp newmem
  nop
return:
registersymbol(INJECT_FIELD_NO_DAMAGE)

[DISABLE]

INJECT_FIELD_NO_DAMAGE:
  db 29 51 2C 48 8B D9

unregistersymbol(INJECT_FIELD_NO_DAMAGE)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+10AB316

DQIandIIHD2DRemake.exe+10AB308: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB309: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB30A: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB30B: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB30C: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB30D: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB30E: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB30F: CC                    - int 3
DQIandIIHD2DRemake.exe+10AB310: 40 53                 - push rbx
DQIandIIHD2DRemake.exe+10AB312: 48 83 EC 20           - sub rsp,20
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+10AB316: 29 51 2C              - sub [rcx+2C],edx
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+10AB319: 48 8B D9              - mov rbx,rcx
DQIandIIHD2DRemake.exe+10AB31C: 83 79 2C 00           - cmp dword ptr [rcx+2C],00
DQIandIIHD2DRemake.exe+10AB320: 7F 11                 - jg DQIandIIHD2DRemake.exe+10AB333
DQIandIIHD2DRemake.exe+10AB322: BA 01 00 00 00        - mov edx,00000001
DQIandIIHD2DRemake.exe+10AB327: E8 D4 78 FE FF        - call DQIandIIHD2DRemake.exe+1092C00
DQIandIIHD2DRemake.exe+10AB32C: C7 43 2C 00 00 00 00  - mov [rbx+2C],00000000
DQIandIIHD2DRemake.exe+10AB333: 48 83 C4 20           - add rsp,20
DQIandIIHD2DRemake.exe+10AB337: 5B                    - pop rbx
DQIandIIHD2DRemake.exe+10AB338: C3                    - ret
DQIandIIHD2DRemake.exe+10AB339: CC                    - int 3
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>38</ID>
      <Description>"Longer holy protection / holy water duration"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_LONGER_HOLY_WATER_TIME,$process,F3 0F 5C F0 F3 0F 5F F7 E8 5D) // should be unique
alloc(newmem,$1000,INJECT_LONGER_HOLY_WATER_TIME)

label(code)
label(return i_base_purbuf_addr vf_t_multi)

newmem:
  mov [i_base_purbuf_addr], rcx
  mulss xmm0, dword ptr [vf_t_multi]

code:
  subss xmm6,xmm0
  maxss xmm6,xmm7
  jmp return
align 10 cc
  i_base_purbuf_addr:
  dq 0
  vf_t_multi:
  dd (float)0.2

INJECT_LONGER_HOLY_WATER_TIME:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_LONGER_HOLY_WATER_TIME i_base_purbuf_addr vf_t_multi)

[DISABLE]

INJECT_LONGER_HOLY_WATER_TIME:
  db F3 0F 5C F0 F3 0F 5F F7

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+F010D6

DQIandIIHD2DRemake.exe+F010AB: 48 8B 08                 - mov rcx,[rax]
DQIandIIHD2DRemake.exe+F010AE: 85 DB                    - test ebx,ebx
DQIandIIHD2DRemake.exe+F010B0: 75 0A                    - jne DQIandIIHD2DRemake.exe+F010BC
DQIandIIHD2DRemake.exe+F010B2: F3 0F 10 B1 AC 00 00 00  - movss xmm6,[rcx+000000AC]
DQIandIIHD2DRemake.exe+F010BA: EB 08                    - jmp DQIandIIHD2DRemake.exe+F010C4
DQIandIIHD2DRemake.exe+F010BC: F3 0F 10 B1 A8 00 00 00  - movss xmm6,[rcx+000000A8]
DQIandIIHD2DRemake.exe+F010C4: 0F 2F F7                 - comiss xmm6,xmm7
DQIandIIHD2DRemake.exe+F010C7: 0F 86 F4 00 00 00        - jbe DQIandIIHD2DRemake.exe+F011C1
DQIandIIHD2DRemake.exe+F010CD: 41 0F 28 C5              - movaps xmm0,xmm13
DQIandIIHD2DRemake.exe+F010D1: F3 41 0F 59 C4           - mulss xmm0,xmm12
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+F010D6: F3 0F 5C F0              - subss xmm6,xmm0
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+F010DA: F3 0F 5F F7              - maxss xmm6,xmm7
DQIandIIHD2DRemake.exe+F010DE: E8 5D 2C 17 00           - call DQIandIIHD2DRemake.exe+1073D40
DQIandIIHD2DRemake.exe+F010E3: 48 8B 08                 - mov rcx,[rax]
DQIandIIHD2DRemake.exe+F010E6: 85 DB                    - test ebx,ebx
DQIandIIHD2DRemake.exe+F010E8: 75 0A                    - jne DQIandIIHD2DRemake.exe+F010F4
DQIandIIHD2DRemake.exe+F010EA: F3 0F 11 B1 AC 00 00 00  - movss [rcx+000000AC],xmm6
DQIandIIHD2DRemake.exe+F010F2: EB 08                    - jmp DQIandIIHD2DRemake.exe+F010FC
DQIandIIHD2DRemake.exe+F010F4: F3 0F 11 B1 A8 00 00 00  - movss [rcx+000000A8],xmm6
DQIandIIHD2DRemake.exe+F010FC: 0F 2F F7                 - comiss xmm6,xmm7
DQIandIIHD2DRemake.exe+F010FF: 77 73                    - ja DQIandIIHD2DRemake.exe+F01174
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>47</ID>
          <Description>"Longer stealth duration"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-11-02
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_LONGER_STEALTH_TIME,$process,F3 0F 10 B1 C4 00 00 00 F3) // should be unique
alloc(newmem,$1000,INJECT_LONGER_STEALTH_TIME)

label(code)
label(return)

newmem:
  mov [i_base_purbuf_addr], rcx
  mulss xmm0, dword ptr [vf_t_multi]

code:
  movss xmm6,[rcx+000000C4]
  jmp return

INJECT_LONGER_STEALTH_TIME:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_LONGER_STEALTH_TIME)

[DISABLE]

INJECT_LONGER_STEALTH_TIME:
  db F3 0F 10 B1 C4 00 00 00

unregistersymbol(INJECT_LONGER_STEALTH_TIME)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+F00EAF

DQIandIIHD2DRemake.exe+F00E7E: 4C 89 A4 24 90 01 00 00  - mov [rsp+00000190],r12
DQIandIIHD2DRemake.exe+F00E86: 45 32 E4                 - xor r12b,r12b
DQIandIIHD2DRemake.exe+F00E89: E8 B2 2E 17 00           - call DQIandIIHD2DRemake.exe+1073D40
DQIandIIHD2DRemake.exe+F00E8E: 48 8B 08                 - mov rcx,[rax]
DQIandIIHD2DRemake.exe+F00E91: 0F 2F B9 C4 00 00 00     - comiss xmm7,[rcx+000000C4]
DQIandIIHD2DRemake.exe+F00E98: 0F 83 A8 00 00 00        - jae DQIandIIHD2DRemake.exe+F00F46
DQIandIIHD2DRemake.exe+F00E9E: E8 9D 2E 17 00           - call DQIandIIHD2DRemake.exe+1073D40
DQIandIIHD2DRemake.exe+F00EA3: 41 0F 28 C5              - movaps xmm0,xmm13
DQIandIIHD2DRemake.exe+F00EA7: F3 41 0F 59 C4           - mulss xmm0,xmm12
DQIandIIHD2DRemake.exe+F00EAC: 48 8B 08                 - mov rcx,[rax]
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+F00EAF: F3 0F 10 B1 C4 00 00 00  - movss xmm6,[rcx+000000C4]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+F00EB7: F3 0F 5C F0              - subss xmm6,xmm0
DQIandIIHD2DRemake.exe+F00EBB: F3 0F 5F F7              - maxss xmm6,xmm7
DQIandIIHD2DRemake.exe+F00EBF: E8 7C 2E 17 00           - call DQIandIIHD2DRemake.exe+1073D40
DQIandIIHD2DRemake.exe+F00EC4: 0F 2F F7                 - comiss xmm6,xmm7
DQIandIIHD2DRemake.exe+F00EC7: 48 8B 08                 - mov rcx,[rax]
DQIandIIHD2DRemake.exe+F00ECA: F3 0F 11 B1 C4 00 00 00  - movss [rcx+000000C4],xmm6
DQIandIIHD2DRemake.exe+F00ED2: 77 61                    - ja DQIandIIHD2DRemake.exe+F00F35
DQIandIIHD2DRemake.exe+F00ED4: C7 44 24 38 FF FF FF FF  - mov [rsp+38],FFFFFFFF
DQIandIIHD2DRemake.exe+F00EDC: 66 44 89 6C 24 3C        - mov [rsp+3C],r13w
DQIandIIHD2DRemake.exe+F00EE2: 4C 89 6C 24 40           - mov [rsp+40],r13
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>39</ID>
          <Description>"ratio"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C08000</Color>
          <VariableType>Float</VariableType>
          <Address>vf_t_multi</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>43</ID>
          <Description>"Holy protection"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Float</VariableType>
          <Address>i_base_purbuf_addr</Address>
          <Offsets>
            <Offset>A8</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>40</ID>
          <Description>"Holy water"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Float</VariableType>
          <Address>i_base_purbuf_addr</Address>
          <Offsets>
            <Offset>AC</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>46</ID>
          <Description>"Stealth"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Float</VariableType>
          <Address>i_base_purbuf_addr</Address>
          <Offsets>
            <Offset>C4</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>16</ID>
      <Description>"Char viewer"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIIIHD2DRemake.exe
  Version: 
  Date   : 2025-10-31
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_CHAR_VIEWER,$process,8B 78 7C F3 0F 58 F6 F3 0F 5C 35) // should be unique
alloc(newmem,$1000,INJECT_CHAR_VIEWER)

label(code)
label(return i_base_char_viewer_addr)

newmem:
  mov [i_base_char_viewer_addr], rax

code:
  mov edi,[rax+7C]
  addss xmm6,xmm6
  jmp return
align 10 cc
  i_base_char_viewer_addr:
  dq 0

INJECT_CHAR_VIEWER:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_CHAR_VIEWER i_base_char_viewer_addr)

[DISABLE]

INJECT_CHAR_VIEWER:
  db 8B 78 7C F3 0F 58 F6

unregistersymbol(INJECT_CHAR_VIEWER i_base_char_viewer_addr)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: INJECT_CHAR_VIEWER

DQIandIIHD2DRemake.exe+10A137F: 5F                       - pop rdi
DQIandIIHD2DRemake.exe+10A1380: C3                       - ret
DQIandIIHD2DRemake.exe+10A1381: 0F 29 74 24 20           - movaps [rsp+20],xmm6
DQIandIIHD2DRemake.exe+10A1386: 48 89 7C 24 58           - mov [rsp+58],rdi
DQIandIIHD2DRemake.exe+10A138B: E8 A0 0C 00 00           - call DQIandIIHD2DRemake.exe+10A2030
DQIandIIHD2DRemake.exe+10A1390: 48 8B CF                 - mov rcx,rdi
DQIandIIHD2DRemake.exe+10A1393: F2 0F 10 70 50           - movsd xmm6,[rax+50]
DQIandIIHD2DRemake.exe+10A1398: 66 0F 5A F6              - cvtpd2ps xmm6,xmm6
DQIandIIHD2DRemake.exe+10A139C: E8 8F 0C 00 00           - call DQIandIIHD2DRemake.exe+10A2030
DQIandIIHD2DRemake.exe+10A13A1: 48 8D 4C 24 58           - lea rcx,[rsp+58]
// ---------- INJECTING HERE ----------
INJECT_CHAR_VIEWER: 8B 78 7C                 - mov edi,[rax+7C]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+10A13A9: F3 0F 58 F6              - addss xmm6,xmm6
DQIandIIHD2DRemake.exe+10A13AD: F3 0F 5C 35 83 D6 E1 02  - subss xmm6,[DQIandIIHD2DRemake.exe+3EBEA38]
DQIandIIHD2DRemake.exe+10A13B5: F3 0F 2D DE              - cvtss2si ebx,xmm6
DQIandIIHD2DRemake.exe+10A13B9: D1 FB                    - sar ebx,1
DQIandIIHD2DRemake.exe+10A13BB: E8 E0 C5 FE FF           - call DQIandIIHD2DRemake.exe+108D9A0
DQIandIIHD2DRemake.exe+10A13C0: 0F 28 74 24 20           - movaps xmm6,[rsp+20]
DQIandIIHD2DRemake.exe+10A13C5: 8D 14 1F                 - lea edx,[rdi+rbx]
DQIandIIHD2DRemake.exe+10A13C8: 03 D0                    - add edx,eax
DQIandIIHD2DRemake.exe+10A13CA: 40 84 F6                 - test sil,sil
DQIandIIHD2DRemake.exe+10A13CD: 74 30                    - je DQIandIIHD2DRemake.exe+10A13FF
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>17</ID>
          <Description>"Lv"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>1C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>18</ID>
          <Description>"EXP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>20</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>19</ID>
          <Description>"Max HP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>28</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>20</ID>
          <Description>"HP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>2C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>21</ID>
          <Description>"Max MP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>30</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>22</ID>
          <Description>"MP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>34</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>23</ID>
          <Description>"Base STR"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Double</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>38</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>24</ID>
          <Description>"Base DUR"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Double</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>40</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>25</ID>
          <Description>"Base SPD"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Double</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>48</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>26</ID>
          <Description>"Base STA"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Double</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>50</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>27</ID>
          <Description>"Base INT"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Double</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>58</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>28</ID>
          <Description>"Base LCK"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>Double</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>60</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>29</ID>
          <Description>"Seed: HP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>68</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>45</ID>
          <Description>"Seed: MP"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>6C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>44</ID>
          <Description>"Seed: STR"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>70</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>30</ID>
          <Description>"Seed: DUR"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>74</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>31</ID>
          <Description>"Seed: SPD"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>78</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>32</ID>
          <Description>"Seed: STA"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>7C</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>33</ID>
          <Description>"Seed: INT"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>80</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>34</ID>
          <Description>"Seed: LCK"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_char_viewer_addr</Address>
          <Offsets>
            <Offset>84</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>51</ID>
      <Description>"[DQ2] Get some stats (achievement related?)"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-11-02
  Author : bbfox@https://openchetatables.com
}

[ENABLE]

aobscanmodule(INJECT_GET_BATT_STATS,$process,8B 40 04 C3 CC CC CC CC 40) // should be unique
alloc(newmem,$1000,INJECT_GET_BATT_STATS)

label(code)
label(return i_base_bstat_addr)

newmem:
  cmp [i_base_bstat_addr], rax
  je code
  cmp [i_base_bstat_addr2], rax
  je code
  cmp [i_base_bstat_addr3], rax
  je code
  cmp [i_base_bstat_addr4], rax
  je code

  cmp [i_base_bstat_addr], 0
  je w1
  cmp [i_base_bstat_addr2], 0
  je w2
  cmp [i_base_bstat_addr3], 0
  je w3
  cmp [i_base_bstat_addr4], 0
  je w4
  jmp code

w1:
  mov [i_base_bstat_addr], rax
  jmp code
w2:
  mov [i_base_bstat_addr2], rax
  jmp code
w3:
  mov [i_base_bstat_addr3], rax
  jmp code
w4:
  mov [i_base_bstat_addr4], rax

code:
  mov eax,[rax+04]
  ret 
  int 3 
  jmp return
align 10 cc
  i_base_bstat_addr:
  dq 0
  i_base_bstat_addr2:
  dq 0
  i_base_bstat_addr3:
  dq 0
  i_base_bstat_addr4:
  dq 0


INJECT_GET_BATT_STATS:
  jmp newmem
return:
registersymbol(INJECT_GET_BATT_STATS i_base_bstat_addr)

[DISABLE]

INJECT_GET_BATT_STATS:
  db 8B 40 04 C3 CC

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+1073FC8

DQIandIIHD2DRemake.exe+1073FA9: 0F 1F 80 00 00 00 00  - nop dword ptr [rax+00000000]
DQIandIIHD2DRemake.exe+1073FB0: 48 98                 - cdqe 
DQIandIIHD2DRemake.exe+1073FB2: 48 C1 E0 04           - shl rax,04
DQIandIIHD2DRemake.exe+1073FB6: 49 03 C0              - add rax,r8
DQIandIIHD2DRemake.exe+1073FB9: 44 38 18              - cmp [rax],r11b
DQIandIIHD2DRemake.exe+1073FBC: 74 0A                 - je DQIandIIHD2DRemake.exe+1073FC8
DQIandIIHD2DRemake.exe+1073FBE: 8B 40 08              - mov eax,[rax+08]
DQIandIIHD2DRemake.exe+1073FC1: 83 F8 FF              - cmp eax,-01
DQIandIIHD2DRemake.exe+1073FC4: 75 EA                 - jne DQIandIIHD2DRemake.exe+1073FB0
DQIandIIHD2DRemake.exe+1073FC6: 33 C0                 - xor eax,eax
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+1073FC8: 8B 40 04              - mov eax,[rax+04]
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+1073FCB: C3                    - ret 
DQIandIIHD2DRemake.exe+1073FCC: CC                    - int 3 
DQIandIIHD2DRemake.exe+1073FCD: CC                    - int 3 
DQIandIIHD2DRemake.exe+1073FCE: CC                    - int 3 
DQIandIIHD2DRemake.exe+1073FCF: CC                    - int 3 
DQIandIIHD2DRemake.exe+1073FD0: 40 53                 - push rbx
DQIandIIHD2DRemake.exe+1073FD2: 55                    - push rbp
DQIandIIHD2DRemake.exe+1073FD3: 48 83 EC 38           - sub rsp,38
DQIandIIHD2DRemake.exe+1073FD7: 8B 41 0C              - mov eax,[rcx+0C]
DQIandIIHD2DRemake.exe+1073FDA: 33 ED                 - xor ebp,ebp
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>54</ID>
          <Description>"open Battle records menu"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>60</ID>
          <Description>"Enable before enter menu"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>52</ID>
          <Description>"#1 (# of kills?)"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_bstat_addr</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>53</ID>
          <Description>"#2 (# items found?)"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_bstat_addr+8</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>55</ID>
          <Description>"#3 unknown"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_bstat_addr+10</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>56</ID>
          <Description>"#4 unknown"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>FF8080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_base_bstat_addr+18</Address>
          <Offsets>
            <Offset>4</Offset>
          </Offsets>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>59</ID>
      <Description>"[DQ2] inf. spin the lottery drum / item use"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-11-02
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_INF_LOTTERY_TICKETS,$process,FF C8 89 01 48 8B 45 28) // should be unique

INJECT_INF_LOTTERY_TICKETS:
  db 90 90

registersymbol(INJECT_INF_LOTTERY_TICKETS)

[DISABLE]

INJECT_INF_LOTTERY_TICKETS:
  db FF C8

unregistersymbol(INJECT_INF_LOTTERY_TICKETS)


{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+10AC056

DQIandIIHD2DRemake.exe+10AC03A: 48 8B 74 24 60     - mov rsi,[rsp+60]
DQIandIIHD2DRemake.exe+10AC03F: 85 DB              - test ebx,ebx
DQIandIIHD2DRemake.exe+10AC041: 78 3D              - js DQIandIIHD2DRemake.exe+10AC080
DQIandIIHD2DRemake.exe+10AC043: 3B 5D 30           - cmp ebx,[rbp+30]
DQIandIIHD2DRemake.exe+10AC046: 7D 38              - jnl DQIandIIHD2DRemake.exe+10AC080
DQIandIIHD2DRemake.exe+10AC048: 48 8B 45 28        - mov rax,[rbp+28]
DQIandIIHD2DRemake.exe+10AC04C: 4A 8B 0C F8        - mov rcx,[rax+r15*8]
DQIandIIHD2DRemake.exe+10AC050: 8B 01              - mov eax,[rcx]
DQIandIIHD2DRemake.exe+10AC052: 85 C0              - test eax,eax
DQIandIIHD2DRemake.exe+10AC054: 7E 2A              - jle DQIandIIHD2DRemake.exe+10AC080
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+10AC056: FF C8              - dec eax
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+10AC058: 89 01              - mov [rcx],eax
DQIandIIHD2DRemake.exe+10AC05A: 48 8B 45 28        - mov rax,[rbp+28]
DQIandIIHD2DRemake.exe+10AC05E: 4E 8B 04 F8        - mov r8,[rax+r15*8]
DQIandIIHD2DRemake.exe+10AC062: 41 83 38 00        - cmp dword ptr [r8],00
DQIandIIHD2DRemake.exe+10AC066: 7F 14              - jg DQIandIIHD2DRemake.exe+10AC07C
DQIandIIHD2DRemake.exe+10AC068: 41 B1 01           - mov r9b,01
DQIandIIHD2DRemake.exe+10AC06B: 48 8D 4D 28        - lea rcx,[rbp+28]
DQIandIIHD2DRemake.exe+10AC06F: 41 B8 01 00 00 00  - mov r8d,00000001
DQIandIIHD2DRemake.exe+10AC075: 8B D3              - mov edx,ebx
DQIandIIHD2DRemake.exe+10AC077: E8 34 E1 B9 FF     - call DQIandIIHD2DRemake.exe+C4A1B0
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>61</ID>
          <Description>"Notice: items cannot be removed when enabled"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>62</ID>
          <Description>"Only enable when needed"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>41</ID>
      <Description>"DRAGON QUEST I &amp; II HD-2D Remake  /  https://openchetatables.com"</Description>
      <Options moHideChildren="1"/>
      <Color>009300</Color>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>64</ID>
          <Description>"Battle: Keep alive"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : DQIandIIHD2DRemake.exe
  Version: 
  Date   : 2025-11-08
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_KEEP_1HP,$process,C7 81 A4 01 00 00 00 00 00 00) // should be unique
alloc(newmem,$1000,INJECT_KEEP_1HP)

label(code)
label(return is_check_dq2_flag_2)

newmem:
  cmp dword ptr [rcx+00000190], 0
  je code
  cmp dword ptr [rcx+000001E0], 0
  jne code

  cmp dword ptr [is_check_dq2_flag_2], 1
  jne code
  cmp dword ptr [rcx+000001CC], 0
  jne code
@@:
  mov [rcx+000001A4], 00000001
  jmp return


code:
  mov [rcx+000001A4],00000000
  jmp return
align 10 cc
  is_check_dq2_flag_2:
  dd 1

INJECT_KEEP_1HP:
  jmp newmem
  nop 5
return:
registersymbol(INJECT_KEEP_1HP is_check_dq2_flag_2)

[DISABLE]

INJECT_KEEP_1HP:
  db C7 81 A4 01 00 00 00 00 00 00

unregistersymbol(INJECT_KEEP_1HP is_check_dq2_flag_2)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: DQIandIIHD2DRemake.exe+F3C684

DQIandIIHD2DRemake.exe+F3C678: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C679: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67A: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67B: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67C: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67D: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67E: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C67F: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C680: 85 D2                          - test edx,edx
DQIandIIHD2DRemake.exe+F3C682: 79 0B                          - jns DQIandIIHD2DRemake.exe+F3C68F
// ---------- INJECTING HERE ----------
DQIandIIHD2DRemake.exe+F3C684: C7 81 A4 01 00 00 00 00 00 00  - mov [rcx+000001A4],00000000
// ---------- DONE INJECTING  ----------
DQIandIIHD2DRemake.exe+F3C68E: C3                             - ret 
DQIandIIHD2DRemake.exe+F3C68F: 8B 81 A0 01 00 00              - mov eax,[rcx+000001A0]
DQIandIIHD2DRemake.exe+F3C695: 3B D0                          - cmp edx,eax
DQIandIIHD2DRemake.exe+F3C697: 0F 4C C2                       - cmovl eax,edx
INJECT_BATTLE_HP: E9 61 39 B0 FE                 - jmp 13FA40000
DQIandIIHD2DRemake.exe+F3C69F: 90                             - nop 
DQIandIIHD2DRemake.exe+F3C6A0: C3                             - ret 
DQIandIIHD2DRemake.exe+F3C6A1: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A2: CC                             - int 3 
DQIandIIHD2DRemake.exe+F3C6A3: CC                             - int 3 
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>71</ID>
              <Description>"May not work"</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>65</ID>
              <Description>"Extra check for DQ2?"</Description>
              <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_check_dq2_flag_2</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <LuaScript>--[[
[ENABLE]
{$lua}
if syntaxcheck then return end
]]--
-- **デバッグモードの設定 (デフォルト: 無効)**
local debugMode = false

-- AOBScanModule関数
if not AOBScanModule then
    function AOBScanModule(moduleName, signature, scanOptions)
        local baseAddr = nil
        local maxAddr = 0
        local modList

        synchronize(function()
            modList = enumModules()
        end)

        for _, mod in ipairs(modList) do
            if string.lower(mod.Name) == string.lower(moduleName) then
                baseAddr = mod.Address
                maxAddr = baseAddr + mod.Size
                break
            end
        end

        if not baseAddr then
            if debugMode then print("❗ Error: Module " .. moduleName .. " not found!") end
            return nil
        end

        if debugMode then
            print(string.format("✔️ %s Base Address: 0x%X", moduleName, baseAddr))
            print(string.format("🔬 Scanning Range: 0x%X - 0x%X", baseAddr, maxAddr))
        end

        local ms = createMemScan()

        synchronize(function()
            ms.firstScan(
                soExactValue,
                vtByteArray,
                nil,
                signature,
                nil,
                baseAddr,
                maxAddr,
                scanOptions or "+X+R",
                fsmNotAligned,
                "1",
                true,
                true,
                false,
                false
            )
        end)

        ms.waitTillDone()

        local results = createFoundList(ms)
        results.initialize()

        local addr
        synchronize(function()
            if results.getCount() &gt; 0 then
                addr = results[0]
            end
        end)

        if addr then
            if debugMode then print("🔦 AOB found at: 0x" .. addr) end
        else
            if debugMode then print("💔 AOB not found in " .. moduleName) end
        end

        results.destroy()
        ms.destroy()
        return addr
    end
end

registerLuaFunctionHighlight('AOBScanModule')

--[[
test AOBScanModule()
local aob_addr_str = AOBScanModule("???.exe", "48 8B 05 ?? ?? ?? ?? 33 ED 48 8B 88", "+X+R")
if aob_addr_str then
    print("🔦 Final AOB Address: 0x" .. aob_addr_str)
else
    print("💔 AOB not found in ???.exe")
end
]]--

-- AOBScanModuleN関数
if not AOBScanModuleN then
    function AOBScanModuleN(moduleName, signature, maxResults, scanOptions)
        local baseAddr = nil
        local maxAddr = 0
        local modList

        synchronize(function()
            modList = enumModules()
        end)

        for _, mod in ipairs(modList) do
            if string.lower(mod.Name) == string.lower(moduleName) then
                baseAddr = mod.Address
                maxAddr = baseAddr + mod.Size
                break
            end
        end

        if not baseAddr then
            if debugMode then print("❗ Error: Module " .. moduleName .. " not found!") end
            return nil
        end

        if debugMode then
            print(string.format("✔️ %s Base Address: 0x%X", moduleName, baseAddr))
            print(string.format("🔬 Scanning Range: 0x%X - 0x%X", baseAddr, maxAddr))
        end

        local ms = createMemScan()

        synchronize(function()
            ms.firstScan(
                soExactValue,
                vtByteArray,
                nil,
                signature,
                nil,
                baseAddr,
                maxAddr,
                scanOptions or "+X+R",
                fsmNotAligned,
                "1",
                true,
                true,
                false,
                false
            )
        end)

        ms.waitTillDone()

        local results = createFoundList(ms)
        results.initialize()

        local addrs = {}
        synchronize(function()
            local count = results.getCount()
            for i = 0, math.min(maxResults - 1, count - 1) do
                table.insert(addrs, results[i])
                if debugMode then
                    print(string.format("🔦 AOB[%d] found at: 0x%s", i + 1, results[i]))
                end
            end
        end)

        if #addrs == 0 and debugMode then
            print("💔 AOB not found in " .. moduleName)
        end

        results.destroy()
        ms.destroy()

        return addrs
    end
end

registerLuaFunctionHighlight('AOBScanModuleN')


-- 搜尋並取出最多5筆結果
--[[
local list = AOBScanModuleN("GameModule.exe", "12 34 56 ?? 78", 5)

if list then
    for i, addr in ipairs(list) do
        print(string.format("地址 %d: 0x%s", i, addr))
    end
end
]]--


-- Lua scripts that table checkbox will not be checked with "NO_ACTIVATE" in comment/script body
if not onMemRecPostExecute then
    function onMemRecPostExecute(memoryrecord, newState, succeeded)
        if memoryrecord.Type == vtAutoAssembler and memoryrecord.Script:find("NO_ACTIVATE") and newState and succeeded then
            synchronize(function()
                memoryrecord.disableWithoutExecute()
            end)
        end
    end
end

-- Memory record IDs now allowed to be 'locked'
IDs = {999999, 9999999}

-- Determine event trigger sequence
if not contains then
    function contains(table, val)
       for i = 1, #table do
          if table[i] == val then
             return true
          end
       end
       return false
    end
end

if not onMemRecPreExecute then
    function onMemRecPreExecute(memoryrecord, newstate)
        if contains(IDs, memoryrecord.ID) and newstate then
            synchronize(function()
                if not memoryrecord.OnActivate then
                    memoryrecord.OnActivate = function(memoryrecord, before, currentstate)
                        return false
                    end
                end
            end)
        end
    end
end

-- Utility Functions
-- Clear lua engine log
if not clearLuaLog then
    function clearLuaLog()
        synchronize(function()
          getLuaEngine().MenuItem5.doClick()
        end)
    end
end
registerLuaFunctionHighlight('clearLuaLog')

-- Close lua engine log
if not closeLuaEngine then
    function closeLuaEngine()
        synchronize(function()
          getLuaEngine().Close()
        end)
    end
end
registerLuaFunctionHighlight('closeLuaEngine')

-- Clear lua engine log &amp; close lua engine
if not closeLuaEngine2 then
    function closeLuaEngine2()
        synchronize(function()
          getLuaEngine().MenuItem5.doClick()
          getLuaEngine().Close()
        end)
    end
end
registerLuaFunctionHighlight('closeLuaEngine2')

if not getProcessNameFromPID then
	function getProcessNameFromPID(pid)
	  local sl = createStringList()
	  getProcessList(sl)
	  local hexPid = string.format("%X", pid):upper()

	  for i = 0, sl.Count - 1 do
		local entry = sl[i]
		local hexid, name = entry:match("^(%x+)%-(.+)$")
		if hexid and name then
		  if tonumber(hexid, 16) == pid then
			return name
		  end
		end
	  end
	  return "(unknown)"
	end
end
registerLuaFunctionHighlight('getProcessNameFromPID')

if not printProcessInfo then
	function printProcessInfo()
	  local pid = getOpenedProcessID()
	  local name = getProcessNameFromPID(pid)
	  print(string.format("📎 Attached to process: %s (PID: %d / 0x%X)", name, pid, pid))
	end
end
registerLuaFunctionHighlight('printProcessInfo')

if not dumpProcessListAndFindPID then
	function dumpProcessListAndFindPID()
	  local pid = getOpenedProcessID()
	  print(string.format("💭 Current PID: %d / 0x%X", pid, pid))

	  local sl = createStringList()
	  getProcessList(sl)

	  print("🧾 Dumping process list:")
	  for i = 0, sl.Count - 1 do
		local entry = sl[i]
		print(string.format("[%d] %s", i, entry))

		-- 嘗試解析並比對 PID
		local name, hexid = entry:match("(.+)%-(%x+)$")
		if name and hexid then
		  local parsed = tonumber(hexid, 16)
		  if parsed == pid then
			print("🔦 Match found in process list:")
			print(string.format("Name: %s | PID: %s (0x%s)", name, parsed, hexid))
		  end
		end
	  end
	end
end
registerLuaFunctionHighlight('dumpProcessListAndFindPID')

if not toHex32 then
	function toHex32(num)
		local hexstr = "0123456789ABCDEF"
		local result = ""
		if num &lt; 0 then
			num = (num + (1 &lt;&lt; 32)) % (1 &lt;&lt; 32) -- 轉成32-bit補數
		end
		for i = 1, 8 do -- 32-bit 一共8個hex位
			local n = num &amp; 0xF -- 取最低4 bit
			result = hexstr:sub(n + 1, n + 1) .. result
			num = num &gt;&gt; 4 -- 右移4 bit
		end
		return result
	end
end
registerLuaFunctionHighlight('toHex32')

if not toHex then
	function toHex(num)
		local hexstr = "0123456789ABCDEF"
		local result = ""
		if num &lt; 0 then
			num = (num + (1 &lt;&lt; 64)) % (1 &lt;&lt; 64)  -- 轉成64-bit補數
		end
		for i = 1, 16 do -- 每4 bit 一個 hex字，64-bit總共16個hex位
			local n = num &amp; 0xF -- 取最低4bit
			result = hexstr:sub(n + 1, n + 1) .. result
			num = num &gt;&gt; 4 -- 右移4bit
		end
		return result
	end
end	
registerLuaFunctionHighlight('toHex')

synchronize(function() AddressList.Header.OnSectionClick = nil end)
--[[
[DISABLE]
{$lua}

if AOBScanModule then
    AOBScanModule = nil
end
if onMemRecPostExecute then
    onMemRecPostExecute = nil
end
if onMemRecPreExecute then
    onMemRecPreExecute = nil
end
if clearLuaLog then
    clearLuaLog = nil
end
if closeLuaEngine then
    closeLuaEngine = nil
end
if closeLuaEngine2 then
    closeLuaEngine2 = nil
end
]]--
</LuaScript>
</CheatTable>
