<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="46">
  <CheatEntries>
    <CheatEntry>
      <ID>15</ID>
      <Description>"Hook Game"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ AUTO-GEN v7.1 gated hook + love.update auto-wrap for lua51.dll }
[ENABLE]
alloc(newmem,$400)
alloc(stateStore,8)
alloc(cmd,1024)
alloc(doit,8)
alloc(savedtop,8)
alloc(mintop,8)
alloc(gate,8)
registersymbol(stateStore)
registersymbol(cmd)
registersymbol(doit)
registersymbol(mintop)
registersymbol(gate)
registersymbol(gettopHook)
stateStore:
  dq 0
doit:
  dq 0
savedtop:
  dq 0
mintop:
  dq 7FFFFFFF
gate:
  dq 0
cmd:
  db 'a=1',0
label(gettopHook)
label(code)
label(skip)
label(trackmin)
newmem:
  mov [stateStore],rcx
  mov rax,[rcx+28]
  sub rax,[rcx+20]
  sar rax,03
  mov rdx,[mintop]
  cmp rax,rdx
  jge trackmin
  mov [mintop],rax
trackmin:
  cmp qword ptr [doit],0
  je skip
  mov rdx,[gate]
  cmp rax,rdx
  jg skip
  mov [savedtop],rax
  push rbp
  mov rbp,rsp
  and rsp,-10
  sub rsp,20
  mov qword ptr [doit],0
  mov rcx,[stateStore]
  lea rdx,[cmd]
  call lua51.luaL_loadstring
  mov rcx,[stateStore]
  xor edx,edx
  mov r8d,0FFFFFFFF
  xor r9d,r9d
  call lua51.lua_pcall
  mov rcx,[stateStore]
  mov edx,[savedtop]
  call lua51.lua_settop
  mov rsp,rbp
  pop rbp
  mov rcx,[stateStore]
  mov rax,[rcx+28]
  sub rax,[rcx+20]
  sar rax,03
skip:
code:
  ret
lua51.lua_gettop:
gettopHook:
  jmp newmem

{$lua}
if syntaxcheck then return end
if __v7boot then __v7boot.destroy() end
__v7boot = createTimer(getMainForm())
__v7boot.Interval = 250
__v7boot.OnTimer = function()
  local Laddr = readQword(getAddress('stateStore'))
  if not Laddr or Laddr==0 then return end
  local mt = readQword(getAddress('mintop'))
  if not mt or mt &gt;= 0x7FFFFFFF then return end
  writeQword(getAddress('gate'), mt)
  local c = getAddress('cmd')
  local boot = "if type(love)=='table' and type(love.update)=='function' and not __V7_WRAP then __V7_WRAP=true; __V7_ORIG=love.update; love.update=function(dt) if __CMD then local code=__CMD; __CMD=nil; local f=loadstring(code); if f then pcall(f) end end return __V7_ORIG(dt) end end"
  writeString(c, boot); writeByte(c+#boot, 0); writeQword(getAddress('doit'), 1)
  __v7boot.destroy(); __v7boot=nil
  print('[v7] gate armed top='..mt..'; love.update wrapper sent. Render-safe now.')
end
return true
{$asm}

[DISABLE]
{$lua}
if syntaxcheck then return end
if __v7boot then __v7boot.destroy(); __v7boot=nil end
local c=getAddress('cmd')
local un="if __V7_WRAP and __V7_ORIG then love.update=__V7_ORIG; __V7_WRAP=nil end"
writeString(c,un); writeByte(c+#un,0); writeQword(getAddress('doit'),1)
return true
{$asm}
lua51.lua_gettop:
  db 48 8B 41 28 48 2B 41 20 48 C1 F8 03 C3
unregistersymbol(stateStore)
unregistersymbol(cmd)
unregistersymbol(doit)
unregistersymbol(mintop)
unregistersymbol(gate)
unregistersymbol(gettopHook)
dealloc(gate)
dealloc(mintop)
dealloc(savedtop)
dealloc(doit)
dealloc(cmd)
dealloc(stateStore)
dealloc(newmem)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Godmode/Invisible"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Trainer - master toggle. Requires v7 hook + wrapper. }
[ENABLE]
{$lua}
if syntaxcheck then return end
local mf = getMainForm()

-- clean any prior instance first
if __trKick then __trKick.destroy(); __trKick=nil end
if __trTimer then __trTimer.destroy(); __trTimer=nil end
if __trHK then for _,h in ipairs(__trHK) do h.destroy() end __trHK=nil end

__trOn = true                       -- master enabled flag
__F = { invis=false, hp=false }

__trKick = createTimer(mf)
__trKick.Interval = 1
__trKick.OnTimer = function()
  __trKick.destroy(); __trKick=nil

  local function send(body)
    local c=getAddress("cmd")
    local w="__CMD="..string.format("%q", body)
    writeString(c,w); writeByte(c+#w,0); writeQword(getAddress("doit"),1)
  end

  __trTimer = createTimer(mf)
  __trTimer.Interval = 200
  __trTimer.OnTimer = function()
    if not __trOn then return end
    local parts = {"local a=getPlayerActor() if a then"}
    if __F.invis then parts[#parts+1]="a.invisible=true" end
    if __F.hp    then parts[#parts+1]="a.health=math.max(a.health,9999) a.dead=false" end
    parts[#parts+1]="end"
    send(table.concat(parts," "))
  end

  __trHK = {}
  local function bind(vk, fn) __trHK[#__trHK+1]=createHotkey(fn, vk) end
  bind(0x31, function() if not __trOn then return end __F.invis=not __F.invis; print("invis "..(__F.invis and "on" or "off")) end)
  bind(0x32, function() if not __trOn then return end __F.hp=not __F.hp;       print("hp "..(__F.hp and "on" or "off")) end)
  print("[trainer] 1=invis 2=hp")
end
return true
{$asm}

[DISABLE]
{$lua}
if syntaxcheck then return end
__trOn = false                      -- callbacks no-op immediately
if __trKick then __trKick.destroy(); __trKick=nil end
if __trTimer then __trTimer.destroy(); __trTimer=nil end
if __trHK then for _,h in ipairs(__trHK) do h.destroy() end __trHK=nil end
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>17</ID>
          <Description>"Weapon Hacks (recoil, spread, ammo, full auto)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Weapon Hax + Infinite Ammo - tick to enable. Requires v7 hook + wrapper installed. }
[ENABLE]
{$lua}
if syntaxcheck then return end
local mf = getMainForm()
if __whKick then __whKick.destroy() end
__whKick = createTimer(mf)
__whKick.Interval = 1
__whKick.OnTimer = function()
  __whKick.destroy(); __whKick = nil
  if __whTimer then __whTimer.destroy() end
  __whTimer = createTimer(mf)
  __whTimer.Interval = 100
  __whTimer.OnTimer = function()
    local c = getAddress("cmd")
    local body = table.concat({
      "local a=getPlayerActor()",
      "if a then",
      -- reserve ammo (the ammo table, keyed by caliber)
      "  if a.ammo then for k in pairs(a.ammo) do a.ammo[k]=999 end end",
      -- weapon fields (the loaded magazine + weapon stats)
      "  if a.weapon then local w=a.weapon",
      "    w.spread=0",
      "    w.realSpread=0",
      "    w.spreadPerShot=0",
      "    w.damage=999",
      "    w.fullAuto=true",
      "    w.mag=999",
      "    w.reloadSpeedMultiplier=0.0001",
      -- optional extra recoil/spread killers (delete if you want ONLY your listed fields):
      "    w.spreadPerShotMultiplier=0",
      "    w.maxSpreadIncrease=0",
      "    w.lookSpread=0",
      "    w.lookSpreadMax=0",
      "  end",
      "end",
    }, " ")
    local wcmd = "__CMD="..string.format("%q", body)
    writeString(c, wcmd); writeByte(c+#wcmd, 0); writeQword(getAddress("doit"), 1)
  end
end
print("[weapon hax + inf ammo] running")
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
if __whKick then __whKick.destroy(); __whKick=nil end
if __whTimer then __whTimer.destroy(); __whTimer=nil end
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
