<?xml version='1.0' encoding='utf-8'?>
<CheatTable CheatEngineTableVersion="52">
  <CheatEntries>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Auto-Attach and Version Check"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>2</ID>
      <Description>"☕ Fuel the Cheats — Tip Katzy (Toggle to open my Ko-fi page)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>3</ID>
      <Description>"How to use - Katzy"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>4</ID>
      <Description>"Clear All"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>5</ID>
      <Description>"[MAIN] Final Fantasy Type-0 HD"</Description>
      <Options moHideChildren="1" />
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>10</ID>
          <Description>"Infinite Health"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>11</ID>
          <Description>"Infinite AP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>12</ID>
          <Description>"Infinite Money"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>17</ID>
          <Description>"Infinite SPP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>16</ID>
          <Description>"Infinite Items"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>19</ID>
          <Description>"Infinite Rest Time"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>20</ID>
          <Description>"No Random Encounters"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>13</ID>
          <Description>"Always Killsight on Locked Target"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>18</ID>
          <Description>"Auto Complete Armed S.O."</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>14</ID>
          <Description>"Max Level (One-shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not KatzyFF0 then error('Allow the table Lua script, then reload the table.') end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>15</ID>
          <Description>"Academy Leader"</Description>
          <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:Ace
1:Deuce
2:Trey
3:Cater
4:Cinque
5:Sice
6:Seven
7:Eight
8:Nine
9:Jack
10:Queen
11:King
12:Machina
13:Rem
</DropDownList>
          <VariableType>4 Bytes</VariableType>
          <Address>0</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols />
  <LuaScript>--[[
Table identification: Katzy
Final Fantasy Type-0 HD | Steam build 3301128 | v1.5
Native hooks derived from the installed executable and read-only runtime capture.
]]
if syntaxcheck then return end
if KatzyFF0 then
  local ok, done = pcall(function() return KatzyFF0:shutdown(false) end)
  if not ok or not done then
    showMessage('The previous table is still restoring its hooks. Resume gameplay briefly, then reload this table.')
    return
  end
end

local specs = {["hp"]={{["name"]="hp_damage",["rva"]=1666251,["old"]="89 83 34 09 00 00",["sig"]="89 83 34 09 00 00 41 ff c1 41 83 f9 02 0f 8c 52 ff ff ff 0f b6 47 25 a8 02 75 04 a8 01 74 07 80",["code"]="9c f0 ff 05 5a 00 00 00 9d 9c 83 3d 4d 00 00 00 01 75 36 41 53 4c 8b 1d 62 00 00 00 49 3b 1b 74 0f 49 3b 5b 60 74 09 49 3b 9b c0 00 00 00 75 17 83 bb 34 09 00 00 00 7e 0e 3b 83 34 09 00 00 7d 06 8b 83 34 09 00 00 41 5b 9d 89 83 34 09 00 00 9c f0 ff 0d 0a 00 00 00 9d e9 73 6c 19 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=94,["relocs"]={{["off"]=90,["size"]=4,["target"]=1666257,["next"]=94},{["off"]=110,["size"]=8,["target"]=7097308},{["off"]=118,["size"]=8,["target"]=6655280},{["off"]=126,["size"]=8,["target"]=6642216},{["off"]=134,["size"]=8,["target"]=6642128},{["off"]=142,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="hp_cost",["rva"]=1661866,["old"]="89 83 34 09 00 00",["sig"]="89 83 34 09 00 00 41 8b c1 eb 03 83 c8 ff 48 8b 5c 24 30 48 8b 6c 24 38 48 8b 74 24 40 48 83 c4",["code"]="9c f0 ff 05 5a 00 00 00 9d 9c 83 3d 4d 00 00 00 01 75 36 41 53 4c 8b 1d 62 00 00 00 49 3b 1b 74 0f 49 3b 5b 60 74 09 49 3b 9b c0 00 00 00 75 17 83 bb 34 09 00 00 00 7e 0e 3b 83 34 09 00 00 7d 06 8b 83 34 09 00 00 41 5b 9d 89 83 34 09 00 00 9c f0 ff 0d 0a 00 00 00 9d e9 52 5b 19 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=94,["relocs"]={{["off"]=90,["size"]=4,["target"]=1661872,["next"]=94},{["off"]=110,["size"]=8,["target"]=7097308},{["off"]=118,["size"]=8,["target"]=6655280},{["off"]=126,["size"]=8,["target"]=6642216},{["off"]=134,["size"]=8,["target"]=6642128},{["off"]=142,["size"]=8,["target"]=7123552}},["hud"]=false}},["ap"]={{["name"]="ap_check_3f0e6a",["rva"]=4132458,["old"]="44 8b 80 fc 00 00 00",["patch"]="49 c7 c0 e7 03 00 00",["sig"]="44 8b 80 fc 00 00 00 45 39 44 39 08 7e 0d 43 8b 54 bd 78 48 8b cb e8 0b 8a 01 00 48 8b cb e8 63"},{["name"]="ap_check_3f2f71",["rva"]=4140913,["old"]="8b 90 fc 00 00 00",["patch"]="40 ba e7 03 00 00",["sig"]="8b 90 fc 00 00 00 0f 28 d6 0f 57 c9 42 39 54 09 08 0f 8e 01 01 00 00 b9 96 8a 01 00 e8 4e d1 de"},{["name"]="ap_check_3f4ed4",["rva"]=4148948,["old"]="44 8b 80 fc 00 00 00",["patch"]="49 c7 c0 e7 03 00 00",["sig"]="44 8b 80 fc 00 00 00 47 39 44 21 08 7e 0d 41 8b 54 ae 58 49 8b 0e e8 a1 49 01 00 49 8b 1e 48 8b"},{["name"]="ap_check_3f7cc4",["rva"]=4160708,["old"]="44 8b 80 fc 00 00 00",["patch"]="49 c7 c0 e7 03 00 00",["sig"]="44 8b 80 fc 00 00 00 0f 28 d6 0f 57 c9 46 39 44 0a 08 0f 8e d7 00 00 00 b9 96 8a 01 00 e8 fa 83"},{["name"]="ap_spend_3f3c98",["rva"]=4144280,["old"]="89 8a fc 00 00 00",["patch"]="66 0f 1f 44 00 00",["sig"]="89 8a fc 00 00 00 48 63 43 0c 33 ff 48 63 8c 83 b0 01 00 00 83 f9 2a 77 11 48 8b c1 48 69 c0 20"},{["name"]="ap_spend_3f8669",["rva"]=4163177,["old"]="41 89 88 fc 00 00 00",["patch"]="0f 1f 80 00 00 00 00",["sig"]="41 89 88 fc 00 00 00 49 63 82 f0 06 00 00 49 63 8c 82 fc 06 00 00 83 f9 2a 77 11 48 8b c1 48 69"}},["money"]={{["name"]="gil_menu_417017",["rva"]=4288535,["old"]="44 8b 0d be db 2a 00",["sig"]="44 8b 0d be db 2a 00 45 33 ff 48 8d 95 b8 00 00 00 44 89 7c 24 30 45 33 c0 49 8b ce 44 89 7c 24",["code"]="9c f0 ff 05 42 00 00 00 9d 41 53 4c 8b 1d 44 00 00 00 45 8b 0b 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 40 54 89 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 d8 6f 41 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=70,["relocs"]={{["off"]=66,["size"]=4,["target"]=4288542,["next"]=70},{["off"]=86,["size"]=8,["target"]=7097308},{["off"]=94,["size"]=8,["target"]=6655280},{["off"]=102,["size"]=8,["target"]=6642216},{["off"]=110,["size"]=8,["target"]=6642128},{["off"]=118,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="gil_menu_41733f",["rva"]=4289343,["old"]="44 8b 0d 96 d8 2a 00",["sig"]="44 8b 0d 96 d8 2a 00 44 89 7c 24 30 48 8d 95 ac 00 00 00 45 33 c0 49 8b ce 44 89 7c 24 28 c7 44",["code"]="9c f0 ff 05 42 00 00 00 9d 41 53 4c 8b 1d 44 00 00 00 45 8b 0b 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 40 54 89 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 00 73 41 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=70,["relocs"]={{["off"]=66,["size"]=4,["target"]=4289350,["next"]=70},{["off"]=86,["size"]=8,["target"]=7097308},{["off"]=94,["size"]=8,["target"]=6655280},{["off"]=102,["size"]=8,["target"]=6642216},{["off"]=110,["size"]=8,["target"]=6642128},{["off"]=118,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="gil_menu_4173cf",["rva"]=4289487,["old"]="44 8b 0d 06 d8 2a 00",["sig"]="44 8b 0d 06 d8 2a 00 45 33 f6 44 89 74 24 30 49 8d 95 b8 00 00 00 45 33 c0 48 8b cd 44 89 74 24",["code"]="9c f0 ff 05 42 00 00 00 9d 41 53 4c 8b 1d 44 00 00 00 45 8b 0b 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 40 54 89 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 90 73 41 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=70,["relocs"]={{["off"]=66,["size"]=4,["target"]=4289494,["next"]=70},{["off"]=86,["size"]=8,["target"]=7097308},{["off"]=94,["size"]=8,["target"]=6655280},{["off"]=102,["size"]=8,["target"]=6642216},{["off"]=110,["size"]=8,["target"]=6642128},{["off"]=118,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="gil_travel",["rva"]=4439995,["old"]="8b 05 1b 8c 28 00",["sig"]="8b 05 1b 8c 28 00 49 81 c1 48 49 00 00 89 46 10 44 88 be dc 01 00 00 48 c7 86 d0 01 00 00 ff ff",["code"]="9c f0 ff 05 3d 00 00 00 9d 41 53 4c 8b 1d 3f 00 00 00 41 8b 03 41 5b 9c 83 3d 22 00 00 00 01 75 11 05 40 54 89 00 3d ff e0 f5 05 7e 05 b8 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 80 bf 43 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=65,["relocs"]={{["off"]=61,["size"]=4,["target"]=4440001,["next"]=65},{["off"]=81,["size"]=8,["target"]=7097308},{["off"]=89,["size"]=8,["target"]=6655280},{["off"]=97,["size"]=8,["target"]=6642216},{["off"]=105,["size"]=8,["target"]=6642128},{["off"]=113,["size"]=8,["target"]=7123552}},["hud"]=false}},["shop"]={{["name"]="gil_shop_eligibility",["rva"]=2231622,["old"]="48 8d 15 8f 3e 4a 00 0f 94 c1 8b 04 8a",["sig"]="48 8d 15 8f 3e 4a 00 0f 94 c1 8b 04 8a 49 8b f9 48 c1 e7 06 49 03 b8 60 01 00 00 3b 47 08 7d 0d",["code"]="9c f0 ff 05 63 00 00 00 9d 48 8b 15 67 00 00 00 0f 94 c1 9c 83 f9 01 74 1a 85 c9 75 38 8b 04 8a f7 05 3d 00 00 00 01 00 00 00 74 2c 05 40 54 89 00 eb 14 8b 04 8a f7 05 27 00 00 00 02 00 00 00 74 16 05 90 5f 01 00 3d ff e0 f5 05 7e 0a b8 ff e0 f5 05 eb 03 8b 04 8a 9d 9c f0 ff 0d 0a 00 00 00 9d e9 ec 0c 22 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=103,["relocs"]={{["off"]=99,["size"]=4,["target"]=2231635,["next"]=103},{["off"]=119,["size"]=8,["target"]=7097308},{["off"]=127,["size"]=8,["target"]=6655280},{["off"]=135,["size"]=8,["target"]=6642216},{["off"]=143,["size"]=8,["target"]=6642128},{["off"]=151,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="gil_shop_display",["rva"]=2257028,["old"]="48 8d 0d 51 db 49 00 0f 94 c0 44 8b 0c 81",["sig"]="48 8d 0d 51 db 49 00 0f 94 c0 44 8b 0c 81 48 8b 97 38 01 00 00 48 8b 4f 28 89 74 24 30 48 83 c2",["code"]="9c f0 ff 05 6d 00 00 00 9d 48 8b 0d 71 00 00 00 0f 94 c0 9c 83 f8 01 74 1d 85 c0 75 41 44 8b 0c 81 f7 05 46 00 00 00 01 00 00 00 74 35 41 81 c1 40 54 89 00 eb 17 44 8b 0c 81 f7 05 2d 00 00 00 02 00 00 00 74 1c 41 81 c1 90 5f 01 00 41 81 f9 ff e0 f5 05 7e 0c 41 b9 ff e0 f5 05 eb 04 44 8b 0c 81 9d 9c f0 ff 0d 0a 00 00 00 9d e9 21 70 22 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=113,["relocs"]={{["off"]=109,["size"]=4,["target"]=2257042,["next"]=113},{["off"]=129,["size"]=8,["target"]=7097308},{["off"]=137,["size"]=8,["target"]=6655280},{["off"]=145,["size"]=8,["target"]=6642216},{["off"]=153,["size"]=8,["target"]=6642128},{["off"]=161,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="gil_shop_after_sale",["rva"]=2242303,["old"]="45 8b ac 84 dc 4b 6c 00",["sig"]="45 8b ac 84 dc 4b 6c 00 48 8b 97 38 01 00 00 48 8b 4f 28 89 6c 24 30 48 83 c2 28 45 8b cd 45 33",["code"]="9c f0 ff 05 6f 00 00 00 9d 9c 83 f8 01 74 21 85 c0 75 49 45 8b ac 84 dc 4b 6c 00 f7 05 4e 00 00 00 01 00 00 00 74 3d 41 81 c5 40 54 89 00 eb 1b 45 8b ac 84 dc 4b 6c 00 f7 05 31 00 00 00 02 00 00 00 74 20 41 81 c5 90 5f 01 00 41 81 fd ff e0 f5 05 7e 10 41 bd ff e0 f5 05 eb 08 45 8b ac 84 dc 4b 6c 00 9d 9c f0 ff 0d 0a 00 00 00 9d e9 94 36 22 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=115,["relocs"]={{["off"]=111,["size"]=4,["target"]=2242311,["next"]=115},{["off"]=131,["size"]=8,["target"]=7097308},{["off"]=139,["size"]=8,["target"]=6655280},{["off"]=147,["size"]=8,["target"]=6642216},{["off"]=155,["size"]=8,["target"]=6642128},{["off"]=163,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="gil_shop_balance",["rva"]=2254458,["old"]="0f 94 c0 8b 04 81",["sig"]="0f 94 c0 8b 04 81 c3 cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 48 89 5c 24 18 48 89 7c 24 20",["code"]="9c f0 ff 05 5c 00 00 00 9d 0f 94 c0 9c 83 f8 01 74 1a 85 c0 75 38 8b 04 81 f7 05 3d 00 00 00 01 00 00 00 74 2c 05 40 54 89 00 eb 14 8b 04 81 f7 05 27 00 00 00 02 00 00 00 74 16 05 90 5f 01 00 3d ff e0 f5 05 7e 0a b8 ff e0 f5 05 eb 03 8b 04 81 9d 9c f0 ff 0d 0a 00 00 00 9d e9 20 66 22 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=96,["relocs"]={{["off"]=92,["size"]=4,["target"]=2254464,["next"]=96},{["off"]=112,["size"]=8,["target"]=7097308},{["off"]=120,["size"]=8,["target"]=6655280},{["off"]=128,["size"]=8,["target"]=6642216},{["off"]=136,["size"]=8,["target"]=6642128},{["off"]=144,["size"]=8,["target"]=7123552}},["hud"]=false}},["spp"]={{["name"]="spp_menu_232e3e",["rva"]=2305598,["old"]="44 8b 0d 9b 1d 49 00",["sig"]="44 8b 0d 9b 1d 49 00 48 8b 4b 28 89 74 24 30 48 8d 54 24 50 45 33 c0 c7 44 24 28 08 00 00 00 89",["code"]="9c f0 ff 05 43 00 00 00 9d 41 53 4c 8b 1d 45 00 00 00 45 8b 4b 04 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 90 5f 01 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 fe 2d 23 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=71,["relocs"]={{["off"]=67,["size"]=4,["target"]=2305605,["next"]=71},{["off"]=87,["size"]=8,["target"]=7097308},{["off"]=95,["size"]=8,["target"]=6655280},{["off"]=103,["size"]=8,["target"]=6642216},{["off"]=111,["size"]=8,["target"]=6642128},{["off"]=119,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="spp_menu_41ac04",["rva"]=4303876,["old"]="44 8b 0d d5 9f 2a 00",["sig"]="44 8b 0d d5 9f 2a 00 44 89 6c 24 30 48 8d 54 24 60 45 33 c0 48 8b ce 44 89 6c 24 28 89 44 24 60",["code"]="9c f0 ff 05 43 00 00 00 9d 41 53 4c 8b 1d 45 00 00 00 45 8b 4b 04 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 90 5f 01 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 c4 ab 41 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=71,["relocs"]={{["off"]=67,["size"]=4,["target"]=4303883,["next"]=71},{["off"]=87,["size"]=8,["target"]=7097308},{["off"]=95,["size"]=8,["target"]=6655280},{["off"]=103,["size"]=8,["target"]=6642216},{["off"]=111,["size"]=8,["target"]=6642128},{["off"]=119,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="spp_menu_41ada4",["rva"]=4304292,["old"]="44 8b 0d 35 9e 2a 00",["sig"]="44 8b 0d 35 9e 2a 00 89 4c 24 60 44 89 6c 24 30 48 8d 54 24 60 45 33 c0 48 8b ce 44 89 6c 24 28",["code"]="9c f0 ff 05 43 00 00 00 9d 41 53 4c 8b 1d 45 00 00 00 45 8b 4b 04 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 90 5f 01 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 64 ad 41 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=71,["relocs"]={{["off"]=67,["size"]=4,["target"]=4304299,["next"]=71},{["off"]=87,["size"]=8,["target"]=7097308},{["off"]=95,["size"]=8,["target"]=6655280},{["off"]=103,["size"]=8,["target"]=6642216},{["off"]=111,["size"]=8,["target"]=6642128},{["off"]=119,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="spp_menu_42737d",["rva"]=4354941,["old"]="44 8b 0d 5c d8 29 00",["sig"]="44 8b 0d 5c d8 29 00 48 8b 0d a5 7a 29 00 45 33 f6 48 8d 54 24 60 45 33 c0 44 89 74 24 30 44 89",["code"]="9c f0 ff 05 43 00 00 00 9d 41 53 4c 8b 1d 45 00 00 00 45 8b 4b 04 41 5b 9c 83 3d 27 00 00 00 01 75 16 41 81 c1 90 5f 01 00 41 81 f9 ff e0 f5 05 7e 06 41 b9 ff e0 f5 05 9d 9c f0 ff 0d 0a 00 00 00 9d e9 3d 73 42 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=71,["relocs"]={{["off"]=67,["size"]=4,["target"]=4354948,["next"]=71},{["off"]=87,["size"]=8,["target"]=7097308},{["off"]=95,["size"]=8,["target"]=6655280},{["off"]=103,["size"]=8,["target"]=6642216},{["off"]=111,["size"]=8,["target"]=6642128},{["off"]=119,["size"]=8,["target"]=7123552}},["hud"]=false}},["killsight"]={{["name"]="killsight_hit",["rva"]=1826156,["old"]="e8 0f 02 00 00",["sig"]="e8 0f 02 00 00 0f 28 b4 24 10 01 00 00 84 c0 40 0f b6 de 48 8b b4 24 30 01 00 00 b8 01 00 00 00",["code"]="9c f0 ff 05 55 00 00 00 9d 9c 83 3d 48 00 00 00 01 75 32 41 80 7e 12 02 75 2b 41 80 7d 12 01 75 24 50 48 8b 05 48 00 00 00 8a 00 41 3a 46 18 58 75 13 41 b9 01 00 00 00 c7 44 24 38 00 00 00 00 c6 44 24 40 00 9d e8 35 df 1b ff 9c f0 ff 0d 0a 00 00 00 9d e9 18 dd 1b ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=89,["relocs"]={{["off"]=71,["size"]=4,["target"]=1826688,["next"]=75},{["off"]=85,["size"]=4,["target"]=1826161,["next"]=89},{["off"]=105,["size"]=8,["target"]=7097308},{["off"]=113,["size"]=8,["target"]=6655280},{["off"]=121,["size"]=8,["target"]=6642216},{["off"]=129,["size"]=8,["target"]=6642128},{["off"]=137,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="killsight_marker",["rva"]=2530742,["old"]="45 84 e4 0f 84 cd 01 00 00",["sig"]="45 84 e4 0f 84 cd 01 00 00 80 3d b2 ec 3e 00 00 0f 84 62 01 00 00 83 3d 71 ec 3e 00 00 7f 56 48",["code"]="9c f0 ff 05 62 00 00 00 9d 9c 83 3d 5d 00 00 00 00 74 0f 45 31 e4 c7 05 4e 00 00 00 00 00 00 00 eb 2c 83 3d 3d 00 00 00 01 75 23 4d 85 ed 74 1e 41 80 7d 12 02 75 17 50 48 8b 05 3f 00 00 00 8a 00 41 3a 45 18 58 75 06 41 bc 01 00 00 00 9d 45 84 e4 9c f0 ff 0d 10 00 00 00 9d 0f 84 2b 9f 26 ff e9 59 9d 26 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=102,["relocs"]={{["off"]=93,["size"]=4,["target"]=2531212,["next"]=97},{["off"]=98,["size"]=4,["target"]=2530751,["next"]=102},{["off"]=118,["size"]=8,["target"]=7097308},{["off"]=126,["size"]=8,["target"]=6655280},{["off"]=134,["size"]=8,["target"]=6642216},{["off"]=142,["size"]=8,["target"]=6642128},{["off"]=150,["size"]=8,["target"]=7123552}},["hud"]=true},{["name"]="killsight_color",["rva"]=2530789,["old"]="41 f6 85 7d 09 00 00 01",["sig"]="41 f6 85 7d 09 00 00 01 66 89 5c 24 30 66 89 5c 24 28 c7 44 24 20 01 00 00 00 41 8d 51 46 74 13",["code"]="9c f0 ff 05 49 00 00 00 9d 9c 83 3d 3c 00 00 00 01 75 23 41 80 7d 12 02 75 1c 50 48 8b 05 43 00 00 00 8a 00 41 3a 45 18 58 75 0b 9d 41 f6 85 7d 09 00 00 00 eb 09 9d 41 f6 85 7d 09 00 00 01 9c f0 ff 0d 0a 00 00 00 9d e9 a0 9d 26 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=77,["relocs"]={{["off"]=73,["size"]=4,["target"]=2530797,["next"]=77},{["off"]=93,["size"]=8,["target"]=7097308},{["off"]=101,["size"]=8,["target"]=6655280},{["off"]=109,["size"]=8,["target"]=6642216},{["off"]=117,["size"]=8,["target"]=6642128},{["off"]=125,["size"]=8,["target"]=7123552}},["hud"]=false}},["level"]={{["name"]="max_level",["rva"]=1707744,["old"]="40 55 57 41 54",["sig"]="40 55 57 41 54 41 55 41 56 48 8d 6c 24 c9 48 81 ec e0 00 00 00 48 8b 05 04 a2 46 00 48 33 c4 48",["code"]="9c f0 ff 05 92 01 00 00 9d 9c 50 53 51 52 56 57 55 41 50 41 51 41 52 41 53 41 54 41 55 41 56 41 57 48 81 ec a8 00 00 00 f3 0f 7f 44 24 40 f3 0f 7f 4c 24 50 f3 0f 7f 54 24 60 f3 0f 7f 5c 24 70 f3 0f 7f a4 24 80 00 00 00 f3 0f 7f ac 24 90 00 00 00 83 3d 3d 01 00 00 01 0f 85 dc 00 00 00 4c 8b 1d 50 01 00 00 49 3b 0b 74 13 49 3b 4b 60 74 0d 49 3b 8b c0 00 00 00 0f 85 bd 00 00 00 b8 01 00 00 00 ba 02 00 00 00 f0 0f b1 15 06 01 00 00 0f 85 a5 00 00 00 45 31 f6 48 8b 35 1e 01 00 00 48 8b 4e 58 48 85 c9 74 1d 80 79 12 01 75 17 0f be 46 1b 44 0f be 4e 1a 89 44 24 20 49 89 f0 31 d2 e8 2a 06 1a ff 48 83 c6 60 41 ff c6 41 83 fe 03 7c cd 31 db 48 8b 05 ea 00 00 00 48 69 d3 20 02 00 00 66 83 7c 10 28 63 7d 12 b9 ff ff ff ff 89 da 41 b8 63 00 00 00 e8 93 5f 25 ff ff c3 83 fb 0e 7c d1 45 31 f6 48 8b 35 b0 00 00 00 48 8b 4e 58 48 85 c9 74 0d 80 79 12 01 75 07 31 d2 e8 bc e4 19 ff 48 83 c6 60 41 ff c6 41 83 fe 03 7c dd c7 05 67 00 00 00 01 00 00 00 f3 0f 6f 44 24 40 f3 0f 6f 4c 24 50 f3 0f 6f 54 24 60 f3 0f 6f 5c 24 70 f3 0f 6f a4 24 80 00 00 00 f3 0f 6f ac 24 90 00 00 00 48 81 c4 a8 00 00 00 41 5f 41 5e 41 5d 41 5c 41 5b 41 5a 41 59 41 58 5d 5f 5e 5a 59 5b 58 9d 9c f0 ff 0d 0e 00 00 00 9d 55 57 41 54 e9 4f 0d 1a ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=406,["relocs"]={{["off"]=194,["size"]=4,["target"]=1705712,["next"]=198},{["off"]=249,["size"]=4,["target"]=2449552,["next"]=253},{["off"]=288,["size"]=4,["target"]=1697248,["next"]=292},{["off"]=402,["size"]=4,["target"]=1707749,["next"]=406},{["off"]=422,["size"]=8,["target"]=7097308},{["off"]=430,["size"]=8,["target"]=6655280},{["off"]=438,["size"]=8,["target"]=6642216},{["off"]=446,["size"]=8,["target"]=6642128},{["off"]=454,["size"]=8,["target"]=7123552}},["hud"]=false}},["leader"]={{["name"]="academy_leader",["rva"]=1844624,["old"]="40 55 57 48 81 ec 98 00 00 00",["sig"]="40 55 57 48 81 ec 98 00 00 00 bf 01 00 00 00 33 ed 40 38 3d e0 e0 57 00 0f 85 21 01 00 00 8b 0d",["code"]="9c f0 ff 05 00 03 00 00 9d 9c 50 53 51 52 56 57 55 41 50 41 51 41 52 41 53 41 54 41 55 41 56 41 57 48 81 ec 28 01 00 00 f3 0f 7f 44 24 40 f3 0f 7f 4c 24 50 f3 0f 7f 54 24 60 f3 0f 7f 5c 24 70 f3 0f 7f a4 24 80 00 00 00 f3 0f 7f ac 24 90 00 00 00 83 3d ab 02 00 00 01 0f 85 45 02 00 00 83 3d a6 02 00 00 01 0f 85 38 02 00 00 4c 8b 3d c9 02 00 00 41 83 bf 90 ec 6b 00 05 0f 85 23 02 00 00 41 80 bf 6d 12 74 00 00 0f 85 15 02 00 00 41 80 bf 40 09 74 00 00 0f 85 07 02 00 00 41 80 bf fe 78 65 00 01 0f 85 f9 01 00 00 41 83 bf b0 59 65 00 00 0f 85 eb 01 00 00 49 83 bf bc 59 65 00 00 0f 85 dd 01 00 00 41 8b 87 a0 59 65 00 41 8b 8f a4 59 65 00 83 f8 01 0f 8c c6 01 00 00 83 f8 03 0f 87 bd 01 00 00 83 f9 01 0f 8c b4 01 00 00 83 f9 03 0f 87 ab 01 00 00 39 c8 0f 4f c1 83 f8 01 0f 85 9d 01 00 00 49 8b 87 a8 9e 65 00 48 85 c0 0f 84 8d 01 00 00 83 78 30 00 0f 85 83 01 00 00 8b 88 c4 0e 01 00 85 c9 0f 8e 75 01 00 00 49 8b 87 70 9e 65 00 48 85 c0 0f 84 65 01 00 00 48 8b 00 48 85 c0 0f 84 59 01 00 00 0f b7 10 39 d1 0f 87 4e 01 00 00 ff c9 6b c9 0e 80 7c 08 08 09 0f 85 3e 01 00 00 66 81 7c 08 06 a8 2f 0f 85 31 01 00 00 8b 1d 97 01 00 00 83 fb 0e 0f 83 18 01 00 00 48 8b 35 a3 01 00 00 48 83 7e 58 00 0f 84 10 01 00 00 80 7e 18 00 0f 85 06 01 00 00 80 7e 1a 00 0f 85 fc 00 00 00 48 8b 3d 85 01 00 00 48 69 c3 20 02 00 00 48 01 c7 f6 87 ea 00 00 00 02 0f 84 d4 00 00 00 f6 87 ea 00 00 00 30 0f 85 c7 00 00 00 83 7f 10 00 0f 8e bd 00 00 00 f6 87 18 01 00 00 01 0f 85 b0 00 00 00 41 3a 9f e4 4b 6c 00 0f 84 97 00 00 00 48 8b 4e 58 31 d2 49 89 f0 45 31 c9 0f be 46 1b 89 44 24 20 e8 e0 04 1a ff 48 89 e7 48 81 c7 a0 00 00 00 31 c0 b9 10 00 00 00 f3 48 ab 89 9c 24 c8 00 00 00 c7 84 24 cc 00 00 00 ff ff ff ff c7 84 24 d0 00 00 00 ff ff ff ff 31 c9 41 0f be 84 0f e4 4b 6c 00 89 84 8c e0 00 00 00 ff c1 83 f9 10 7c e9 48 8d 8c 24 a0 00 00 00 ba bf 00 00 00 45 31 c0 41 b9 0c 22 01 00 e8 9b 9b 3d ff e8 d6 1e 1c ff 41 c6 87 82 4c 6c 00 00 31 c9 ba 01 00 00 00 e8 12 09 1c ff c7 05 74 00 00 00 00 00 00 00 eb 0a c7 05 68 00 00 00 02 00 00 00 f3 0f 6f 44 24 40 f3 0f 6f 4c 24 50 f3 0f 6f 54 24 60 f3 0f 6f 5c 24 70 f3 0f 6f a4 24 80 00 00 00 f3 0f 6f ac 24 90 00 00 00 48 81 c4 28 01 00 00 41 5f 41 5e 41 5d 41 5c 41 5b 41 5a 41 59 41 58 5d 5f 5e 5a 59 5b 58 9d 9c f0 ff 0d 13 00 00 00 9d 55 57 48 81 ec 98 00 00 00 e9 96 22 1c ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 40 01 00 00 00",["data"]=772,["relocs"]={{["off"]=524,["size"]=4,["target"]=1705712,["next"]=528},{["off"]=625,["size"]=4,["target"]=4038160,["next"]=629},{["off"]=630,["size"]=4,["target"]=1843536,["next"]=634},{["off"]=650,["size"]=4,["target"]=1837984,["next"]=654},{["off"]=768,["size"]=4,["target"]=1844634,["next"]=772},{["off"]=788,["size"]=8,["target"]=7097308},{["off"]=796,["size"]=8,["target"]=6655280},{["off"]=804,["size"]=8,["target"]=6642216},{["off"]=812,["size"]=8,["target"]=6642128},{["off"]=820,["size"]=8,["target"]=7123552},{["off"]=828,["size"]=8,["target"]=0}},["hud"]=false}},["items"]={{["name"]="items_change",["rva"]=158892,["old"]="8b cf 03 fd 3b 3d 92 10 63 00",["sig"]="8b cf 03 fd 3b 3d 92 10 63 00 7f 0a 66 41 89 1a 8b 3d 86 10 63 00 3b 3d 84 10 63 00 0f 4f 3d 7d",["code"]="9c f0 ff 05 65 00 00 00 9d 89 f9 01 ef 50 41 53 4c 8b 1d 8a 00 00 00 83 3d 4b 00 00 00 01 75 34 81 fe 00 a0 00 00 72 2c 81 fe 2a a0 00 00 73 24 41 83 7b 4c 01 7e 1d 83 f9 00 7f 05 83 ff 00 7e 13 b8 5a 00 00 00 41 3b 43 4c 41 0f 4f 43 4c 39 c7 0f 4c f8 41 3b 7b 48 41 5b 58 9c f0 ff 0d 0a 00 00 00 9d e9 4d 6c 02 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 7d 65 40 01 00 00 00",["data"]=105,["relocs"]={{["off"]=101,["size"]=4,["target"]=158902,["next"]=105},{["off"]=121,["size"]=8,["target"]=7097308},{["off"]=129,["size"]=8,["target"]=6655280},{["off"]=137,["size"]=8,["target"]=6642216},{["off"]=145,["size"]=8,["target"]=6642128},{["off"]=153,["size"]=8,["target"]=7123552},{["off"]=161,["size"]=8,["target"]=6651136}},["hud"]=false},{["name"]="items_reserved_use",["rva"]=197373,["old"]="44 8b c9 03 ce 3b 0d 40 7a 62 00",["sig"]="44 8b c9 03 ce 3b 0d 40 7a 62 00 7f 0a 66 45 89 32 8b 0d 34 7a 62 00 3b 0d 32 7a 62 00 0f 4f 0d",["code"]="9c f0 ff 05 67 00 00 00 9d 41 89 c9 01 f1 50 41 53 4c 8b 1d 8b 00 00 00 83 3d 4c 00 00 00 01 75 35 81 ff 00 a0 00 00 72 2d 81 ff 2a a0 00 00 73 25 41 83 7b 4c 01 7e 1e 41 83 f9 00 7f 05 83 f9 00 7e 13 b8 5a 00 00 00 41 3b 43 4c 41 0f 4f 43 4c 39 c1 0f 4c c8 41 3b 4b 48 41 5b 58 9c f0 ff 0d 0a 00 00 00 9d e9 9d 02 03 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 7d 65 40 01 00 00 00",["data"]=107,["relocs"]={{["off"]=103,["size"]=4,["target"]=197384,["next"]=107},{["off"]=123,["size"]=8,["target"]=7097308},{["off"]=131,["size"]=8,["target"]=6655280},{["off"]=139,["size"]=8,["target"]=6642216},{["off"]=147,["size"]=8,["target"]=6642128},{["off"]=155,["size"]=8,["target"]=7123552},{["off"]=163,["size"]=8,["target"]=6651136}},["hud"]=false},{["name"]="items_initial",["rva"]=2534848,["old"]="48 89 5c 24 08",["sig"]="48 89 5c 24 08 48 89 74 24 18 48 89 7c 24 20 55 41 54 41 55 41 56 41 57 48 8d 6c 24 c9 48 81 ec",["code"]="9c f0 ff 05 13 01 00 00 9d 9c 50 53 51 52 56 57 55 41 50 41 51 41 52 41 53 41 54 41 55 41 56 41 57 48 81 ec a8 00 00 00 f3 0f 7f 44 24 40 f3 0f 7f 4c 24 50 f3 0f 7f 54 24 60 f3 0f 7f 5c 24 70 f3 0f 7f a4 24 80 00 00 00 f3 0f 7f ac 24 90 00 00 00 83 3d be 00 00 00 01 75 60 b8 01 00 00 00 31 d2 f0 0f b1 15 b5 00 00 00 75 4f 4c 8b 3d dc 00 00 00 49 8b 77 30 48 85 f6 74 3f 31 db 41 3b 5f 44 7d 37 0f b7 16 81 fa 00 a0 00 00 72 24 81 fa 2a a0 00 00 73 1c 66 83 7e 02 00 74 15 66 83 7e 02 5a 7d 0e 45 31 c0 41 b9 01 00 00 00 e8 1d 6b 02 ff ff c3 48 83 c6 04 eb c3 f3 0f 6f 44 24 40 f3 0f 6f 4c 24 50 f3 0f 6f 54 24 60 f3 0f 6f 5c 24 70 f3 0f 6f a4 24 80 00 00 00 f3 0f 6f ac 24 90 00 00 00 48 81 c4 a8 00 00 00 41 5f 41 5e 41 5d 41 5c 41 5b 41 5a 41 59 41 58 5d 5f 5e 5a 59 5b 58 9d 48 89 5c 24 08 9c f0 ff 0d 0a 00 00 00 9d e9 ae ac 26 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 7d 65 40 01 00 00 00",["data"]=279,["relocs"]={{["off"]=175,["size"]=4,["target"]=158672,["next"]=179},{["off"]=275,["size"]=4,["target"]=2534853,["next"]=279},{["off"]=295,["size"]=8,["target"]=7097308},{["off"]=303,["size"]=8,["target"]=6655280},{["off"]=311,["size"]=8,["target"]=6642216},{["off"]=319,["size"]=8,["target"]=6642128},{["off"]=327,["size"]=8,["target"]=7123552},{["off"]=335,["size"]=8,["target"]=6651136}},["hud"]=false}},["so"]={{["name"]="armed_so_success",["rva"]=1980731,["old"]="48 8b d7 e8 4d d6 ff ff",["sig"]="48 8b d7 e8 4d d6 ff ff 84 c0 74 0d 4c 8b c7 8b d3 41 8b c9 e8 4c 1e 00 00 ff c3 48 83 c7 34 48",["code"]="9c f0 ff 05 11 01 00 00 9d 9c 50 53 51 52 56 57 55 41 50 41 51 41 52 41 53 41 54 41 55 41 56 41 57 48 81 ec a0 00 00 00 f3 0f 7f 44 24 40 f3 0f 7f 4c 24 50 f3 0f 7f 54 24 60 f3 0f 7f 5c 24 70 f3 0f 7f a4 24 80 00 00 00 f3 0f 7f ac 24 90 00 00 00 83 3d bc 00 00 00 01 75 5b 83 fb 01 7c 56 83 fb 08 7f 51 80 7f 20 01 75 4b f6 47 24 01 75 45 80 7f 18 00 75 3f 48 8b 05 cf 00 00 00 80 b8 6d 12 74 00 00 75 2f 80 b8 40 09 74 00 00 75 26 44 89 c9 e8 18 6e 1e ff 48 85 c0 74 19 c6 47 0c 01 49 89 c1 31 c9 0f bf 16 41 89 d8 48 89 7c 24 20 e8 aa 50 1e ff f3 0f 6f 44 24 40 f3 0f 6f 4c 24 50 f3 0f 6f 54 24 60 f3 0f 6f 5c 24 70 f3 0f 6f a4 24 80 00 00 00 f3 0f 6f ac 24 90 00 00 00 48 81 c4 a0 00 00 00 41 5f 41 5e 41 5d 41 5c 41 5b 41 5a 41 59 41 58 5d 5f 5e 5a 59 5b 58 9d 48 89 fa e8 89 0e 1e ff 9c f0 ff 0d 0a 00 00 00 9d e9 2e 38 1e ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 40 01 00 00 00",["data"]=277,["relocs"]={{["off"]=148,["size"]=4,["target"]=1994416,["next"]=152},{["off"]=178,["size"]=4,["target"]=1986912,["next"]=182},{["off"]=259,["size"]=4,["target"]=1970064,["next"]=263},{["off"]=273,["size"]=4,["target"]=1980739,["next"]=277},{["off"]=293,["size"]=8,["target"]=7097308},{["off"]=301,["size"]=8,["target"]=6655280},{["off"]=309,["size"]=8,["target"]=6642216},{["off"]=317,["size"]=8,["target"]=6642128},{["off"]=325,["size"]=8,["target"]=7123552},{["off"]=333,["size"]=8,["target"]=0}},["hud"]=false}},["rest"]={{["name"]="rest_activity_1a94da",["rva"]=1742042,["old"]="e8 31 60 1e 00",["sig"]="e8 31 60 1e 00 0f b7 56 08 45 33 c9 41 b0 01 48 8b cd e8 ff 62 1e 00 c6 45 53 01 0f bf 46 0e 05",["code"]="9c f0 ff 05 29 00 00 00 9d 9c 83 3d 1c 00 00 00 01 75 06 85 d2 7e 02 31 d2 9d e8 f1 f4 38 ff 9c f0 ff 0d 0a 00 00 00 9d e9 b2 94 1a ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=45,["relocs"]={{["off"]=27,["size"]=4,["target"]=3732752,["next"]=31},{["off"]=41,["size"]=4,["target"]=1742047,["next"]=45},{["off"]=61,["size"]=8,["target"]=7097308},{["off"]=69,["size"]=8,["target"]=6655280},{["off"]=77,["size"]=8,["target"]=6642216},{["off"]=85,["size"]=8,["target"]=6642128},{["off"]=93,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="rest_activity_36032b",["rva"]=3539755,["old"]="e8 e0 f1 02 00",["sig"]="e8 e0 f1 02 00 85 ed 78 11 48 8b 0d c5 e8 41 00 ba 11 00 00 00 e8 0b 37 d1 ff 48 8b 5c 24 30 48",["code"]="9c f0 ff 05 29 00 00 00 9d 9c 83 3d 1c 00 00 00 01 75 06 85 d2 7e 02 31 d2 9d e8 f1 f4 38 ff 9c f0 ff 0d 0a 00 00 00 9d e9 03 03 36 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=45,["relocs"]={{["off"]=27,["size"]=4,["target"]=3732752,["next"]=31},{["off"]=41,["size"]=4,["target"]=3539760,["next"]=45},{["off"]=61,["size"]=8,["target"]=7097308},{["off"]=69,["size"]=8,["target"]=6655280},{["off"]=77,["size"]=8,["target"]=6642216},{["off"]=85,["size"]=8,["target"]=6642128},{["off"]=93,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="rest_travel_34a90b",["rva"]=3451147,["old"]="66 83 81 70 09 00 00 06",["sig"]="66 83 81 70 09 00 00 06 49 8b ce e8 e5 52 ff ff 44 89 7f 54 49 8b 06 83 88 34 02 00 00 01 44 88",["code"]="9c f0 ff 05 33 00 00 00 9d 9c 83 3d 26 00 00 00 01 75 0d 9d 31 d2 66 83 81 70 09 00 00 00 eb 09 9d 66 83 81 70 09 00 00 06 9c f0 ff 0d 0a 00 00 00 9d e9 dc a8 34 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=55,["relocs"]={{["off"]=51,["size"]=4,["target"]=3451155,["next"]=55},{["off"]=71,["size"]=8,["target"]=7097308},{["off"]=79,["size"]=8,["target"]=6655280},{["off"]=87,["size"]=8,["target"]=6642216},{["off"]=95,["size"]=8,["target"]=6642128},{["off"]=103,["size"]=8,["target"]=7123552}},["hud"]=false},{["name"]="rest_travel_378e97",["rva"]=3640983,["old"]="66 83 81 70 09 00 00 06",["sig"]="66 83 81 70 09 00 00 06 48 8b c8 e8 59 6d fc ff 85 ed 78 29 80 3d bb 83 3c 00 00 75 0d 80 3d 85",["code"]="9c f0 ff 05 33 00 00 00 9d 9c 83 3d 26 00 00 00 01 75 0d 9d 31 d2 66 83 81 70 09 00 00 00 eb 09 9d 66 83 81 70 09 00 00 06 9c f0 ff 0d 0a 00 00 00 9d e9 68 8e 37 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=55,["relocs"]={{["off"]=51,["size"]=4,["target"]=3640991,["next"]=55},{["off"]=71,["size"]=8,["target"]=7097308},{["off"]=79,["size"]=8,["target"]=6655280},{["off"]=87,["size"]=8,["target"]=6642216},{["off"]=95,["size"]=8,["target"]=6642128},{["off"]=103,["size"]=8,["target"]=7123552}},["hud"]=false}},["encounters"]={{["name"]="no_random_encounters",["rva"]=4707838,["old"]="e8 9d b8 00 00",["sig"]="e8 9d b8 00 00 84 c0 74 08 b0 01 48 83 c4 20 5f c3 8b 87 64 6e 00 00 48 89 5c 24 30 85 c0 7e 08",["code"]="9c f0 ff 05 28 00 00 00 9d 9c 83 3d 1b 00 00 00 01 75 05 9d 31 c0 eb 06 9d e8 82 8e 48 ff 9c f0 ff 0d 0a 00 00 00 9d e9 d7 d5 47 ff 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 dc 4b 6c 40 01 00 00 00 30 8d 65 40 01 00 00 00 28 5a 65 40 01 00 00 00 d0 59 65 40 01 00 00 00 60 b2 6c 40 01 00 00 00 00 00 00 00 00 00 00 00",["data"]=44,["relocs"]={{["off"]=26,["size"]=4,["target"]=4755104,["next"]=30},{["off"]=40,["size"]=4,["target"]=4707843,["next"]=44},{["off"]=60,["size"]=8,["target"]=7097308},{["off"]=68,["size"]=8,["target"]=6655280},{["off"]=76,["size"]=8,["target"]=6642216},{["off"]=84,["size"]=8,["target"]=6642128},{["off"]=92,["size"]=8,["target"]=7123552}},["hud"]=false}}}
local catalogs = {["item"]={["rva"]=6651152,["count"]=42,["stride"]=68,["md5"]="49c4eb102fa4b60d30e27fa4361285b1"},["accessory"]={["rva"]=6652432,["count"]=260,["stride"]=52,["md5"]="10d5aea200827fcf596376f9320bd975"},["weapon"]={["rva"]=6652256,["count"]=228,["stride"]=52,["md5"]="2a5f5bcf18b7d37ef70cbe6c5b6f2920"},["magic"]={["rva"]=6651312,["count"]=32,["stride"]=20,["md5"]="0f1d2d46b4d5c8788ed6a5bf3037b63e"},["key"]={["rva"]=6651232,["count"]=169,["stride"]=28,["md5"]="d8e1de5fd0b0131a9681a2c1fc66f706"},["shop"]={["rva"]=6653088,["count"]=399,["stride"]=4,["md5"]="e9be08047e7f2f57963146b825f7bd7e"},["level"]={["rva"]=6650928,["count"]=99,["stride"]=8,["md5"]="65da43781a73c269ab3d47a0567a95b0"}}
local dependencies = {["killsight"]={{["rva"]=1826688,["bytes"]="84 c9 0f 84 88 00 00 00 45 84 c9 75 07 83 7c 24 28 00 7e 07 83 7c 24 38 05 7e 07 80 7c 24 48 00"}},["level"]={{["rva"]=2449552,["bytes"]="48 89 5c 24 08 57 48 83 ec 20 4c 8b 0d 8f 1b 40 00 49 63 c0 45 33 c0 8b da 8b f9 4d 85 c9 74 1f"},{["rva"]=2451248,["bytes"]="40 56 41 54 41 55 41 56 b8 78 4b 00 00 e8 fe ee ec ff 48 2b e0 48 8b 05 b4 49 3b 00 48 33 c4 48"},{["rva"]=2452096,["bytes"]="40 53 55 57 41 56 48 81 ec a8 00 00 00 48 8b 05 6c 46 3b 00 48 33 c4 48 89 84 24 80 00 00 00 33"},{["rva"]=1705712,["bytes"]="48 89 5c 24 18 56 4c 63 44 24 30 40 32 f6 48 8b d9 84 d2 74 2e 48 0f be 91 64 03 00 00 48 6b d2"},{["rva"]=1697248,["bytes"]="40 57 48 0f be 81 68 08 00 00 40 32 ff 4c 8b c1 83 f8 02 0f 87 a3 02 00 00 4c 8d 0c 40 48 8d 05"}},["items"]={{["rva"]=158672,["bytes"]="48 89 5c 24 08 48 89 6c 24 10 48 89 74 24 18 48 89 7c 24 20 41 56 48 83 ec 20 33 db 8b c2 45 0f"},{["rva"]=159344,["bytes"]="48 83 ec 08 48 8b 15 b5 0e 63 00 45 33 c0 48 85 d2 0f 84 91 00 00 00 48 89 5c 24 10 8b 1d b2 0e"},{["rva"]=159520,["bytes"]="48 83 ec 48 8b 05 d6 0d 63 00 83 c0 f6 83 f8 05 77 43 4c 8d 0d c7 90 fd ff 48 98 41 8b 8c 81 3c"},{["rva"]=159088,["bytes"]="48 89 5c 24 08 48 89 74 24 10 48 89 7c 24 18 8b c2 33 f6 41 8b f8 c1 e8 0c 8b da 3b 05 6f 0f 63"}},["leader"]={{["rva"]=4038160,["bytes"]="48 8b c4 53 55 56 57 41 54 48 83 ec 40 48 8b f1 81 fa bf 00 00 00 0f 85 b1 03 00 00 41 81 f9 0c"},{["rva"]=1843536,["bytes"]="48 8b c4 41 57 48 81 ec d0 00 00 00 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 f0 4c 89 60 e8"},{["rva"]=1846544,["bytes"]="44 89 4c 24 20 41 55 48 83 ec 70 45 8b e8 45 8b d9 44 0f b6 c1 83 fa 02 0f 87 22 03 00 00 48 89"},{["rva"]=1834432,["bytes"]="48 89 6c 24 18 48 89 74 24 20 57 48 83 ec 20 48 63 f9 45 8b d9 41 8b f0 8b ea 83 ff 02 0f 87 fe"},{["rva"]=1837984,["bytes"]="48 8b c4 41 57 48 83 ec 40 4c 63 c9 44 8b fa 41 83 f9 02 0f 87 e1 01 00 00 48 89 58 08 48 89 68"},{["rva"]=1705712,["bytes"]="48 89 5c 24 18 56 4c 63 44 24 30 40 32 f6 48 8b d9 84 d2 74 2e 48 0f be 91 64 03 00 00 48 6b d2"}},["spp"]={{["rva"]=2423120,["bytes"]="48 89 5c 24 08 57 48 83 ec 20 48 63 f9 45 33 c0 8b da 83 ff 01 0f 87 c0 00 00 00 8b 15 6f 52 47"}},["so"]={{["rva"]=1986912,["bytes"]="4c 8b dc 45 89 43 18 89 4c 24 08 55 41 55 48 81 ec a8 00 00 00 4d 8b e9 8b ea 8b c1 4d 85 c9 0f"},{["rva"]=1994416,["bytes"]="48 89 5c 24 08 57 48 83 ec 20 8b d1 33 db 8b f9 c1 fa 0c 85 d2 74 2c ff ca 75 2f e8 d0 23 19 00"},{["rva"]=1970064,["bytes"]="48 85 d2 74 37 f6 42 24 01 75 31 0f b7 4a 2e 66 85 c9 7e 28 fe 4a 30 0f b6 42 30 84 c0 7f 1d 66"},{["rva"]=1978064,["bytes"]="40 56 57 41 57 48 83 ec 30 8b 05 b9 d6 55 00 44 0f b6 15 59 da 55 00 8b f9 0f b6 0d 7d e3 55 00"},{["rva"]=2012448,["bytes"]="40 55 53 56 57 41 56 41 57 48 8d ac 24 18 f6 ff ff 48 81 ec e8 0a 00 00 48 8b 05 c1 fb 41 00 48"},{["rva"]=1996816,["bytes"]="40 55 56 41 54 41 55 41 56 48 83 ec 30 44 8b e1 45 33 ed 8b ca 4d 8b f0 8b ea 45 89 28 e8 7e f6"}},["rest"]={{["rva"]=3732752,["bytes"]="48 89 5c 24 20 55 48 83 ec 20 48 83 39 00 8b ea 48 8b d9 0f 84 c7 00 00 00 4c 89 74 24 40 e8 2d"}},["encounters"]={{["rva"]=4755104,["bytes"]="40 57 48 81 ec 90 00 00 00 8b 81 94 6e 00 00 48 8b f9 83 f8 01 75 0b 32 c0 48 81 c4 90 00 00 00"}}}
local R = {features={}, rows={}, pid=nil, closing=false, stopping=false, muted=false,
           lastError=nil, ready=false, ticks=0}
KatzyFF0 = R
local moduleName = 'fftype0hd.exe'
local expectedMD5 = '95cad8f1c6e8e0e153d7211659982399'
local order = {'hp','ap','money','spp','shop','killsight','level','leader','items','so','rest','encounters'}
local rowIDs = {hp=10,ap=11,money=12,killsight=13,level=14,items=16,spp=17,so=18,rest=19,encounters=20}
local function optionName(key)
  return R.rows[key] and R.rows[key].Description or (key=='shop' and 'Infinite Money / Infinite SPP' or key)
end
local function fail(message) error(message,0) end
local function bytes(hex)
  local t={}; for s in hex:gmatch('%x%x') do t[#t+1]=tonumber(s,16) end; return t
end
local function equal(a,b)
  if not a or #a~=#b then return false end
  for i=1,#b do if a[i]~=b[i] then return false end end
  return true
end
local function put(t,offset,value,size)
  for i=1,size do t[offset+i]=value&amp;255; value=value&gt;&gt;8 end
end
local function writeChecked(address,t,operation)
  local count=writeBytes(address,t)
  if count~=#t or not equal(readBytes(address,#t,true),t) then
    fail((operation or 'Table cleanup')..': the memory write could not be verified. Cleanup will retry while the game remains open.')
  end
end
local function write32(address,n,operation)
  local t={};put(t,0,n,4);writeChecked(address,t,operation)
end
-- Native code may acknowledge a request before Lua can read it back. Verify
-- the write count for this mailbox only; code patches still require readback.
local function publishRequest(q,key,value)
  if writeBytes(q.data+8,{value or 1,0,0,0})~=4 then
    local f=R.features[key]
    if f then f.off=true end
    fail((R.rows[key] and R.rows[key].Description or key)..': the request could not be written. The option is stopping and cleanup will retry.')
  end
end
local function signed32(value)
  if value &lt; -0x80000000 or value &gt; 0x7fffffff then
    fail('A nearby memory block could not be reserved for this option. Restart the game and try again.')
  end
  return value &amp; 0xffffffff
end
local function paused(fn)
  local wasPaused=isPaused()
  if not wasPaused then
    pause()
    if not isPaused() then fail('Cheat Engine could not pause the game safely. Try the option again after the game finishes loading.') end
  end
  local results=table.pack(pcall(fn))
  if not wasPaused then unpause() end
  if not results[1] then error(results[2],0) end
  return table.unpack(results,2,results.n)
end
function R:notify(message)
  self.lastError=tostring(message)
  if self.closing or self.muted then return end
  -- All runtime failures below originate from concrete, human-readable guards.
  local clean=self.lastError
  if clean:find(':%d+:') or clean:find('stack traceback') then
    clean='Cheat Engine could not complete this action. Use the 64-bit Cheat Engine 7.7 or newer and reload the table.'
  end
  showMessage(clean)
end

-- Local Windows APIs only inspect thread context and process identity. No DLL is
-- loaded into the game. Context buffers belong to CE and contain no executable code.
local api={}
local function win(name,...)
  if not api[name] then api[name]=getAddress('kernel32.'..name,true) end
  if not api[name] then fail('A Windows memory-inspection function is unavailable. Use 64-bit Cheat Engine.') end
  return executeCodeLocalEx(api[name],...)
end
local function creationTime()
  local s=createMemoryStream();s.Size=64
  local p=s.Memory
  local ok,v=pcall(function()
    if win('GetProcessTimes',getOpenedProcessHandle(),p,p+8,p+16,p+24)==0 then return nil end
    return readQwordLocal(p)
  end)
  s.destroy()
  if not ok then error(v,0) end
  return v
end
function R:same()
  return self.pid and getOpenedProcessID()==self.pid and
         creationTime()==self.created and readSmallInteger(self.base)==0x5a4d
end
function R:selectOldContext()
  if not self.pid then return false end
  local processes=getProcesslist()
  if not processes then fail('The running processes could not be checked. Cleanup will retry when Windows allows access.') end
  if not processes[self.pid] then return false end
  if getOpenedProcessID()~=self.pid then
    local found=false
    for _,m in ipairs(enumModules(self.pid) or {}) do
      if m.Name:lower()==moduleName and m.PathToFile==self.path and m.Address==self.base then found=true end
    end
    if not found then fail('The original game session could not be inspected. Leave the game running so cleanup can retry.') end
    openProcess(self.pid)
  end
  local born=creationTime()
  if not born then fail('The game process could not be inspected. Cleanup will retry when access returns.') end
  if born~=self.created then return false end
  if readSmallInteger(self.base)~=0x5a4d then fail('The game memory is temporarily unavailable. Leave the game running so cleanup can retry.') end
  return true
end
function R:attach()
  if self.stopping then return false end
  if self:same() then return true end
  if next(self.features) then
    if self:selectOldContext() then return true end
    -- A different process generation cannot own these allocations or hooks.
    self.features={};self:untickAll()
  end
  self.ready=false;self.pid=nil
  local candidates={}
  for pid,name in pairs(getProcesslist()) do
    if name:lower()==moduleName then candidates[#candidates+1]=pid end
  end
  if #candidates~=1 then
    self.reason=#candidates==0 and 'Start Final Fantasy Type-0 HD and load your save first.' or 'More than one game process is running. Close the extra copy first.'
    return false
  end
  local pid=candidates[1];local main
  for _,m in ipairs(enumModules(pid) or {}) do if m.Name:lower()==moduleName then main=m end end
  if not main or not main.PathToFile or not main.Is64Bit then
    self.reason='The game executable could not be identified. Run the 64-bit Steam version.';return false
  end
  if md5file(main.PathToFile):lower()~=expectedMD5 then
    self.reason='This executable is not the supported Steam build 3301128. A table made for this game build is required.';return false
  end
  if getOpenedProcessID()~=pid then openProcess(pid) end
  if getOpenedProcessID()~=pid or not targetIs64Bit() then self.reason='Cheat Engine could not attach to the game.';return false end
  self.pid=pid;self.path=main.PathToFile;self.base=main.Address;self.created=creationTime()
  if not self.created or readSmallInteger(self.base)~=0x5a4d then self.pid=nil;self.reason='The game is still starting. Try again after loading a save.';return false end
  self.ready=true;self.reason=nil
  return true
end
function R:checkData(key)
  local names=(key=='money' or key=='spp') and {'item','accessory','weapon','magic','key','shop'} or key=='items' and {'item'} or {'level'}
  for _,name in ipairs(names) do
    local d=catalogs[name];local p=readQword(self.base+d.rva)
    if not p or p==0 or readInteger(self.base+d.rva+8)~=d.count then fail('Load a save before enabling this option.') end
    if md5memory(p,d.count*d.stride):lower()~=d.md5 then
      fail('The loaded game data does not match this table. Disable game-data mods or use a matching table.')
    end
  end
end
function R:checkItems()
  if readInteger(self.base+0x657d00)~=10 or
     readQword(self.base+0x657d30)~=self.base+0x6c8208 or
     readInteger(self.base+0x657d44)~=212 or readInteger(self.base+0x657d48)~=0 then
    fail('The consumable inventory is not ready. Load a save first.')
  end
  local cap=readInteger(self.base+0x657d4c)
  if not cap or cap&lt;1 or cap&gt;99 then fail('The consumable stack limit differs from this game build.') end
  local raw=readBytes(self.base+0x6c8208,212*4,true)
  local stored=readInteger(self.base+0x6c500c)
  if not raw or not stored then fail('The consumable inventory could not be read.') end
  local total=0
  for i=0,211 do
    local o=i*4
    local id=raw[o+1]|(raw[o+2]&lt;&lt;8)
    local amount=raw[o+3]|(raw[o+4]&lt;&lt;8)
    total=total+id+(~amount)
  end
  local checksum=(total*2)&amp;0xffffffff
  if checksum~=0 then checksum=checksum~0x46ca6f51 end
  if stored~=0 and (stored&amp;0xffffffff)~=checksum then
    fail('The inventory is mid-update or has been changed by another trainer. Disable other item cheats and try again.')
  end
end

-- A normal value row uses private request storage, never a live roster field.
-- Selecting a value requests one native switch; freezing the row repeats that
-- request only if the academy's current leader subsequently changes.
function R:leaderControl()
  local f=self.features.leader
  if f and not f.off then return f.hooks[1] end
end
function R:currentLeader()
  local id=readBytes(self.base+0x6c4be4,1,true)
  return id and id[1]&lt;14 and id[1] or nil
end
function R:academy()
  if not self:same() or readInteger(self.base+0x6bec90)~=5 then return false end
  local a,b=readInteger(self.base+0x6559a0),readInteger(self.base+0x6559a4)
  if not a or not b or a&lt;1 or b&lt;1 or a&gt;3 or b&gt;3 or math.min(a,b)~=1 then return false end
  local scene=readQword(self.base+0x659ea8)
  local wrapper=readQword(self.base+0x659e70)
  if not scene or scene==0 or not wrapper or wrapper==0 or readInteger(scene+0x30)~=0 then return false end
  local index=readInteger(scene+0x10ec4)
  local catalog=readQword(wrapper)
  if not index or index&lt;1 or not catalog or catalog==0 then return false end
  local count=readSmallInteger(catalog)
  if not count or index&gt;count then return false end
  local rec=catalog+(index-1)*14
  local kind=readBytes(rec+8,1,true)
  return kind and kind[1]==9 and readSmallInteger(rec+6)==12200
end
function R:requestLeader()
  local q=self:leaderControl()
  if not self.rows.main.Active then fail('Enable [MAIN] before selecting an academy leader.') end
  if not q then fail('Academy Leader stopped. Turn [MAIN] off and on to prepare the selector again.') end
  if not self:academy() then fail('Choose a leader during normal academy exploration, after loading your save.') end
  local id=readInteger(q.data+12)
  if not id or id&lt;0 or id&gt;13 then fail('Choose a Class Zero character from the list.') end
  local flags=readSmallInteger(self.base+0x6cb260+id*0x220+0xea)
  local hp=readInteger(self.base+0x6cb260+id*0x220+0x10)
  if not flags or flags&amp;0x32~=2 or not hp or hp&lt;=0 then fail('That character is not currently available. Choose an available Class Zero member.') end
  publishRequest(q,'leader')
end
function R:stopSelector()
  self:untick('leader')
  if self.rows.leader then self.rows.leader.Address='0' end
end
function R:checkLevelChecksum()
  local raw=readBytes(self.base+0x6cb260,43*0x220,true)
  local stored=readInteger(self.base+0x6c5028)
  if not raw or not stored then fail('The roster could not be read. Load a save first.') end
  local function dword(off)
    return raw[off+1]|(raw[off+2]&lt;&lt;8)|(raw[off+3]&lt;&lt;16)|(raw[off+4]&lt;&lt;24)
  end
  local total=0
  for i=0,42 do
    local off=i*0x220
    if raw[off+0xea+1]&amp;0x10==0 then
      total=total+dword(off+0xf4)+dword(off+0x3c)
      for field=0x40,0x64,4 do total=total+dword(off+field) end
    end
  end
  local checksum=((~total)&lt;&lt;3)&amp;0xffffffff
  if checksum~=0 then checksum=checksum~0x46ca6f51 end
  if stored~=0 and (stored&amp;0xffffffff)~=checksum then
    fail('The roster is mid-update or has been changed by another trainer. Disable other stat cheats and try again.')
  end
end

-- A live cave is freed only after its entry is restored, its call count is zero,
-- and every suspended game thread is outside the allocation. Counts also cover
-- native calls which temporarily leave a cave and will return to it.
local function threadsOutside(hooks,entries)
  local list=createStringlist();getThreadlist(list)
  if list.Count==0 then list.destroy();return false end
  local s=createMemoryStream();s.Size=0x520
  local p=(s.Memory+15)&amp;~15
  local safe=true
  local ok,err=pcall(function()
    for i=0,list.Count-1 do
      local tid=tonumber(list[i],16)
      local h=tid and win('OpenThread',0x48,0,tid) or 0
      if h==0 then safe=false;break end
      local got,rip=pcall(function()
        writeIntegerLocal(p+0x30,0x100001)
        if win('GetThreadContext',h,p)==0 then return nil end
        return readQwordLocal(p+0xf8)
      end)
      win('CloseHandle',h)
      if not got or not rip then safe=false;break end
      for _,q in ipairs(hooks) do
        if entries then
          if rip&gt;q.address and rip&lt;q.address+#q.old then safe=false end
        elseif q.alloc and rip&gt;=q.alloc and rip&lt;q.alloc+0x1000 then safe=false end
      end
      if not safe then break end
    end
  end)
  s.destroy();list.destroy()
  if not ok then error(err,0) end
  return safe
end
local function resolve(base,s)
  local sig=bytes(s.sig);local a=base+s.rva
  if equal(readBytes(a,#sig,true),sig) then return a end
  local found=AOBScanModuleUnique(moduleName,s.sig,'+X')
  -- The native dependencies are build-specific; a moved match is not a port.
  if found~=a or not equal(readBytes(found,#sig,true),sig) then
    fail('The game code has changed or another trainer is using this option. Disable conflicting patches and try again.')
  end
  return a
end
local function relocated(base,s,allocation)
  local code=bytes(s.code)
  for _,rel in ipairs(s.relocs) do
    local target=base+rel.target
    local v=rel.size==4 and signed32(target-(allocation+rel.next)) or target
    put(code,rel.off,v,rel.size)
  end
  return code
end

-- v1.0/v1.1 could leave a disabled marker hook after CE closed before a HUD
-- refresh. Recover only this exact stopped stub, with no thread inside it.
-- New stubs identify their CE owner; legacy recovery requires a sole CE process.
function R:recoverStoppedMarker()
  if self.features.killsight then return end
  local s=specs.killsight[2]
  local address=self.base+s.rva
  local head=readBytes(address,#bytes(s.old),true)
  if not head or head[1]~=0xe9 then return end
  paused(function()
    local disp=head[2]|(head[3]&lt;&lt;8)|(head[4]&lt;&lt;16)|(head[5]&lt;&lt;24)
    if disp&gt;=0x80000000 then disp=disp-0x100000000 end
    local allocation=address+5+disp
    if allocation%0x1000~=0 then return end
    local code=relocated(self.base,s,allocation)
    local actual=readBytes(allocation,#code,true)
    if not actual then return end
    for i=1,s.data do if actual[i]~=code[i] then return end end
    for i=s.data+17,s.data+56 do if actual[i]~=code[i] then return end end
    local data=allocation+s.data
    if readInteger(data)~=0 or readInteger(data+4)~=0 or readInteger(data+12)~=0 then return end
    local dirty=readInteger(data+8)
    if dirty~=0 and dirty~=1 then return end
    local owner,tag=readInteger(data+56),readInteger(data+60)
    local processes=getProcesslist()
    if not processes then return end
    if owner==0 and tag==0 then
      local count=0
      for pid,name in pairs(processes) do
        if name:lower():find('cheatengine',1,true) then
          if pid~=getCheatEngineProcessID() then return end
          count=count+1
        end
      end
      if count~=1 then return end
    elseif tag~=0x4b5a4646 or not owner or owner==0 or processes[owner] then return end
    local expected={0xe9};put(expected,1,disp,4)
    for i=6,#head do expected[i]=0x90 end
    if not equal(head,expected) or not equal(readBytes(address,#head,true),head) then return end
    local signature=bytes(s.sig)
    local tail=readBytes(address,#signature,true)
    if not tail then return end
    for i=#head+1,#signature do if tail[i]~=signature[i] then return end end
    local q={spec=s,address=address,old=bytes(s.old),patch=head,alloc=allocation,
             data=data,code=code,attempted=true,installed=true,stopped=true}
    if not threadsOutside({q},false) then
      fail('The previous marker refresh is finishing. Try Killsight again in a moment.')
    end
    self.features.killsight={hooks={q},off=true,rollback=true}
  end)
  if self.features.killsight then self:drain() end
end
-- Currency options share shop code, but retain independent allowances. Update
-- flags while paused; neither option may restore a hook still used by the other.
function R:syncShop()
  local f=self.features.shop
  if not f or f.off then return end
  local mask=0
  if self.features.money and not self.features.money.off then mask=mask|1 end
  if self.features.spp and not self.features.spp.off then mask=mask|2 end
  if mask==0 then f.off=true;return end
  for _,q in ipairs(f.hooks) do
    local prefix={};for i=1,q.spec.data do prefix[i]=q.code[i] end
    if not equal(readBytes(q.alloc,#prefix,true),prefix) or not equal(readBytes(q.address,#q.patch,true),q.patch) then
      fail('Infinite Money / Infinite SPP: another program changed a shared shop hook. Disable the conflicting patch so cleanup can finish.')
    end
    if readInteger(q.data)~=mask then write32(q.data,mask,'Infinite Money / Infinite SPP') end
  end
end
function R:enableCurrency(key)
  local ok,err=pcall(function()
    paused(function()
      self:enable('shop')
      self:enable(key)
      self:syncShop()
    end)
  end)
  if not ok then
    if self.features[key] then self.features[key].off=true end
    pcall(function() self:drain() end)
    error(optionName(key)..': '..tostring(err),0)
  end
  return true
end
function R:enable(key)
  if self.stopping then fail('The previous table is still restoring its hooks. Resume gameplay briefly and reload the table.') end
  if not self:attach() then fail(self.reason) end
  if key=='killsight' then self:recoverStoppedMarker() end
  if self.features[key] then
    if self.features[key].off then fail('This option is still finishing its previous cleanup. Resume gameplay briefly and try again.') end
    return true
  end
  if key=='money' or key=='spp' or key=='level' or key=='items' then self:checkData(key) end
  if key=='items' then self:checkItems() end
  if key=='leader' then self:checkLevelChecksum() end
  for _,d in ipairs(dependencies[key] or {}) do
    local expected=bytes(d.bytes)
    if not equal(readBytes(self.base+d.rva,#expected,true),expected) then
      fail('Another trainer changed a game routine required by this option. Disable the conflicting patch and try again.')
    end
  end
  if key=='level' then
    self:checkLevelChecksum()
    if not readQword(self.base+0x655a28) or readQword(self.base+0x655a28)==0 then fail('Load into gameplay before using Max Level.') end
    for i=0,13 do
      local level=readSmallInteger(self.base+0x6cb260+i*0x220+0x28)
      if not level or level&lt;1 or level&gt;99 then fail('The Class Zero roster is not ready. Load a save first.') end
    end
  end
  local f={hooks={},off=false};self.features[key]=f
  local ok,err=pcall(function()
    paused(function()
      if not self:same() then fail('The game process changed. Reload the table for the new game session.') end
      for _,s in ipairs(specs[key]) do
        local q={spec=s,address=resolve(self.base,s),old=bytes(s.old)}
        f.hooks[#f.hooks+1]=q
        if s.code then
          q.alloc=allocateMemory(0x1000,q.address)
          if not q.alloc or q.alloc==0 then q.alloc=nil;fail('A memory block could not be reserved. Restart the game and try again.') end
          q.data=q.alloc+s.data
          local code=relocated(self.base,s,q.alloc)
          if s.hud then
            put(code,s.data+56,getCheatEngineProcessID(),4)
            put(code,s.data+60,0x4b5a4646,4)
          end
          if key=='leader' then
            put(code,s.data+8,0,4)
            put(code,s.data+12,self:currentLeader() or 0,4)
          end
          if key=='shop' then put(code,s.data,0,4) end
          q.code=code
          q.patch={0xe9};put(q.patch,1,signed32(q.alloc-(q.address+5)),4)
          for i=6,#q.old do q.patch[i]=0x90 end
          writeChecked(q.alloc,code,(self.rows[key] and self.rows[key].Description or key)..' — preparing hook')
        else q.patch=bytes(s.patch) end
      end
      -- Every target and every unpublished stub has passed validation.
      if not threadsOutside(f.hooks,true) then
        fail('The game is updating this option right now. Try enabling it again in a moment.')
      end
      for _,q in ipairs(f.hooks) do
        if not equal(readBytes(q.address,#q.old,true),q.old) then fail('Another trainer changed the game code during activation. The option was stopped.') end
        q.attempted=true
        writeChecked(q.address,q.patch,(self.rows[key] and self.rows[key].Description or key)..' — enabling hook')
        q.installed=true
      end
      win('FlushInstructionCache',getOpenedProcessHandle(),0,0)
    end)
  end)
  if not ok then
    f.off=true;f.rollback=true
    local clean,cleanErr=pcall(function() self:drain() end)
    if not clean then self.lastError=tostring(cleanErr) end
    error(err,0)
  end
  if key=='leader' and self.rows.leader then self.rows.leader.Address=string.format('%X',f.hooks[1].data+12) end
  return true
end
function R:off(key)
  local f=self.features[key];if not f then return true end
  if not f.off then f.off=true end
  self:drain()
  return not self.features[key]
end
function R:drain()
  if not next(self.features) then return true end
  if self.features.leader and self.features.leader.off then self:stopSelector() end
  if not self:selectOldContext() then
    self.features={};self:untickAll();return true
  end
  local warning
  paused(function()
    local synced,problem=pcall(function() self:syncShop() end)
    if not synced then
      -- A short flag write could leave different shop views enabled. Stop both
      -- currencies and restore each owned hook independently below.
      for _,key in ipairs({'money','spp','shop'}) do
        if self.features[key] then self.features[key].off=true end
      end
      warning=tostring(problem)
    end
    for _,key in ipairs(order) do
      local f=self.features[key]
      if f and f.off then
        local retained={}
        for _,q in ipairs(f.hooks) do
          local cleaned,problem=pcall(function()
          if q.alloc and not q.attempted then
            -- Unpublished storage can never have an in-flight caller.
            if deAlloc(q.alloc)~=false then q.alloc=nil;q.freed=true;q.restored=true end
          end
          if q.alloc then
            if not q.stopped then
              local codePrefix={}
              for i=1,q.spec.data do codePrefix[i]=q.code[i] end
              if not equal(readBytes(q.alloc,#codePrefix,true),codePrefix) then
                fail('Another program changed this option\'s reserved memory. Cleanup stopped without overwriting it.')
              end
              write32(q.data,0,optionName(key)..' — cleanup')
              if q.spec.hud and not f.rollback and not self.closing then write32(q.data+8,1,optionName(key)..' — cleanup') end
              q.stopped=true
            end
          end
          -- Closure cannot depend on another HUD frame: CE's timer is about to
          -- disappear. Restore entry points now; the native HUD resumes its own
          -- marker lifecycle. Never free a cave with an in-flight caller.
          local hudPending=q.alloc and q.spec.hud and not f.rollback and not self.closing and readInteger(q.data+8)~=0
          if not hudPending and q.attempted and not q.restored then
            local now=readBytes(q.address,#q.old,true)
            if equal(now,q.old) then q.restored=true
            elseif equal(now,q.patch) then q.restoring=true;writeChecked(q.address,q.old,optionName(key)..' — cleanup');q.restored=true
            elseif (q.restoring or (f.rollback and not q.installed)) and now then
              local ours=true
              for i=1,#q.old do if now[i]~=q.old[i] and now[i]~=q.patch[i] then ours=false end end
              if ours then q.restoring=true;writeChecked(q.address,q.old,optionName(key)..' — cleanup');q.restored=true end
            end
            if not q.restored and not f.warned then
              f.warned=true;warning='Another trainer changed an active hook. Its bytes were left untouched. Remove that conflicting patch so cleanup can finish.'
            end
          elseif not q.attempted then q.restored=true end
          if q.alloc then
            if q.restored and readInteger(q.data+4)==0 then retained[#retained+1]=q end
          end
          end)
          if cleaned then q.cleanupError=nil
          elseif q.cleanupError~=tostring(problem) then
            q.cleanupError=tostring(problem)
            warning=warning or q.cleanupError
          end
        end
        win('FlushInstructionCache',getOpenedProcessHandle(),0,0)
        if #retained&gt;0 then
          local allSafe=threadsOutside(retained,false)
          for _,q in ipairs(retained) do
            if allSafe or threadsOutside({q},false) then
              if deAlloc(q.alloc)~=false then q.alloc=nil;q.freed=true end
            end
          end
        end
        local done=true
        for _,q in ipairs(f.hooks) do if not q.restored or q.alloc then done=false end end
        if done then self.features[key]=nil;self:untick(key) end
      end
    end
  end)
  if warning then self:notify(warning) end
  local done=not next(self.features)
  if done and self.clearRequested then self.clearRequested=false;self:untickAll() end
  return done
end

function R:untick(key)
  local rec=self.rows[key]
  if rec then self.muted=true;pcall(function() rec.Active=false end);self.muted=false end
end
function R:untickAll()
  self:stopSelector()
  for _,key in ipairs(order) do self:untick(key) end
  self:untick('main')
end
function R:clear()
  self:stopSelector()
  self.clearRequested=true
  for _,f in pairs(self.features) do f.off=true end
  local done=self:drain()
  if done then self.clearRequested=false;self:untickAll() end
  return done
end
function R:finishShutdown()
  if next(self.features) then return false end
  if self.timer then self.timer.destroy();self.timer=nil end
  if self.form and self.form.OnClose==self.closeHandler then self.form.OnClose=self.oldClose end
  if onTableLoad==self.tableHandler then onTableLoad=self.oldTable end
  self.stopped=true
  if KatzyFF0==self then KatzyFF0=nil end
  return true
end
function R:shutdown(closing)
  self.closing=self.closing or closing
  self.stopping=true
  self:clear()
  return self:finishShutdown()
end

local help=[[
Table identification: Katzy.
Final Fantasy Type-0 HD — Steam build 3301128

Allow the table's Lua script, load a save, then tick [MAIN]. The table attaches automatically. Enable each option separately.

Infinite Health
Prevents ordinary HP loss and HP ability costs for the active party. Healing still works. Scripted defeats and instant-death effects remain.

Infinite AP
Learn and upgrade abilities without spending earned AP. Level and prerequisite requirements still apply. Reopen an already open ability menu to refresh its requirements.

Infinite Money
Adds a renewable 9,000,000-gil allowance to shop and menu balances. Earnings increase the total; purchases use the earned surplus before drawing on the allowance. Turning it off keeps the unspent earned balance. The allowance is never written into saves. SPP is unchanged. The displayed total follows the game's gil limit. Reopen an already open menu to refresh its display.

Infinite SPP
Adds a renewable 90,000-SPP allowance to shop and current-balance displays. Earned SPP increases the total, and purchases spend that surplus before reaching the allowance. Turning this off keeps the unspent earned balance. The allowance is not saved and does not increase lifetime SPP, rank or task progress, or unlock restricted shop stock. Reopen an already open menu to refresh its display. This works independently of Infinite Money.

Infinite Items
Keeps owned consumables at a minimum of 90, or their lower supported stack cap. Stacks capped at one, key items and equipment are excluded. Pickups and spending above 90 work normally; an unowned item is not granted until acquired. Existing stacks refill on the next gameplay HUD update. Turning this off stops replenishment and keeps current quantities; quantities can be saved.

Infinite Rest Time
Keeps your remaining rest time unchanged when starting ordinary side dialogues, including their normal two-hour cost, and prevents lesson and travel hour costs. Dialogue completion flags and reward setup still run normally. Enable it while rest time remains. Separate scripted progression commands can still advance time or change the story period; they are not the normal side-dialogue charge. You can manually trigger the next mission in Central Command. Turning this off resumes normal costs without restoring hours already spent.

No Random Encounters
Prevents random encounters while travelling on foot on the world map. Visible roaming-enemy contact and scripted/story battles still work. Riding a chocobo already avoids random encounters. Turning this off resumes the normal random encounter checks; an already starting battle is not cancelled.

Always Killsight on Locked Target
Keeps the locked-on enemy's marker red and enables the game's lethal Killsight check for eligible hits. Other enemies are unaffected. Story invulnerability and attacks that cannot trigger Killsight retain their restrictions. Marker changes refresh on the next gameplay update.

Auto Complete Armed S.O.
Completes accepted, armed Special Orders on their next active gameplay update using the game's normal success and reward flow. Accept each S.O. normally; this does not accept offers, complete main mission objectives or revive already failed orders. Completion and rewards remain after disabling and can be saved. Success messages may finish before another order can run.

Max Level (One-shot)
Raises all fourteen Class Zero characters to level 99, including normal level-up stats and AP. It runs on the next gameplay update and then unticks. This change is permanent if you save afterward.

Academy Leader
With [MAIN] on, double-click the value and choose an available Class Zero member during normal academy exploration. The game queues its usual character/model reload when control is available. Tick this same row to keep that leader selected at the academy; untick it to allow normal changes. Unlocked, the value follows the current leader. Changing the selection does not require visiting a Relic Terminal. Missions, towns, special story areas and unavailable characters are excluded. Turning this off leaves the current leader selected.

Untick an option to stop it. Clear All or unticking [MAIN] stops every option. If gameplay is paused, resume briefly to finish a pending marker refresh or one-shot cleanup. Keep the game running during cleanup. Closing Cheat Engine restores owned hooks immediately, without waiting for a HUD frame or blocking closure. The native HUD resumes normal marker updates. A disabled marker hook left by an older table is recovered when you next enable Killsight.
]]

local al=getAddressList()
local function bind(id,key,activate,deactivate)
  local rec=al.getMemoryRecordByID(id);R.rows[key]=rec
  if not rec then return end
  rec.OnActivate=function(_,before)
    if not before or R.muted then return true end
    local ok,result=pcall(activate)
    if not ok then R:notify(rec.Description..': '..tostring(result));return false end
    return result~=false
  end
  rec.OnDeactivate=function(_,before)
    if not before or R.muted then return true end
    if not deactivate then return true end
    local ok,result=pcall(deactivate)
    if not ok then R:notify(rec.Description..': '..tostring(result));return false end
    return result~=false
  end
end
bind(1,'attach',function()
  if not R:attach() then R:notify(R.reason) end
  return false
end)
bind(2,'tip',function() shellExecute('https://ko-fi.com/katzy');return false end)
bind(3,'help',function() showMessage(help);return false end)
bind(4,'clear',function() R:clear();return false end)
bind(5,'main',function()
  if not R:attach() then fail(R.reason) end
  R:enable('leader')
  return true
end,function() return R:clear() end)
for key,id in pairs(rowIDs) do
  local feature=key
  bind(id,key,function()
    if not R.rows.main or not R.rows.main.Active then fail('Enable [MAIN] first.') end
    if feature=='money' or feature=='spp' then return R:enableCurrency(feature) end
    return R:enable(feature)
  end,function() return R:off(feature) end)
end

bind(15,'leader',function() R:requestLeader();return true end,function()
  local q=R:leaderControl()
  if q and R:same() then publishRequest(q,'leader',0) end
  return true
end)
if R.rows.leader then
  R.rows.leader.Address='0'
  R.rows.leader.OnValueChangedByUser=function()
    if R.muted then return end
    local ok,err=pcall(function() R:requestLeader() end)
    if not ok then
      R:untick('leader')
      local q=R:leaderControl()
      if q and R:same() then
        pcall(function()
          publishRequest(q,'leader',0)
          write32(q.data+12,R:currentLeader() or 0,'Academy Leader')
        end)
      end
      R:notify(err)
    end
  end
end

R.form=getMainForm();R.oldClose=R.form.OnClose
R.closeHandler=function(sender,action)
  R.closing=true
  pcall(function() R:shutdown(true) end)
  -- CE services are about to be torn down. Never leave a timer calling them.
  if R.timer then pcall(function() R.timer.destroy() end);R.timer=nil end
  if R.oldClose then
    local ok,result=pcall(R.oldClose,sender,action)
    if ok and result~=nil then return result end
  end
  return action
end
R.form.OnClose=R.closeHandler
R.oldTable=onTableLoad
R.tableHandler=function(before)
  if before then pcall(function() R:shutdown(false) end) end
  if R.oldTable then return R.oldTable(before) end
end
onTableLoad=R.tableHandler
if R.rows.main then R.rows.main.OnDestroy=function() pcall(function() R:shutdown(R.closing) end) end end

R.timer=createTimer(nil,false);R.timer.Interval=100
R.timer.OnTimer=function()
  local ok,err=pcall(function()
    R.ticks=R.ticks+1
    if next(R.features) and (getOpenedProcessID()~=R.pid or R.ticks%10==0) and not R:same() then R:clear() end
    local level=R.features.level
    if level and not level.off and R:same() then
      local q=level.hooks[1]
      if q and q.data and readInteger(q.data+12)==1 then
        level.off=true
        for i=0,13 do
          if readSmallInteger(R.base+0x6cb260+i*0x220+0x28)~=99 then
            R:notify('Max Level did not finish for every character. Disable other stat cheats before trying again.');break
          end
        end
      end
    end
    if R.ticks%10==0 and R:same() then
      local items=R.features.items
      if items and not items.off then publishRequest(items.hooks[3],'items') end
      local q=R:leaderControl()
      if q then
        local status=readInteger(q.data+8)
        local current=R:currentLeader()
        if status==2 then
          R:untick('leader');publishRequest(q,'leader',0)
          R:notify('That character is not currently available. Choose an available Class Zero member.')
        elseif status==0 and current then
          if R.rows.leader.Active then
            if R:academy() and readInteger(q.data+12)~=current then publishRequest(q,'leader') end
          elseif readInteger(q.data+12)~=current then write32(q.data+12,current,'Academy Leader') end
        end
      end
    end
    local needsDrain=false
    for _,f in pairs(R.features) do if f.off then needsDrain=true end end
    if needsDrain then R:drain() end
    if R.stopping then R:finishShutdown()
    elseif R.ticks%10==0 then R:attach() end
  end)
  if not ok and R.lastError~=tostring(err) then R:notify(err) end
end
R.timer.Enabled=true
local ok,err=pcall(function() R:attach() end)
if not ok then R:notify(err) end
</LuaScript>
</CheatTable>