<?xml version='1.0' encoding='utf-8'?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Auto-Attach and Version Check"</Description>
      <GroupHeader>1</GroupHeader>
    </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
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</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
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>4</ID>
      <Description>"Clear All"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>100</ID>
      <Description>"[MAIN] Command &amp; Conquer: Generals"</Description>
      <Options moHideChildren="1" />
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>101</ID>
          <Description>"Infinite Money"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>102</ID>
          <Description>"Infinite Power"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>103</ID>
          <Description>"Instant Build"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>104</ID>
          <Description>"Infinite Aircraft Ammo"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>105</ID>
          <Description>"Instant Superweapons, Support Powers and Unit Abilities"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>107</ID>
          <Description>"Invulnerability - Selected Units and Buildings"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>110</ID>
          <Description>"Reveal Map - Full"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>111</ID>
          <Description>"Reveal Map - Visual Only"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>106</ID>
          <Description>"GLA - Maximum Junk Upgrade (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>108</ID>
          <Description>"Maximum General Rank and Power Points (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>109</ID>
          <Description>"Promote Selected Units - Maximum Veterancy (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>200</ID>
      <Description>"[MAIN] Command &amp; Conquer: Generals – Zero Hour"</Description>
      <Options moHideChildren="1" />
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>201</ID>
          <Description>"Infinite Money"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>202</ID>
          <Description>"Infinite Power"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>203</ID>
          <Description>"Instant Build"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>204</ID>
          <Description>"Infinite Aircraft Ammo"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>205</ID>
          <Description>"Instant Superweapons, Support Powers and Unit Abilities"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>207</ID>
          <Description>"Invulnerability - Selected Units and Buildings"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>210</ID>
          <Description>"Reveal Map - Full"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>211</ID>
          <Description>"Reveal Map - Visual Only"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>206</ID>
          <Description>"GLA - Maximum Junk Upgrade (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>208</ID>
          <Description>"Maximum General Rank and Power Points (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>209</ID>
          <Description>"Promote Selected Units - Maximum Veterancy (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>300</ID>
      <Description>"[MAIN] Command &amp; Conquer: Generals – Zero Hour (GenPatcher)"</Description>
      <Options moHideChildren="1" />
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>301</ID>
          <Description>"Infinite Money"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>302</ID>
          <Description>"Infinite Power"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>303</ID>
          <Description>"Instant Build"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>304</ID>
          <Description>"Infinite Aircraft Ammo"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>305</ID>
          <Description>"Instant Superweapons, Support Powers and Unit Abilities"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>307</ID>
          <Description>"Invulnerability - Selected Units and Buildings"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>310</ID>
          <Description>"Reveal Map - Full"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>311</ID>
          <Description>"Reveal Map - Visual Only"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>306</ID>
          <Description>"GLA - Maximum Junk Upgrade (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>308</ID>
          <Description>"Maximum General Rank and Power Points (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>309</ID>
          <Description>"Promote Selected Units - Maximum Veterancy (One Shot)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
{$asm}</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <LuaScript>--[[
Table identification: Katzy
Command &amp; Conquer: Generals and Zero Hour | original Steam and verified GenPatcher executables
]]
if KZGenerals and not KZGenerals.shutdown() then error('Use Clear All in the previous table before replacing it.') end
local T={closing=false,active=nil,selection=nil,cache={}}
KZGenerals=T
local configs={{["title"]=[====[Command &amp; Conquer: Generals]====],["build"]=[====[Steam build 17435253]====],["playerlist"]=10926440,["logic"]=10927748,["mode"]=152,["objects"]=104,["team"]=320,["experience"]=292,["money"]=48,["energy"]=112,["kind"]=5637040,["setweapon"]=5658784,["clearweapon"]=5658880,["weaponflags"]=396,["trainable"]=6382720,["promote"]=6382864,["promoteArgs"]=1,["frame"]=4861902,["withdraw"]=5831196,["buildtime"]=5899392,["ratio"]=5830272,["power"]=5830304,["damage"]=6756256,["damageout"]=32,["ammo"]=5011260,["ready"]=6770464,["percent"]=6770592,["readyframe"]=6772464,["md5"]=[====[a5436346871e3be33faac242e69a42c2]====],["timestamp"]=1740035460,["imageSize"]=12337152,["powerRefresh"]=4550304,["powerBonus"]=1000,["powerRefreshOriginal"]=[====[8A 44 24 04 84 C0 56 57 8B F9 74 07 E8 DF FD FF FF EB 05 E8 D8 FE FF FF]====],["rankSet"]=4546864,["rankStore"]=10927168,["rankLimit"]=156,["rankField"]=372,["points"]=380,["controlbar"]=10926536,["pointsNotify"]=4586592,["selection"]=10928944,["partition"]=10929124,["revealAdd"]=5605872,["revealRemove"]=5605936,["revealRefresh"]=5606416,["terrainShroud"]=7444432,["radarShroud"]=7711696,["clientShroud"]=4891559,["renderShroud"]=7628492,["objectShroud"]=5651888,["revealChecks"]={{["address"]=5605872,["original"]=[====[56 8B F1 8B 46 38 57 33 FF 85 C0 7E 23 53 55 8B 6C 24 14 33 DB 8B 4E 3C]====]},{["address"]=5605936,["original"]=[====[53 55 56 8B F1 8B 46 58 3B 46 48 57 0F 84 95 00 00 00 83 CD FF 8B 4E 48]====]},{["address"]=5606416,["original"]=[====[83 EC 0C 55 8B E9 8B 0D A8 A9 A6 00 8B 01 FF 90 B8 00 00 00 8B 0D 78 BE]====]},{["address"]=5651888,["original"]=[====[56 8B F1 E8 98 BD FF FF F7 40 6C 00 00 02 00 75 18 8B 8E 1C 01 00 00 85]====]}},["scienceStore"]=10927172,["hasScience"]=4547232,["rootScience"]=4742944,["scienceDisabled"]=4547360,["scienceHidden"]=4547488,["rankMenuOffset"]=144,["commandSetNext"]=64,["rankMenuSlots"]={3,12,1},["rankChecks"]={{["address"]=4546864,["original"]=[====[51 56 57 8B 7C 24 10 83 FF 01 8B F1 7D 0A C7 44 24 10 01 00 00 00 EB 1E]====]},{["address"]=4586592,["original"]=[====[56 8B F1 8B 4C 24 08 E8 34 4A FF FF 84 C0 74 5A A1 68 B9 A6 00 8B 40 0C]====]},{["address"]=4547232,["original"]=[====[8B 81 50 01 00 00 8B 54 24 04 56 8B B1 54 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=4742944,["original"]=[====[53 55 56 8B D9 8B 43 0C 57 8B 7B 08 3B F8 74 23 8B 6C 24 18 8B 37 8B 4E]====]},{["address"]=4547360,["original"]=[====[8B 81 5C 01 00 00 8B 54 24 04 56 8B B1 60 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=4547488,["original"]=[====[8B 81 68 01 00 00 8B 54 24 04 56 8B B1 6C 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=6382720,["original"]=[====[8B 49 08 E8 C8 96 F4 FF 8A 80 3D 02 00 00 C3 90 56 8B F1 8B 4E 08 E8 B5]====]},{["address"]=6382864,["original"]=[====[53 56 8B F1 8B 5E 0C 57 8B 7C 24 10 3B DF 74 23 8B 4E 08 89 7E 0C E8 25]====]}},["weaponClip"]=5004112,["weaponReload"]=5005040,["weaponSet"]=352,["weaponShared"]=68,["visualCall"]=7628785,["selectionColor"]=4646672,["visualConsume"]=7628927,["hooks"]={{["name"]=[====[withdraw]====],["address"]=5831196,["original"]=[====[8B 47 04 2B C6]====],["length"]=5,["signature"]=[====[8B 47 04 2B C6 8D 4C 24 08 89 47 04 C7 44 24 74 FF FF FF FF E8 8B 79 EB]====]},{["name"]=[====[build]====],["address"]=5899392,["original"]=[====[83 EC 08 53 56]====],["length"]=5,["signature"]=[====[83 EC 08 53 56 57 8B 7C 24 18 8B F1 8B 86 04 02 00 00 56 6A 01 8D 4F 0C]====]},{["name"]=[====[upgrade]====],["address"]=4899632,["original"]=[====[D9 41 14 D8 0D CC 9F 98 00]====],["length"]=9,["signature"]=[====[D9 41 14 D8 0D CC 9F 98 00 E8 3C 9A 45 00 C2 04 00 90 90 90 90 90 90 90]====]},{["name"]=[====[ready]====],["address"]=6770464,["original"]=[====[53 56 8B F1 8B 4E F8]====],["length"]=7,["signature"]=[====[53 56 8B F1 8B 4E F8 85 C9 57 8B 7E F4 74 4D 85 FF 74 49 E8 18 EB EE FF]====]},{["name"]=[====[percent]====],["address"]=6770592,["original"]=[====[83 EC 08 56 8B F1]====],["length"]=6,["signature"]=[====[83 EC 08 56 8B F1 8B 06 57 FF 50 04 84 C0 74 0C D9 05 BC 78 98 00 5F 5E]====]},{["name"]=[====[readyframe]====],["address"]=6772464,["original"]=[====[56 8B F1 8B 06]====],["length"]=5,["signature"]=[====[56 8B F1 8B 06 57 FF 50 14 8B 50 04 85 D2 74 10 8B 4A 04 85 C9 74 07 E8]====]},{["name"]=[====[weaponclip]====],["address"]=5004112,["original"]=[====[55 8B EC 83 EC 18]====],["length"]=6,["signature"]=[====[55 8B EC 83 EC 18 8B 55 08 8B 92 90 01 00 00 B8 00 00 80 3F 89 45 E8 89]====]},{["name"]=[====[weaponreload]====],["address"]=5005040,["original"]=[====[55 8B EC 83 EC 08]====],["length"]=6,["signature"]=[====[55 8B EC 83 EC 08 53 8B 5D 08 56 8B F1 8B 46 08 8B 80 50 01 00 00 57 33]====]},{["name"]=[====[damage]====],["address"]=6756256,["original"]=[====[6A FF 68 F8 77 96 00]====],["length"]=7,["signature"]=[====[6A FF 68 F8 77 96 00 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 81 EC 88]====]},{["name"]=[====[visual]====],["address"]=7628785,["original"]=[====[E8 1A 7F D2 FF]====],["length"]=5,["signature"]=[====[E8 1A 7F D2 FF 85 FF 75 31 85 C0 75 2D 8B 85 EC 00 00 00 85 C0 0F 8E 85]====]},{["name"]=[====[ammo]====],["address"]=5011260,["original"]=[====[8B 56 14 8B 4E 30]====],["length"]=6,["signature"]=[====[8B 56 14 8B 4E 30 4A 89 56 14 8B C2 8B 56 38 49 4A 89 4E 30 8B CA 85 C9]====]},{["name"]=[====[terrainShroud]====],["address"]=7444432,["original"]=[====[A1 58 2B A7 00]====],["length"]=5,["signature"]=[====[A1 58 2B A7 00 85 C0 74 74 8B 88 68 28 00 00 85 C9 74 6A 8B 44 24 0C 83]====]},{["name"]=[====[radarShroud]====],["address"]=7711696,["original"]=[====[A1 58 2B A7 00]====],["length"]=5,["signature"]=[====[A1 58 2B A7 00 83 EC 20 85 C0 55 56 57 8B F9 74 08 8B B0 68 28 00 00 EB]====]},{["name"]=[====[clientShroud]====],["address"]=4891559,["original"]=[====[E8 04 9A 0B 00]====],["length"]=5,["signature"]=[====[E8 04 9A 0B 00 83 F8 03 7C 32 8B 96 B4 00 00 00 85 D2 74 25 F6 87 FF 01]====]},{["name"]=[====[renderShroud]====],["address"]=7628492,["original"]=[====[E8 DF D6 E1 FF]====],["length"]=5,["signature"]=[====[E8 DF D6 E1 FF 83 F8 01 89 44 24 14 75 11 8B 15 84 BE A6 00 8B 42 3C 89]====]},{["name"]=[====[frame]====],["address"]=4861902,["original"]=[====[8B 0D 84 BE A6 00]====],["length"]=6,["signature"]=[====[8B 0D 84 BE A6 00 8B 69 3C 8B 0D 90 BE A6 00 8B 11 55 89 6C 24 18 FF 52]====]}},["asm"]=[====[withdraw_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+10],0
je withdraw_fail
cmp dword [STATE+C],0
jne withdraw_fail
mov eax,edi
sub eax,30
cmp eax,[STATE]
jne withdraw_fail

popad
popfd
mov eax,[edi+4]
sub eax,esi
cmp eax,7530
jae withdraw_done
mov eax,7530
withdraw_done:
pushfd
lock dec dword [STATE+30]
popfd
jmp 58FA21
withdraw_fail:
popad
popfd
jmp withdraw_original
withdraw_original:
mov eax, [edi+4]
sub eax, esi
pushfd
lock dec dword [STATE+30]
popfd
jmp 58FA21
build_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+18],0
je build_fail
cmp dword [STATE+C],0
jne build_fail
mov eax,[esp+28]
cmp eax,[STATE]
jne build_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret 4
build_fail:
popad
popfd
jmp build_original
build_original:
sub esp, 8
push ebx
push esi
pushfd
lock dec dword [STATE+30]
popfd
jmp 5A0485
upgrade_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+18],0
je upgrade_fail
cmp dword [STATE+C],0
jne upgrade_fail
mov eax,[esp+28]
cmp eax,[STATE]
jne upgrade_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret 4
upgrade_fail:
popad
popfd
jmp upgrade_original
upgrade_original:
fld dword [ecx+14]
fmul dword [989FCC]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AC339
ready_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je ready_fail
cmp dword [STATE+C],0
jne ready_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz ready_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne ready_fail
popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret
ready_fail:
popad
popfd
jmp ready_original
ready_original:
push ebx
push esi
mov esi, ecx
mov ecx, [esi-8]
pushfd
lock dec dword [STATE+30]
popfd
jmp 674F27
percent_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je percent_fail
cmp dword [STATE+C],0
jne percent_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz percent_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne percent_fail
popad
popfd
fld1
pushfd
lock dec dword [STATE+30]
popfd
ret
percent_fail:
popad
popfd
jmp percent_original
percent_original:
sub esp, 8
push esi
mov esi, ecx
pushfd
lock dec dword [STATE+30]
popfd
jmp 674FA6
readyframe_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je readyframe_fail
cmp dword [STATE+C],0
jne readyframe_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz readyframe_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne readyframe_fail
popad
popfd
mov eax,[A6BE84]
mov eax,[eax+3C]
test eax,eax
jz readyframe_zero
dec eax
readyframe_zero:
pushfd
lock dec dword [STATE+30]
popfd
ret
readyframe_fail:
popad
popfd
jmp readyframe_original
readyframe_original:
push esi
mov esi, ecx
mov eax, [esi]
pushfd
lock dec dword [STATE+30]
popfd
jmp 6756F5
weaponclip_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je weaponclip_fail
cmp dword [STATE+C],0
jne weaponclip_fail
mov ecx,[esp+28]
call local_object
test eax,eax
jz weaponclip_fail
mov edx,[esp+18]
test edx,edx
jz weaponclip_fail
mov eax,[edx+C]
cmp eax,3
jae weaponclip_fail
lea ebx,[ecx+160]
cmp [ebx+eax*4+8],edx
jne weaponclip_fail
mov ebx,[ebx+4]
test ebx,ebx
jz weaponclip_fail
cmp byte [ebx+44],0
jne weaponclip_fail
cmp dword [ebx+eax*4+14],0
jne weaponclip_fail
mov edi,[edx+8]
test edi,edi
jz weaponclip_fail
cmp [ebx+eax*4+8],edi
jne weaponclip_fail
popad
popfd
cmp dword [ecx+10],3
jne weaponclip_done
cmp dword [ecx+14],0
je weaponclip_done
mov eax,[A6BE84]
mov eax,[eax+3C]
cmp eax,2
jb weaponclip_zero
sub eax,2
jmp weaponclip_clamp
weaponclip_zero:
xor eax,eax
weaponclip_clamp:
cmp [ecx+18],eax
jbe weaponclip_done
mov [ecx+18],eax
weaponclip_done:
xor eax,eax
pushfd
lock dec dword [STATE+30]
popfd
ret 4
weaponclip_fail:
popad
popfd
jmp weaponclip_original
weaponclip_original:
push ebp
mov ebp, esp
sub esp, 18
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C5B56
weaponreload_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je weaponreload_fail
cmp dword [STATE+C],0
jne weaponreload_fail
mov ecx,[esp+28]
call local_object
test eax,eax
jz weaponreload_fail
mov edx,[esp+18]
test edx,edx
jz weaponreload_fail
mov eax,[edx+C]
cmp eax,3
jae weaponreload_fail
lea ebx,[ecx+160]
cmp [ebx+eax*4+8],edx
jne weaponreload_fail
mov ebx,[ebx+4]
test ebx,ebx
jz weaponreload_fail
cmp byte [ebx+44],0
jne weaponreload_fail
cmp dword [ebx+eax*4+14],0
jne weaponreload_fail
mov edi,[edx+8]
test edi,edi
jz weaponreload_fail
cmp [ebx+eax*4+8],edi
jne weaponreload_fail
popad
popfd
mov dword [esp+C],1
jmp weaponreload_original
weaponreload_fail:
popad
popfd
jmp weaponreload_original
weaponreload_original:
push ebp
mov ebp, esp
sub esp, 8
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C5EF6
damage_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+24],0
je damage_fail
cmp dword [STATE+C],0
jne damage_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz damage_fail
mov edx,[esp+28]
test edx,edx
jz damage_keep_protection
cmp dword [edx+14],8
jne damage_keep_protection
mov eax,[ecx+64]
cmp [edx+8],eax
je damage_fail
damage_keep_protection:
mov edx,[STATE+44]
xor eax,eax
protect_find:
cmp eax,edx
jae damage_fail
lea ebx,[eax+edx]
shr ebx,1
lea edi,[STATE+2000+ebx*8]
cmp [edi],ecx
je protect_identity
jb protect_higher
mov edx,ebx
jmp protect_find
protect_higher:
lea eax,[ebx+1]
jmp protect_find
protect_identity:
mov ebx,[ecx+64]
cmp [edi+4],ebx
jne damage_fail
protect_found:
popad
popfd
mov eax,[esp+4]
test eax,eax
jz damage_return
mov dword [eax+20],0
mov dword [eax+24],0
damage_return:
pushfd
lock dec dword [STATE+30]
popfd
ret 4
damage_fail:
popad
popfd
jmp damage_original
damage_original:
push -1
push 9677F8
pushfd
lock dec dword [STATE+30]
popfd
jmp 6717A7
visual_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+24],0
je visual_fail
cmp dword [STATE+C],0
jne visual_fail
mov ecx,[ebx+88]
call local_object
test eax,eax
jz visual_fail
mov edx,[STATE+44]
xor eax,eax
visual_find:
cmp eax,edx
jae visual_fail
lea ebx,[eax+edx]
shr ebx,1
lea edi,[STATE+2000+ebx*8]
cmp [edi],ecx
je visual_identity
jb visual_higher
mov edx,ebx
jmp visual_find
visual_higher:
lea eax,[ebx+1]
jmp visual_find
visual_identity:
mov ebx,[ecx+64]
cmp [edi+4],ebx
jne visual_fail
visual_found:
popad
popfd
call 46E710
mov dword [esp+24],3E4CCCCD
mov dword [esp+28],3ECCCCCD
mov dword [esp+2C],3F000000
test edi,edi
jz visual_skip_edi
fld dword [esp+24]
fadd dword [edi+0]
fstp dword [esp+24]
fld dword [esp+28]
fadd dword [edi+4]
fstp dword [esp+28]
fld dword [esp+2C]
fadd dword [edi+8]
fstp dword [esp+2C]
visual_skip_edi:
test eax,eax
jz visual_skip_eax
fld dword [esp+24]
fadd dword [eax+0]
fstp dword [esp+24]
fld dword [esp+28]
fadd dword [eax+4]
fstp dword [esp+28]
fld dword [esp+2C]
fadd dword [eax+8]
fstp dword [esp+2C]
visual_skip_eax:
pushfd
lock dec dword [STATE+30]
popfd
jmp 74687F
visual_fail:
popad
popfd
jmp visual_original
visual_original:
call 46E710
pushfd
lock dec dword [STATE+30]
popfd
jmp 7467F6
ammo_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+1C],0
je ammo_fail
cmp dword [STATE+C],0
jne ammo_fail
mov ecx,ebx
call local_object
test eax,eax
jz ammo_fail
push A
call 5603B0
test al,al
jz ammo_fail
popad
popfd
mov edx,[esi+14]
inc edx
mov ecx,[esi+30]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C7742
ammo_fail:
popad
popfd
jmp ammo_original
ammo_original:
mov edx, [esi+14]
mov ecx, [esi+30]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C7742
terrainShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
cmp dword [STATE+4C],0
je terrainShroud_done
cmp dword [STATE+C],0
jne terrainShroud_done
mov dword [esp+10],0
terrainShroud_done:
popfd
jmp terrainShroud_original
terrainShroud_original:
mov eax, [A72B58]
pushfd
lock dec dword [STATE+30]
popfd
jmp 7197D5
radarShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
cmp dword [STATE+4C],0
je radarShroud_done
cmp dword [STATE+C],0
jne radarShroud_done
mov dword [esp+10],0
radarShroud_done:
popfd
jmp radarShroud_original
radarShroud_original:
mov eax, [A72B58]
pushfd
lock dec dword [STATE+30]
popfd
jmp 75ABD5
clientShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
call 563DB0
pushfd
cmp dword [STATE+4C],0
je clientShroud_done
cmp dword [STATE+C],0
jne clientShroud_done
mov eax,1
clientShroud_done:
popfd
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AA3AC
clientShroud_original:
call 563DB0
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AA3AC
renderShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
call 563DB0
pushfd
cmp dword [STATE+4C],0
je renderShroud_done
cmp dword [STATE+C],0
jne renderShroud_done
mov eax,1
renderShroud_done:
popfd
pushfd
lock dec dword [STATE+30]
popfd
jmp 7466D1
renderShroud_original:
call 563DB0
pushfd
lock dec dword [STATE+30]
popfd
jmp 7466D1
rank_menu_contains:
pushad
mov ebp,[edx+C]
mov ebx,[STATE]
mov ebx,[ebx+4]
test ebx,ebx
jz rank_menu_no
mov esi,[ebx+90]
mov ecx,3
call rank_set_contains
test eax,eax
jnz rank_menu_yes
mov esi,[ebx+94]
mov ecx,C
call rank_set_contains
test eax,eax
jnz rank_menu_yes
mov esi,[ebx+98]
mov ecx,1
call rank_set_contains
test eax,eax
jnz rank_menu_yes
rank_menu_no:
xor eax,eax
jmp rank_menu_return
rank_menu_yes:
mov eax,1
rank_menu_return:
mov [esp+1C],eax
popad
ret
rank_set_contains:
pushad
test esi,esi
jz rank_set_no
add esi,4
mov edi,[A6B9C8]
test edi,edi
jz rank_set_no
mov edi,[edi+2C]
mov ebx,1000
rank_set_find:
test edi,edi
jz rank_set_no
mov eax,[edi+C]
test eax,eax
jz rank_set_next
add eax,4
xor ecx,ecx
rank_set_name:
mov dl,[eax+ecx]
cmp dl,[esi+ecx]
jne rank_set_next
test dl,dl
jz rank_set_match
inc ecx
cmp ecx,100
jb rank_set_name
rank_set_next:
mov edi,[edi+40]
dec ebx
jnz rank_set_find
jmp rank_set_no
rank_set_match:
mov ebx,40
rank_set_override:
mov eax,[edi+4]
test eax,eax
jz rank_set_buttons
mov edi,eax
dec ebx
jnz rank_set_override
jmp rank_set_no
rank_set_buttons:
xor esi,esi
rank_button_loop:
cmp esi,[esp+18]
jae rank_set_no
mov eax,[edi+10+esi*4]
mov ecx,40
rank_button_override:
test eax,eax
jz rank_button_next
mov edx,[eax+4]
test edx,edx
jz rank_button_check
mov eax,edx
loop rank_button_override
jmp rank_set_no
rank_button_check:
test dword [eax+18],80000
jnz rank_button_next
mov edx,[eax+4C]
test edx,edx
jz rank_button_next
cmp edx,[eax+50]
je rank_button_next
cmp [edx],ebp
je rank_set_yes
rank_button_next:
inc esi
jmp rank_button_loop
rank_set_no:
xor eax,eax
jmp rank_set_return
rank_set_yes:
mov eax,1
rank_set_return:
mov [esp+1C],eax
popad
ret
reveal_update:
pushad
mov eax,[STATE+48]
or eax,[STATE+4C]
or eax,[STATE+50]
or eax,[STATE+54]
jz reveal_done
mov esi,[A6C3E4]
test esi,esi
jz reveal_done
mov edi,[esi+3C]
test edi,edi
jz reveal_done
cmp dword [esi+38],0
jle reveal_done
cmp esi,[STATE+58]
jne reveal_new_map
cmp edi,[STATE+5C]
je reveal_compare
reveal_new_map:
mov [STATE+58],esi
mov [STATE+5C],edi
mov dword [STATE+50],0
mov dword [STATE+54],0
reveal_compare:
mov eax,[STATE+48]
xor eax,[STATE+50]
mov edx,[STATE+4C]
xor edx,[STATE+54]
or eax,edx
jz reveal_done
mov eax,[STATE]
test eax,eax
jz reveal_done
mov ebx,[eax+24]
cmp ebx,10
jae reveal_done
mov ebp,esp
sub esp,220
and esp,-10
fxsave [esp]
mov eax,[STATE+48]
cmp eax,[STATE+50]
je reveal_refresh
push ebx
mov ecx,esi
test eax,eax
jz reveal_remove
call 5589F0
mov dword [STATE+50],1
jmp reveal_refresh
reveal_remove:
call 558A30
mov dword [STATE+50],0
reveal_refresh:
mov ecx,esi
call 558C10
mov eax,[STATE+4C]
mov [STATE+54],eax
fxrstor [esp]
mov esp,ebp
reveal_done:
popad
ret
frame_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
mov ebp,[A6BE84]
test ebp,ebp
jz session_expired
cmp ebp,[STATE+4]
jne session_expired
mov eax,[ebp+3C]
cmp eax,[STATE+8]
jb session_expired
mov [STATE+8],eax
mov eax,[A6B968]
test eax,eax
jz session_expired
mov eax,[eax+C]
cmp eax,[STATE]
jne session_expired
mov eax,[ebp+98]
cmp eax,0
je frame_session_ok
cmp eax,2
jne session_expired
frame_session_ok:
cmp dword [STATE+C],0
jne frame_exit
mov eax,[STATE+14]
cmp eax,[STATE+38]
je power_refreshed
mov ecx,[STATE]
test eax,eax
jz power_remove_supply
add dword [ecx+74],3E8
mov dword [STATE+38],1
push 0
call 456EA0
jmp power_refreshed
power_remove_supply:
sub dword [ecx+74],3E8
mov dword [STATE+38],0
xor edx,edx
mov eax,[ecx+74]
cmp eax,[ecx+78]
setl dl
push edx
call 456EA0
power_refreshed:
cmp dword [STATE+3C],0
je rank_done
mov eax,[A6BC40]
test eax,eax
jz rank_done
mov edx,[eax+C]
sub edx,[eax+8]
sar edx,2
cmp edx,1
jl rank_done
cmp edx,20
jg rank_done
mov ecx,[STATE]
cmp [ecx+174],edx
jge rank_points
push dword [ebp+9C]
mov [ebp+9C],edx
push edx
call 456130
pop eax
mov [ebp+9C],eax
rank_points:
mov eax,[A6BC44]
test eax,eax
jz rank_done
mov esi,[eax+8]
mov edi,[eax+C]
mov eax,edi
sub eax,esi
cmp eax,10000
ja rank_done
xor ebx,ebx
rank_science_loop:
cmp esi,edi
jae rank_science_end
mov edx,[esi]
mov ecx,40
rank_override:
test edx,edx
jz rank_science_next
mov eax,[edx+4]
test eax,eax
jz rank_science_info
mov edx,eax
loop rank_override
jmp rank_done
rank_science_info:
cmp dword [edx+30],0
jle rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 4562A0
pop edx
test al,al
jnz rank_science_next
push edx
push dword [edx+C]
push dword [STATE]
mov ecx,[A6BC44]
call 485F20
pop edx
test al,al
jz rank_science_next
call rank_menu_contains
test eax,eax
jz rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 456320
pop edx
test al,al
jnz rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 4563A0
pop edx
test al,al
jnz rank_science_next
add ebx,[edx+30]
jo rank_done
rank_science_next:
add esi,4
jmp rank_science_loop
rank_science_end:
mov eax,[STATE]
cmp [eax+17C],ebx
je rank_complete
mov [eax+17C],ebx
mov ecx,[A6B9C8]
test ecx,ecx
jz rank_complete
push eax
call 45FC60
rank_complete:
mov dword [STATE+3C],0
rank_done:
call reveal_update
mov eax,[STATE+28]
cmp dword [STATE+2C],0
je promotion_done
mov eax,[A6C330]
test eax,eax
jz promotion_done
mov edi,[eax+18]
test edi,edi
jz promotion_done
mov esi,[edi]
mov ebx,10000
promotion_loop:
test esi,esi
jz promotion_done
cmp esi,edi
je promotion_done
dec ebx
jz promotion_done
mov eax,[esi+8]
test eax,eax
jz promotion_next
mov ecx,[eax+88]
test ecx,ecx
jz promotion_next
cmp [ecx+70],eax
jne promotion_next
call local_object
test eax,eax
jz promotion_next
mov ecx,[ecx+124]
test ecx,ecx
jz promotion_next
cmp dword [ecx+C],3
jge promotion_next
push ecx
call 616480
pop ecx
test al,al
jz promotion_next

push 3
call 616510
promotion_next:
mov esi,[esi]
jmp promotion_loop
promotion_done:
mov dword [STATE+2C],0
cmp dword [STATE+28],0
je frame_exit
mov esi,[ebp+68]
mov edi,10000
object_loop:
test esi,esi
jz object_done
dec edi
jz object_done
mov ecx,esi
call local_object
test eax,eax
jz object_next
mov ecx,esi
push 11
call 5603B0
test al,al
jz object_next
test byte [esi+18C],20
jnz object_next
mov ecx,esi
push 4
call 565900
mov ecx,esi
push 5
call 5658A0
object_next:
mov esi,[esi+78]
jmp object_loop
object_done:
mov dword [STATE+28],0
jmp frame_exit
session_expired:
mov dword [STATE+3C],0
mov dword [STATE+C],1
mov dword [STATE+28],0
mov dword [STATE+2C],0
frame_exit:
popad
popfd
jmp frame_original
frame_original:
mov ecx, [A6BE84]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4A2FD4
local_object:
xor eax,eax
test ecx,ecx
jz local_return
push edx
mov edx,[ecx+140]
test edx,edx
jz local_pop
mov edx,[edx+8]
test edx,edx
jz local_pop
mov edx,[edx+C]
cmp edx,[STATE]
jne local_pop
mov eax,1
local_pop:
pop edx
local_return:
ret]====],["key"]=[====[g]====],["main"]=100,["ids"]={101,102,103,104,105,106,107,108,109,110,111},["options"]={["money"]=101,["power"]=102,["build"]=103,["ammo"]=104,["cooldown"]=105,["junk"]=106,["protect"]=107,["rank"]=108,["promote"]=109,["full"]=110,["visual"]=111}},{["title"]=[====[Command &amp; Conquer: Generals – Zero Hour]====],["build"]=[====[Steam build 17435311]====],["playerlist"]=10720672,["logic"]=10722060,["mode"]=148,["objects"]=108,["team"]=432,["experience"]=396,["money"]=52,["energy"]=128,["kind"]=5522800,["setweapon"]=5546816,["clearweapon"]=5546912,["weaponflags"]=512,["trainable"]=6388080,["promote"]=6388224,["promoteArgs"]=2,["frame"]=4864142,["withdraw"]=5246380,["buildtime"]=5820000,["ratio"]=5732368,["power"]=5732416,["production"]=5732336,["damage"]=6810912,["damageout"]=72,["ammo"]=5001082,["ready"]=6827712,["percent"]=6827840,["readyframe"]=6830224,["md5"]=[====[bd53837403b5015f6008ef6aca6ecc9d]====],["timestamp"]=1740035923,["imageSize"]=6881280,["powerRefresh"]=4549728,["powerRefreshOriginal"]=[====[8A 44 24 04 84 C0 56 57 8B F9 74 07 E8 9F FD FF FF EB 05 E8 98 FE FF FF]====],["rankSet"]=4545280,["rankStore"]=10721436,["rankLimit"]=152,["rankField"]=392,["points"]=400,["controlbar"]=10720760,["pointsNotify"]=4582528,["selection"]=10723248,["partition"]=10723448,["revealAdd"]=5491888,["revealRemove"]=5491952,["revealRefresh"]=5492432,["terrainShroud"]=7604048,["radarShroud"]=7845712,["clientShroud"]=4890488,["renderShroud"]=7761468,["objectShroud"]=5539312,["revealChecks"]={{["address"]=5491888,["original"]=[====[56 8B F1 8B 46 38 57 33 FF 85 C0 7E 23 53 55 8B 6C 24 14 33 DB 8B 4E 3C]====]},{["address"]=5491952,["original"]=[====[53 55 56 8B F1 8B 46 58 3B 46 48 57 0F 84 95 00 00 00 83 CD FF 8B 4E 48]====]},{["address"]=5492432,["original"]=[====[83 EC 0C 55 8B E9 8B 0D E8 85 A3 00 8B 01 FF 90 B8 00 00 00 8B 0D 00 9B]====]},{["address"]=5539312,["original"]=[====[56 8B F1 E8 18 B7 FF FF F7 40 6C 00 00 01 00 75 18 8B 8E 84 01 00 00 85]====]}},["scienceStore"]=10721432,["hasScience"]=4545648,["rootScience"]=4757232,["scienceDisabled"]=4545776,["scienceHidden"]=4545904,["rankMenuOffset"]=148,["commandSetNext"]=88,["rankMenuSlots"]={4,15,4},["rankChecks"]={{["address"]=4545280,["original"]=[====[51 56 57 8B 7C 24 10 83 FF 01 8B F1 7D 0A C7 44 24 10 01 00 00 00 EB 1E]====]},{["address"]=4582528,["original"]=[====[56 8B F1 8B 4C 24 08 E8 34 52 FF FF 84 C0 74 5A A1 A0 95 A3 00 8B 40 0C]====]},{["address"]=4545648,["original"]=[====[8B 81 64 01 00 00 8B 54 24 04 56 8B B1 68 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=4757232,["original"]=[====[53 55 56 8B D9 8B 43 0C 57 8B 7B 08 3B F8 74 23 8B 6C 24 18 8B 37 8B 4E]====]},{["address"]=4545776,["original"]=[====[8B 81 70 01 00 00 8B 54 24 04 56 8B B1 74 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=4545904,["original"]=[====[8B 81 7C 01 00 00 8B 54 24 04 56 8B B1 80 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=6388080,["original"]=[====[8B 49 08 E8 98 C3 F2 FF 8A 80 2A 02 00 00 C3 90 56 8B F1 8B 4E 08 E8 85]====]},{["address"]=6388224,["original"]=[====[53 56 8B F1 8B 5E 0C 57 8B 7C 24 10 3B DF 74 28 8B 4E 08 89 7E 0C E8 F5]====]}},["weaponClip"]=4993232,["weaponReload"]=4994000,["weaponSet"]=464,["weaponShared"]=80,["visualCall"]=7761702,["selectionColor"]=4651696,["visualConsume"]=7761844,["hooks"]={{["name"]=[====[withdraw]====],["address"]=5246380,["original"]=[====[8B 47 04 2B C6]====],["length"]=5,["signature"]=[====[8B 47 04 2B C6 8D 4C 24 08 89 47 04 C7 44 24 74 FF FF FF FF E8 0B 48 F4]====]},{["name"]=[====[build]====],["address"]=5820000,["original"]=[====[83 EC 08 53 56]====],["length"]=5,["signature"]=[====[83 EC 08 53 56 57 8B 7C 24 18 8B F1 8B 86 EC 01 00 00 56 6A 01 8D 4F 0C]====]},{["name"]=[====[upgrade]====],["address"]=4897024,["original"]=[====[D9 41 14 D8 0D AC 5F 94 00]====],["length"]=9,["signature"]=[====[D9 41 14 D8 0D AC 5F 94 00 E8 42 CA 44 00 C2 04 00 90 90 90 90 90 90 90]====]},{["name"]=[====[ratio]====],["address"]=5732368,["original"]=[====[51 A1 0C 9B A3 00]====],["length"]=6,["signature"]=[====[51 A1 0C 9B A3 00 8B 50 3C 3B 51 0C 73 08 D9 05 9C 3E 94 00 59 C3 8B 41]====]},{["name"]=[====[power]====],["address"]=5732416,["original"]=[====[A1 0C 9B A3 00]====],["length"]=5,["signature"]=[====[A1 0C 9B A3 00 8B 50 3C 3B 51 0C 73 03 32 C0 C3 8B 41 04 56 8B 71 08 33]====]},{["name"]=[====[production]====],["address"]=5732336,["original"]=[====[A1 0C 9B A3 00]====],["length"]=5,["signature"]=[====[A1 0C 9B A3 00 8B 50 3C 3B 51 0C 73 03 33 C0 C3 8B 41 04 C3 90 90 90 90]====]},{["name"]=[====[brownout]====],["address"]=4549728,["original"]=[====[8A 44 24 04 84 C0]====],["length"]=6,["signature"]=[====[8A 44 24 04 84 C0 56 57 8B F9 74 07 E8 9F FD FF FF EB 05 E8 98 FE FF FF]====]},{["name"]=[====[ready]====],["address"]=6827712,["original"]=[====[53 56 8B F1 8B 4E F8]====],["length"]=7,["signature"]=[====[53 56 8B F1 8B 4E F8 85 C9 57 8B 7E F4 74 4D 85 FF 74 49 E8 B8 53 EC FF]====]},{["name"]=[====[percent]====],["address"]=6827840,["original"]=[====[83 EC 08 56 8B F1]====],["length"]=6,["signature"]=[====[83 EC 08 56 8B F1 8B 46 08 85 C0 57 7E 15 81 7E 10 00 00 80 3F 75 0C D9]====]},{["name"]=[====[readyframe]====],["address"]=6830224,["original"]=[====[56 8B F1 8B 06]====],["length"]=5,["signature"]=[====[56 8B F1 8B 06 57 FF 50 14 8B 50 04 85 D2 74 10 8B 4A 04 85 C9 74 07 E8]====]},{["name"]=[====[weaponclip]====],["address"]=4993232,["original"]=[====[55 8B EC 83 EC 18]====],["length"]=6,["signature"]=[====[55 8B EC 83 EC 18 B8 00 00 80 3F 89 45 E8 89 45 EC 89 45 F0 89 45 F4 53]====]},{["name"]=[====[weaponreload]====],["address"]=4994000,["original"]=[====[55 8B EC 83 EC 08]====],["length"]=6,["signature"]=[====[55 8B EC 83 EC 08 53 56 8B F1 8B 46 08 8B 80 64 01 00 00 85 C0 57 8B 7D]====]},{["name"]=[====[damage]====],["address"]=6810912,["original"]=[====[55 8B EC 6A FF]====],["length"]=5,["signature"]=[====[55 8B EC 6A FF 68 3E 2B 92 00 64 A1 00 00 00 00 50 64 89 25 00 00 00 00]====]},{["name"]=[====[visual]====],["address"]=7761702,["original"]=[====[E8 85 8B D0 FF]====],["length"]=5,["signature"]=[====[E8 85 8B D0 FF 85 FF 75 31 85 C0 75 2D 8B 85 EC 00 00 00 85 C0 0F 8E 85]====]},{["name"]=[====[ammo]====],["address"]=5001082,["original"]=[====[8B 46 14 48 4B 4A]====],["length"]=6,["signature"]=[====[8B 46 14 48 4B 4A 8B CA 85 C9 89 46 14 89 5E 30 89 56 38 7F 0F FF 46 34]====]},{["name"]=[====[terrainShroud]====],["address"]=7604048,["original"]=[====[A1 30 8B A4 00]====],["length"]=5,["signature"]=[====[A1 30 8B A4 00 85 C0 74 5D 8B 88 44 28 00 00 85 C9 74 53 8B 44 24 0C 83]====]},{["name"]=[====[radarShroud]====],["address"]=7845712,["original"]=[====[A1 30 8B A4 00]====],["length"]=5,["signature"]=[====[A1 30 8B A4 00 83 EC 20 85 C0 55 56 57 8B F9 74 08 8B B0 44 28 00 00 EB]====]},{["name"]=[====[clientShroud]====],["address"]=4890488,["original"]=[====[E8 73 E6 09 00]====],["length"]=5,["signature"]=[====[E8 73 E6 09 00 83 F8 03 7C 32 8B 96 B4 00 00 00 85 D2 74 25 F6 87 77 02]====]},{["name"]=[====[renderShroud]====],["address"]=7761468,["original"]=[====[E8 AF 17 DE FF]====],["length"]=5,["signature"]=[====[E8 AF 17 DE FF 83 F8 01 89 44 24 14 75 11 8B 15 0C 9B A3 00 8B 42 3C 89]====]},{["name"]=[====[frame]====],["address"]=4864142,["original"]=[====[8B 0D 0C 9B A3 00]====],["length"]=6,["signature"]=[====[8B 0D 0C 9B A3 00 8B 69 3C 8B 0D 18 9B A3 00 8B 11 55 89 6C 24 18 FF 52]====]}},["asm"]=[====[withdraw_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+10],0
je withdraw_fail
cmp dword [STATE+C],0
jne withdraw_fail
mov eax,edi
sub eax,34
cmp eax,[STATE]
jne withdraw_fail

popad
popfd
mov eax,[edi+4]
sub eax,esi
cmp eax,7530
jae withdraw_done
mov eax,7530
withdraw_done:
pushfd
lock dec dword [STATE+30]
popfd
jmp 500DB1
withdraw_fail:
popad
popfd
jmp withdraw_original
withdraw_original:
mov eax, [edi+4]
sub eax, esi
pushfd
lock dec dword [STATE+30]
popfd
jmp 500DB1
build_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+18],0
je build_fail
cmp dword [STATE+C],0
jne build_fail
mov eax,[esp+28]
cmp eax,[STATE]
jne build_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret 4
build_fail:
popad
popfd
jmp build_original
build_original:
sub esp, 8
push ebx
push esi
pushfd
lock dec dword [STATE+30]
popfd
jmp 58CE65
upgrade_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+18],0
je upgrade_fail
cmp dword [STATE+C],0
jne upgrade_fail
mov eax,[esp+28]
cmp eax,[STATE]
jne upgrade_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret 4
upgrade_fail:
popad
popfd
jmp upgrade_original
upgrade_original:
fld dword [ecx+14]
fmul dword [945FAC]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AB909
ratio_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je ratio_fail
cmp dword [STATE+C],0
jne ratio_fail
mov eax,ecx
sub eax,80
cmp eax,[STATE]
jne ratio_fail

popad
popfd
fld1
pushfd
lock dec dword [STATE+30]
popfd
ret
ratio_fail:
popad
popfd
jmp ratio_original
ratio_original:
push ecx
mov eax, [A39B0C]
pushfd
lock dec dword [STATE+30]
popfd
jmp 577816
power_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je power_fail
cmp dword [STATE+C],0
jne power_fail
mov eax,ecx
sub eax,80
cmp eax,[STATE]
jne power_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret
power_fail:
popad
popfd
jmp power_original
power_original:
mov eax, [A39B0C]
pushfd
lock dec dword [STATE+30]
popfd
jmp 577845
production_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je production_fail
cmp dword [STATE+C],0
jne production_fail
mov eax,ecx
sub eax,80
cmp eax,[STATE]
jne production_fail

popad
popfd
mov eax,3E8
pushfd
lock dec dword [STATE+30]
popfd
ret
production_fail:
popad
popfd
jmp production_original
production_original:
mov eax, [A39B0C]
pushfd
lock dec dword [STATE+30]
popfd
jmp 5777F5
brownout_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je brownout_fail
cmp dword [STATE+C],0
jne brownout_fail
mov eax,ecx
cmp eax,[STATE]
jne brownout_fail

popad
popfd
mov byte [esp+4],0
jmp brownout_original
brownout_fail:
popad
popfd
jmp brownout_original
brownout_original:
mov al, byte [esp+4]
test al, al
pushfd
lock dec dword [STATE+30]
popfd
jmp 456C66
ready_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je ready_fail
cmp dword [STATE+C],0
jne ready_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz ready_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne ready_fail
popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret
ready_fail:
popad
popfd
jmp ready_original
ready_original:
push ebx
push esi
mov esi, ecx
mov ecx, [esi-8]
pushfd
lock dec dword [STATE+30]
popfd
jmp 682EC7
percent_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je percent_fail
cmp dword [STATE+C],0
jne percent_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz percent_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne percent_fail
popad
popfd
fld1
pushfd
lock dec dword [STATE+30]
popfd
ret
percent_fail:
popad
popfd
jmp percent_original
percent_original:
sub esp, 8
push esi
mov esi, ecx
pushfd
lock dec dword [STATE+30]
popfd
jmp 682F46
readyframe_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je readyframe_fail
cmp dword [STATE+C],0
jne readyframe_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz readyframe_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne readyframe_fail
popad
popfd
mov eax,[A39B0C]
mov eax,[eax+3C]
test eax,eax
jz readyframe_zero
dec eax
readyframe_zero:
pushfd
lock dec dword [STATE+30]
popfd
ret
readyframe_fail:
popad
popfd
jmp readyframe_original
readyframe_original:
push esi
mov esi, ecx
mov eax, [esi]
pushfd
lock dec dword [STATE+30]
popfd
jmp 683895
weaponclip_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je weaponclip_fail
cmp dword [STATE+C],0
jne weaponclip_fail
mov ecx,[esp+28]
call local_object
test eax,eax
jz weaponclip_fail
mov edx,[esp+18]
test edx,edx
jz weaponclip_fail
mov eax,[edx+C]
cmp eax,3
jae weaponclip_fail
lea ebx,[ecx+1D0]
cmp [ebx+eax*4+8],edx
jne weaponclip_fail
mov ebx,[ebx+4]
test ebx,ebx
jz weaponclip_fail
cmp byte [ebx+50],0
jne weaponclip_fail
cmp dword [ebx+eax*4+14],0
jne weaponclip_fail
mov edi,[edx+8]
test edi,edi
jz weaponclip_fail
cmp [ebx+eax*4+8],edi
jne weaponclip_fail
popad
popfd
cmp dword [ecx+10],3
jne weaponclip_done
cmp dword [ecx+14],0
je weaponclip_done
mov eax,[A39B0C]
mov eax,[eax+3C]
cmp eax,2
jb weaponclip_zero
sub eax,2
jmp weaponclip_clamp
weaponclip_zero:
xor eax,eax
weaponclip_clamp:
cmp [ecx+18],eax
jbe weaponclip_done
mov [ecx+18],eax
weaponclip_done:
xor eax,eax
pushfd
lock dec dword [STATE+30]
popfd
ret 4
weaponclip_fail:
popad
popfd
jmp weaponclip_original
weaponclip_original:
push ebp
mov ebp, esp
sub esp, 18
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C30D6
weaponreload_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je weaponreload_fail
cmp dword [STATE+C],0
jne weaponreload_fail
mov ecx,[esp+28]
call local_object
test eax,eax
jz weaponreload_fail
mov edx,[esp+18]
test edx,edx
jz weaponreload_fail
mov eax,[edx+C]
cmp eax,3
jae weaponreload_fail
lea ebx,[ecx+1D0]
cmp [ebx+eax*4+8],edx
jne weaponreload_fail
mov ebx,[ebx+4]
test ebx,ebx
jz weaponreload_fail
cmp byte [ebx+50],0
jne weaponreload_fail
cmp dword [ebx+eax*4+14],0
jne weaponreload_fail
mov edi,[edx+8]
test edi,edi
jz weaponreload_fail
cmp [ebx+eax*4+8],edi
jne weaponreload_fail
popad
popfd
mov dword [esp+C],1
jmp weaponreload_original
weaponreload_fail:
popad
popfd
jmp weaponreload_original
weaponreload_original:
push ebp
mov ebp, esp
sub esp, 8
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C33D6
damage_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+24],0
je damage_fail
cmp dword [STATE+C],0
jne damage_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz damage_fail
mov edx,[esp+28]
test edx,edx
jz damage_keep_protection
cmp dword [edx+20],8
jne damage_keep_protection
mov eax,[ecx+64]
cmp [edx+8],eax
je damage_fail
damage_keep_protection:
mov edx,[STATE+44]
xor eax,eax
protect_find:
cmp eax,edx
jae damage_fail
lea ebx,[eax+edx]
shr ebx,1
lea edi,[STATE+2000+ebx*8]
cmp [edi],ecx
je protect_identity
jb protect_higher
mov edx,ebx
jmp protect_find
protect_higher:
lea eax,[ebx+1]
jmp protect_find
protect_identity:
mov ebx,[ecx+64]
cmp [edi+4],ebx
jne damage_fail
protect_found:
popad
popfd
mov eax,[esp+4]
test eax,eax
jz damage_return
mov dword [eax+48],0
mov dword [eax+4C],0
damage_return:
pushfd
lock dec dword [STATE+30]
popfd
ret 4
damage_fail:
popad
popfd
jmp damage_original
damage_original:
push ebp
mov ebp, esp
push -1
pushfd
lock dec dword [STATE+30]
popfd
jmp 67ED25
visual_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+24],0
je visual_fail
cmp dword [STATE+C],0
jne visual_fail
mov ecx,[ebx+88]
call local_object
test eax,eax
jz visual_fail
mov edx,[STATE+44]
xor eax,eax
visual_find:
cmp eax,edx
jae visual_fail
lea ebx,[eax+edx]
shr ebx,1
lea edi,[STATE+2000+ebx*8]
cmp [edi],ecx
je visual_identity
jb visual_higher
mov edx,ebx
jmp visual_find
visual_higher:
lea eax,[ebx+1]
jmp visual_find
visual_identity:
mov ebx,[ecx+64]
cmp [edi+4],ebx
jne visual_fail
visual_found:
popad
popfd
call 46FAB0
mov dword [esp+24],3E4CCCCD
mov dword [esp+28],3ECCCCCD
mov dword [esp+2C],3F000000
test edi,edi
jz visual_skip_edi
fld dword [esp+24]
fadd dword [edi+0]
fstp dword [esp+24]
fld dword [esp+28]
fadd dword [edi+4]
fstp dword [esp+28]
fld dword [esp+2C]
fadd dword [edi+8]
fstp dword [esp+2C]
visual_skip_edi:
test eax,eax
jz visual_skip_eax
fld dword [esp+24]
fadd dword [eax+0]
fstp dword [esp+24]
fld dword [esp+28]
fadd dword [eax+4]
fstp dword [esp+28]
fld dword [esp+2C]
fadd dword [eax+8]
fstp dword [esp+2C]
visual_skip_eax:
pushfd
lock dec dword [STATE+30]
popfd
jmp 766FB4
visual_fail:
popad
popfd
jmp visual_original
visual_original:
call 46FAB0
pushfd
lock dec dword [STATE+30]
popfd
jmp 766F2B
ammo_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+1C],0
je ammo_fail
cmp dword [STATE+C],0
jne ammo_fail
mov ecx,edi
call local_object
test eax,eax
jz ammo_fail
push A
call 544570
test al,al
jz ammo_fail
popad
popfd
mov eax,[esi+14]
dec ebx
dec edx
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C4F80
ammo_fail:
popad
popfd
jmp ammo_original
ammo_original:
mov eax, [esi+14]
dec eax
dec ebx
dec edx
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C4F80
terrainShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
cmp dword [STATE+4C],0
je terrainShroud_done
cmp dword [STATE+C],0
jne terrainShroud_done
mov dword [esp+10],0
terrainShroud_done:
popfd
jmp terrainShroud_original
terrainShroud_original:
mov eax, [A48B30]
pushfd
lock dec dword [STATE+30]
popfd
jmp 740755
radarShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
cmp dword [STATE+4C],0
je radarShroud_done
cmp dword [STATE+C],0
jne radarShroud_done
mov dword [esp+10],0
radarShroud_done:
popfd
jmp radarShroud_original
radarShroud_original:
mov eax, [A48B30]
pushfd
lock dec dword [STATE+30]
popfd
jmp 77B755
clientShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
call 5485F0
pushfd
cmp dword [STATE+4C],0
je clientShroud_done
cmp dword [STATE+C],0
jne clientShroud_done
mov eax,1
clientShroud_done:
popfd
pushfd
lock dec dword [STATE+30]
popfd
jmp 4A9F7D
clientShroud_original:
call 5485F0
pushfd
lock dec dword [STATE+30]
popfd
jmp 4A9F7D
renderShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
call 5485F0
pushfd
cmp dword [STATE+4C],0
je renderShroud_done
cmp dword [STATE+C],0
jne renderShroud_done
mov eax,1
renderShroud_done:
popfd
pushfd
lock dec dword [STATE+30]
popfd
jmp 766E41
renderShroud_original:
call 5485F0
pushfd
lock dec dword [STATE+30]
popfd
jmp 766E41
rank_menu_contains:
pushad
mov ebp,[edx+C]
mov ebx,[STATE]
mov ebx,[ebx+4]
test ebx,ebx
jz rank_menu_no
mov esi,[ebx+94]
mov ecx,4
call rank_set_contains
test eax,eax
jnz rank_menu_yes
mov esi,[ebx+98]
mov ecx,F
call rank_set_contains
test eax,eax
jnz rank_menu_yes
mov esi,[ebx+9C]
mov ecx,4
call rank_set_contains
test eax,eax
jnz rank_menu_yes
rank_menu_no:
xor eax,eax
jmp rank_menu_return
rank_menu_yes:
mov eax,1
rank_menu_return:
mov [esp+1C],eax
popad
ret
rank_set_contains:
pushad
test esi,esi
jz rank_set_no
add esi,4
mov edi,[A395F8]
test edi,edi
jz rank_set_no
mov edi,[edi+2C]
mov ebx,1000
rank_set_find:
test edi,edi
jz rank_set_no
mov eax,[edi+C]
test eax,eax
jz rank_set_next
add eax,4
xor ecx,ecx
rank_set_name:
mov dl,[eax+ecx]
cmp dl,[esi+ecx]
jne rank_set_next
test dl,dl
jz rank_set_match
inc ecx
cmp ecx,100
jb rank_set_name
rank_set_next:
mov edi,[edi+58]
dec ebx
jnz rank_set_find
jmp rank_set_no
rank_set_match:
mov ebx,40
rank_set_override:
mov eax,[edi+4]
test eax,eax
jz rank_set_buttons
mov edi,eax
dec ebx
jnz rank_set_override
jmp rank_set_no
rank_set_buttons:
xor esi,esi
rank_button_loop:
cmp esi,[esp+18]
jae rank_set_no
mov eax,[edi+10+esi*4]
mov ecx,40
rank_button_override:
test eax,eax
jz rank_button_next
mov edx,[eax+4]
test edx,edx
jz rank_button_check
mov eax,edx
loop rank_button_override
jmp rank_set_no
rank_button_check:
test dword [eax+18],80000
jnz rank_button_next
mov edx,[eax+4C]
test edx,edx
jz rank_button_next
cmp edx,[eax+50]
je rank_button_next
cmp [edx],ebp
je rank_set_yes
rank_button_next:
inc esi
jmp rank_button_loop
rank_set_no:
xor eax,eax
jmp rank_set_return
rank_set_yes:
mov eax,1
rank_set_return:
mov [esp+1C],eax
popad
ret
reveal_update:
pushad
mov eax,[STATE+48]
or eax,[STATE+4C]
or eax,[STATE+50]
or eax,[STATE+54]
jz reveal_done
mov esi,[A3A078]
test esi,esi
jz reveal_done
mov edi,[esi+3C]
test edi,edi
jz reveal_done
cmp dword [esi+38],0
jle reveal_done
cmp esi,[STATE+58]
jne reveal_new_map
cmp edi,[STATE+5C]
je reveal_compare
reveal_new_map:
mov [STATE+58],esi
mov [STATE+5C],edi
mov dword [STATE+50],0
mov dword [STATE+54],0
reveal_compare:
mov eax,[STATE+48]
xor eax,[STATE+50]
mov edx,[STATE+4C]
xor edx,[STATE+54]
or eax,edx
jz reveal_done
mov eax,[STATE]
test eax,eax
jz reveal_done
mov ebx,[eax+24]
cmp ebx,10
jae reveal_done
mov ebp,esp
sub esp,220
and esp,-10
fxsave [esp]
mov eax,[STATE+48]
cmp eax,[STATE+50]
je reveal_refresh
push ebx
mov ecx,esi
test eax,eax
jz reveal_remove
call 53CCB0
mov dword [STATE+50],1
jmp reveal_refresh
reveal_remove:
call 53CCF0
mov dword [STATE+50],0
reveal_refresh:
mov ecx,esi
call 53CED0
mov eax,[STATE+4C]
mov [STATE+54],eax
fxrstor [esp]
mov esp,ebp
reveal_done:
popad
ret
frame_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
mov ebp,[A39B0C]
test ebp,ebp
jz session_expired
cmp ebp,[STATE+4]
jne session_expired
mov eax,[ebp+3C]
cmp eax,[STATE+8]
jb session_expired
mov [STATE+8],eax
mov eax,[A395A0]
test eax,eax
jz session_expired
mov eax,[eax+C]
cmp eax,[STATE]
jne session_expired
mov eax,[ebp+94]
cmp eax,0
je frame_session_ok
cmp eax,2
jne session_expired
frame_session_ok:
cmp dword [STATE+C],0
jne frame_exit
mov eax,[STATE+14]
cmp eax,[STATE+38]
je power_refreshed
mov [STATE+38],eax
mov ecx,[STATE]
test eax,eax
jz power_native_state
xor edx,edx
jmp power_refresh_state
power_native_state:
mov edx,1
mov eax,[ebp+3C]
cmp eax,[ecx+8C]
jb power_refresh_state
xor edx,edx
mov eax,[ecx+84]
cmp eax,[ecx+88]
setl dl
power_refresh_state:
push edx
call 456C60
power_refreshed:
cmp dword [STATE+3C],0
je rank_done
mov eax,[A3989C]
test eax,eax
jz rank_done
mov edx,[eax+C]
sub edx,[eax+8]
sar edx,2
cmp edx,1
jl rank_done
cmp edx,20
jg rank_done
mov ecx,[STATE]
cmp [ecx+188],edx
jge rank_points
push dword [ebp+98]
mov [ebp+98],edx
push edx
call 455B00
pop eax
mov [ebp+98],eax
rank_points:
mov eax,[A39898]
test eax,eax
jz rank_done
mov esi,[eax+8]
mov edi,[eax+C]
mov eax,edi
sub eax,esi
cmp eax,10000
ja rank_done
xor ebx,ebx
rank_science_loop:
cmp esi,edi
jae rank_science_end
mov edx,[esi]
mov ecx,40
rank_override:
test edx,edx
jz rank_science_next
mov eax,[edx+4]
test eax,eax
jz rank_science_info
mov edx,eax
loop rank_override
jmp rank_done
rank_science_info:
cmp dword [edx+30],0
jle rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 455C70
pop edx
test al,al
jnz rank_science_next
push edx
push dword [edx+C]
push dword [STATE]
mov ecx,[A39898]
call 4896F0
pop edx
test al,al
jz rank_science_next
call rank_menu_contains
test eax,eax
jz rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 455CF0
pop edx
test al,al
jnz rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 455D70
pop edx
test al,al
jnz rank_science_next
add ebx,[edx+30]
jo rank_done
rank_science_next:
add esi,4
jmp rank_science_loop
rank_science_end:
mov eax,[STATE]
cmp [eax+190],ebx
je rank_complete
mov [eax+190],ebx
mov ecx,[A395F8]
test ecx,ecx
jz rank_complete
push eax
call 45EC80
rank_complete:
mov dword [STATE+3C],0
rank_done:
call reveal_update
mov eax,[STATE+28]
cmp dword [STATE+2C],0
je promotion_done
mov eax,[A39FB0]
test eax,eax
jz promotion_done
mov edi,[eax+18]
test edi,edi
jz promotion_done
mov esi,[edi]
mov ebx,10000
promotion_loop:
test esi,esi
jz promotion_done
cmp esi,edi
je promotion_done
dec ebx
jz promotion_done
mov eax,[esi+8]
test eax,eax
jz promotion_next
mov ecx,[eax+88]
test ecx,ecx
jz promotion_next
cmp [ecx+70],eax
jne promotion_next
call local_object
test eax,eax
jz promotion_next
mov ecx,[ecx+18C]
test ecx,ecx
jz promotion_next
cmp dword [ecx+C],3
jge promotion_next
push ecx
call 617970
pop ecx
test al,al
jz promotion_next
push 1
push 3
call 617A00
promotion_next:
mov esi,[esi]
jmp promotion_loop
promotion_done:
mov dword [STATE+2C],0
cmp dword [STATE+28],0
je frame_exit
mov esi,[ebp+6C]
mov edi,10000
object_loop:
test esi,esi
jz object_done
dec edi
jz object_done
mov ecx,esi
call local_object
test eax,eax
jz object_next
mov ecx,esi
push 11
call 544570
test al,al
jz object_next
test byte [esi+200],20
jnz object_next
mov ecx,esi
push 4
call 54A3A0
mov ecx,esi
push 5
call 54A340
object_next:
mov esi,[esi+78]
jmp object_loop
object_done:
mov dword [STATE+28],0
jmp frame_exit
session_expired:
mov dword [STATE+3C],0
mov dword [STATE+C],1
mov dword [STATE+28],0
mov dword [STATE+2C],0
frame_exit:
popad
popfd
jmp frame_original
frame_original:
mov ecx, [A39B0C]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4A3894
local_object:
xor eax,eax
test ecx,ecx
jz local_return
push edx
mov edx,[ecx+1B0]
test edx,edx
jz local_pop
mov edx,[edx+8]
test edx,edx
jz local_pop
mov edx,[edx+C]
cmp edx,[STATE]
jne local_pop
mov eax,1
local_pop:
pop edx
local_return:
ret]====],["key"]=[====[z]====],["main"]=200,["ids"]={201,202,203,204,205,206,207,208,209,210,211},["options"]={["money"]=201,["power"]=202,["build"]=203,["ammo"]=204,["cooldown"]=205,["junk"]=206,["protect"]=207,["rank"]=208,["promote"]=209,["full"]=210,["visual"]=211}},{["title"]=[====[Command &amp; Conquer: Generals – Zero Hour (GenPatcher)]====],["build"]=[====[GenPatcher Zero Hour 1.04]====],["playerlist"]=10663560,["logic"]=10664940,["mode"]=148,["objects"]=108,["team"]=432,["experience"]=396,["money"]=52,["energy"]=128,["kind"]=5520592,["setweapon"]=5544624,["clearweapon"]=5544720,["weaponflags"]=512,["trainable"]=6404048,["promote"]=6404192,["promoteArgs"]=2,["frame"]=4877246,["withdraw"]=5245084,["buildtime"]=5817936,["ratio"]=5730080,["power"]=5730128,["production"]=5730048,["damage"]=6827072,["damageout"]=72,["ammo"]=5014138,["ready"]=6843856,["percent"]=6843984,["readyframe"]=6846368,["md5"]=[====[2e041916040f72bd08786bc605975970]====],["timestamp"]=1110491227,["imageSize"]=7168000,["powerRefresh"]=4548640,["powerRefreshOriginal"]=[====[8A 44 24 04 84 C0 56 57 8B F9 74 07 E8 9F FD FF FF EB 05 E8 98 FE FF FF]====],["rankSet"]=4544192,["rankStore"]=10664316,["rankLimit"]=152,["rankField"]=392,["points"]=400,["controlbar"]=10663648,["pointsNotify"]=4582288,["selection"]=10666120,["partition"]=10666320,["revealAdd"]=5489504,["revealRemove"]=5489568,["revealRefresh"]=5490048,["terrainShroud"]=7605456,["radarShroud"]=7847712,["clientShroud"]=4903516,["renderShroud"]=7763260,["objectShroud"]=5537120,["revealChecks"]={{["address"]=5489504,["original"]=[====[56 8B F1 8B 46 38 57 33 FF 85 C0 7E 23 53 55 8B 6C 24 14 33 DB 8B 4E 3C]====]},{["address"]=5489568,["original"]=[====[53 55 56 8B F1 8B 46 58 3B 46 48 57 0F 84 95 00 00 00 83 CD FF 8B 4E 48]====]},{["address"]=5490048,["original"]=[====[83 EC 0C 55 8B E9 8B 0D D0 A6 A2 00 8B 01 FF 90 B8 00 00 00 8B 0D E0 BB]====]},{["address"]=5537120,["original"]=[====[56 8B F1 E8 08 B7 FF FF F7 40 6C 00 00 01 00 75 18 8B 8E 84 01 00 00 85]====]}},["scienceStore"]=10664312,["hasScience"]=4544560,["rootScience"]=4754880,["scienceDisabled"]=4544688,["scienceHidden"]=4544816,["rankMenuOffset"]=148,["commandSetNext"]=88,["rankMenuSlots"]={4,15,4},["rankChecks"]={{["address"]=4544192,["original"]=[====[51 56 57 8B 7C 24 10 83 FF 01 8B F1 7D 0A C7 44 24 10 01 00 00 00 EB 1E]====]},{["address"]=4582288,["original"]=[====[56 8B F1 8B 4C 24 08 E8 E4 4E FF FF 84 C0 74 5A A1 88 B6 A2 00 8B 40 0C]====]},{["address"]=4544560,["original"]=[====[8B 81 64 01 00 00 8B 54 24 04 56 8B B1 68 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=4754880,["original"]=[====[53 55 56 8B D9 8B 43 0C 57 8B 7B 08 3B F8 74 23 8B 6C 24 18 8B 37 8B 4E]====]},{["address"]=4544688,["original"]=[====[8B 81 70 01 00 00 8B 54 24 04 56 8B B1 74 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=4544816,["original"]=[====[8B 81 7C 01 00 00 8B 54 24 04 56 8B B1 80 01 00 00 8B CE 2B C8 C1 F9 04]====]},{["address"]=6404048,["original"]=[====[8B 49 08 E8 98 7C F2 FF 8A 80 2A 02 00 00 C3 90 56 8B F1 8B 4E 08 E8 85]====]},{["address"]=6404192,["original"]=[====[53 56 8B F1 8B 5E 0C 57 8B 7C 24 10 3B DF 74 28 8B 4E 08 89 7E 0C E8 F5]====]}},["weaponClip"]=5006288,["weaponReload"]=5007056,["weaponSet"]=464,["weaponShared"]=80,["visualCall"]=7763494,["selectionColor"]=4651648,["visualConsume"]=7763636,["hooks"]={{["name"]=[====[withdraw]====],["address"]=5245084,["original"]=[====[8B 47 04 2B C6]====],["length"]=5,["signature"]=[====[8B 47 04 2B C6 8D 4C 24 08 89 47 04 C7 44 24 74 FF FF FF FF E8 FB 45 F4]====]},{["name"]=[====[build]====],["address"]=5817936,["original"]=[====[83 EC 08 53 56]====],["length"]=5,["signature"]=[====[83 EC 08 53 56 57 8B 7C 24 18 8B F1 8B 86 EC 01 00 00 56 6A 01 8D 4F 0C]====]},{["name"]=[====[upgrade]====],["address"]=4910128,["original"]=[====[D9 41 14 D8 0D E4 BE 93 00]====],["length"]=9,["signature"]=[====[D9 41 14 D8 0D E4 BE 93 00 E8 52 1D 43 00 C2 04 00 90 90 90 90 90 90 90]====]},{["name"]=[====[ratio]====],["address"]=5730080,["original"]=[====[51 A1 EC BB A2 00]====],["length"]=6,["signature"]=[====[51 A1 EC BB A2 00 8B 50 3C 3B 51 0C 73 08 D9 05 A4 9D 93 00 59 C3 8B 41]====]},{["name"]=[====[power]====],["address"]=5730128,["original"]=[====[A1 EC BB A2 00]====],["length"]=5,["signature"]=[====[A1 EC BB A2 00 8B 50 3C 3B 51 0C 73 03 32 C0 C3 8B 41 04 56 8B 71 08 33]====]},{["name"]=[====[production]====],["address"]=5730048,["original"]=[====[A1 EC BB A2 00]====],["length"]=5,["signature"]=[====[A1 EC BB A2 00 8B 50 3C 3B 51 0C 73 03 33 C0 C3 8B 41 04 C3 90 90 90 90]====]},{["name"]=[====[brownout]====],["address"]=4548640,["original"]=[====[8A 44 24 04 84 C0]====],["length"]=6,["signature"]=[====[8A 44 24 04 84 C0 56 57 8B F9 74 07 E8 9F FD FF FF EB 05 E8 98 FE FF FF]====]},{["name"]=[====[ready]====],["address"]=6843856,["original"]=[====[53 56 8B F1 8B 4E F8]====],["length"]=7,["signature"]=[====[53 56 8B F1 8B 4E F8 85 C9 57 8B 7E F4 74 4D 85 FF 74 49 E8 18 0C EC FF]====]},{["name"]=[====[percent]====],["address"]=6843984,["original"]=[====[83 EC 08 56 8B F1]====],["length"]=6,["signature"]=[====[83 EC 08 56 8B F1 8B 46 08 85 C0 57 7E 15 81 7E 10 00 00 80 3F 75 0C D9]====]},{["name"]=[====[readyframe]====],["address"]=6846368,["original"]=[====[56 8B F1 8B 06]====],["length"]=5,["signature"]=[====[56 8B F1 8B 06 57 FF 50 14 8B 50 04 85 D2 74 10 8B 4A 04 85 C9 74 07 E8]====]},{["name"]=[====[weaponclip]====],["address"]=5006288,["original"]=[====[55 8B EC 83 EC 18]====],["length"]=6,["signature"]=[====[55 8B EC 83 EC 18 B8 00 00 80 3F 89 45 E8 89 45 EC 89 45 F0 89 45 F4 53]====]},{["name"]=[====[weaponreload]====],["address"]=5007056,["original"]=[====[55 8B EC 83 EC 08]====],["length"]=6,["signature"]=[====[55 8B EC 83 EC 08 53 56 8B F1 8B 46 08 8B 80 64 01 00 00 85 C0 57 8B 7D]====]},{["name"]=[====[damage]====],["address"]=6827072,["original"]=[====[55 8B EC 6A FF]====],["length"]=5,["signature"]=[====[55 8B EC 6A FF 68 BE 97 91 00 64 A1 00 00 00 00 50 64 89 25 00 00 00 00]====]},{["name"]=[====[visual]====],["address"]=7763494,["original"]=[====[E8 55 84 D0 FF]====],["length"]=5,["signature"]=[====[E8 55 84 D0 FF 85 FF 75 31 85 C0 75 2D 8B 85 EC 00 00 00 85 C0 0F 8E 85]====]},{["name"]=[====[ammo]====],["address"]=5014138,["original"]=[====[8B 46 14 48 4B 4A]====],["length"]=6,["signature"]=[====[8B 46 14 48 4B 4A 8B CA 85 C9 89 46 14 89 5E 30 89 56 38 7F 0F FF 46 34]====]},{["name"]=[====[terrainShroud]====],["address"]=7605456,["original"]=[====[A1 C8 AB A3 00]====],["length"]=5,["signature"]=[====[A1 C8 AB A3 00 85 C0 74 5D 8B 88 44 28 00 00 85 C9 74 53 8B 44 24 0C 83]====]},{["name"]=[====[radarShroud]====],["address"]=7847712,["original"]=[====[A1 C8 AB A3 00]====],["length"]=5,["signature"]=[====[A1 C8 AB A3 00 83 EC 20 85 C0 55 56 57 8B F9 74 08 8B B0 44 28 00 00 EB]====]},{["name"]=[====[clientShroud]====],["address"]=4903516,["original"]=[====[E8 FF AA 09 00]====],["length"]=5,["signature"]=[====[E8 FF AA 09 00 83 F8 03 7C 32 8B 96 B4 00 00 00 85 D2 74 25 F6 87 77 02]====]},{["name"]=[====[renderShroud]====],["address"]=7763260,["original"]=[====[E8 1F 08 DE FF]====],["length"]=5,["signature"]=[====[E8 1F 08 DE FF 83 F8 01 89 44 24 14 75 11 8B 15 EC BB A2 00 8B 42 3C 89]====]},{["name"]=[====[frame]====],["address"]=4877246,["original"]=[====[8B 0D EC BB A2 00]====],["length"]=6,["signature"]=[====[8B 0D EC BB A2 00 8B 69 3C 8B 0D F8 BB A2 00 8B 11 55 89 6C 24 18 FF 52]====]}},["asm"]=[====[withdraw_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+10],0
je withdraw_fail
cmp dword [STATE+C],0
jne withdraw_fail
mov eax,edi
sub eax,34
cmp eax,[STATE]
jne withdraw_fail

popad
popfd
mov eax,[edi+4]
sub eax,esi
cmp eax,7530
jae withdraw_done
mov eax,7530
withdraw_done:
pushfd
lock dec dword [STATE+30]
popfd
jmp 5008A1
withdraw_fail:
popad
popfd
jmp withdraw_original
withdraw_original:
mov eax, [edi+4]
sub eax, esi
pushfd
lock dec dword [STATE+30]
popfd
jmp 5008A1
build_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+18],0
je build_fail
cmp dword [STATE+C],0
jne build_fail
mov eax,[esp+28]
cmp eax,[STATE]
jne build_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret 4
build_fail:
popad
popfd
jmp build_original
build_original:
sub esp, 8
push ebx
push esi
pushfd
lock dec dword [STATE+30]
popfd
jmp 58C655
upgrade_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+18],0
je upgrade_fail
cmp dword [STATE+C],0
jne upgrade_fail
mov eax,[esp+28]
cmp eax,[STATE]
jne upgrade_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret 4
upgrade_fail:
popad
popfd
jmp upgrade_original
upgrade_original:
fld dword [ecx+14]
fmul dword [93BEE4]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AEC39
ratio_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je ratio_fail
cmp dword [STATE+C],0
jne ratio_fail
mov eax,ecx
sub eax,80
cmp eax,[STATE]
jne ratio_fail

popad
popfd
fld1
pushfd
lock dec dword [STATE+30]
popfd
ret
ratio_fail:
popad
popfd
jmp ratio_original
ratio_original:
push ecx
mov eax, [A2BBEC]
pushfd
lock dec dword [STATE+30]
popfd
jmp 576F26
power_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je power_fail
cmp dword [STATE+C],0
jne power_fail
mov eax,ecx
sub eax,80
cmp eax,[STATE]
jne power_fail

popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret
power_fail:
popad
popfd
jmp power_original
power_original:
mov eax, [A2BBEC]
pushfd
lock dec dword [STATE+30]
popfd
jmp 576F55
production_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je production_fail
cmp dword [STATE+C],0
jne production_fail
mov eax,ecx
sub eax,80
cmp eax,[STATE]
jne production_fail

popad
popfd
mov eax,3E8
pushfd
lock dec dword [STATE+30]
popfd
ret
production_fail:
popad
popfd
jmp production_original
production_original:
mov eax, [A2BBEC]
pushfd
lock dec dword [STATE+30]
popfd
jmp 576F05
brownout_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+14],0
je brownout_fail
cmp dword [STATE+C],0
jne brownout_fail
mov eax,ecx
cmp eax,[STATE]
jne brownout_fail

popad
popfd
mov byte [esp+4],0
jmp brownout_original
brownout_fail:
popad
popfd
jmp brownout_original
brownout_original:
mov al, byte [esp+4]
test al, al
pushfd
lock dec dword [STATE+30]
popfd
jmp 456826
ready_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je ready_fail
cmp dword [STATE+C],0
jne ready_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz ready_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne ready_fail
popad
popfd
mov eax,1
pushfd
lock dec dword [STATE+30]
popfd
ret
ready_fail:
popad
popfd
jmp ready_original
ready_original:
push ebx
push esi
mov esi, ecx
mov ecx, [esi-8]
pushfd
lock dec dword [STATE+30]
popfd
jmp 686DD7
percent_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je percent_fail
cmp dword [STATE+C],0
jne percent_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz percent_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne percent_fail
popad
popfd
fld1
pushfd
lock dec dword [STATE+30]
popfd
ret
percent_fail:
popad
popfd
jmp percent_original
percent_original:
sub esp, 8
push esi
mov esi, ecx
pushfd
lock dec dword [STATE+30]
popfd
jmp 686E56
readyframe_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je readyframe_fail
cmp dword [STATE+C],0
jne readyframe_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz readyframe_fail
mov edx,[esp+18]
cmp dword [edx+8],0
jne readyframe_fail
popad
popfd
mov eax,[A2BBEC]
mov eax,[eax+3C]
test eax,eax
jz readyframe_zero
dec eax
readyframe_zero:
pushfd
lock dec dword [STATE+30]
popfd
ret
readyframe_fail:
popad
popfd
jmp readyframe_original
readyframe_original:
push esi
mov esi, ecx
mov eax, [esi]
pushfd
lock dec dword [STATE+30]
popfd
jmp 6877A5
weaponclip_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je weaponclip_fail
cmp dword [STATE+C],0
jne weaponclip_fail
mov ecx,[esp+28]
call local_object
test eax,eax
jz weaponclip_fail
mov edx,[esp+18]
test edx,edx
jz weaponclip_fail
mov eax,[edx+C]
cmp eax,3
jae weaponclip_fail
lea ebx,[ecx+1D0]
cmp [ebx+eax*4+8],edx
jne weaponclip_fail
mov ebx,[ebx+4]
test ebx,ebx
jz weaponclip_fail
cmp byte [ebx+50],0
jne weaponclip_fail
cmp dword [ebx+eax*4+14],0
jne weaponclip_fail
mov edi,[edx+8]
test edi,edi
jz weaponclip_fail
cmp [ebx+eax*4+8],edi
jne weaponclip_fail
popad
popfd
cmp dword [ecx+10],3
jne weaponclip_done
cmp dword [ecx+14],0
je weaponclip_done
mov eax,[A2BBEC]
mov eax,[eax+3C]
cmp eax,2
jb weaponclip_zero
sub eax,2
jmp weaponclip_clamp
weaponclip_zero:
xor eax,eax
weaponclip_clamp:
cmp [ecx+18],eax
jbe weaponclip_done
mov [ecx+18],eax
weaponclip_done:
xor eax,eax
pushfd
lock dec dword [STATE+30]
popfd
ret 4
weaponclip_fail:
popad
popfd
jmp weaponclip_original
weaponclip_original:
push ebp
mov ebp, esp
sub esp, 18
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C63D6
weaponreload_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+20],0
je weaponreload_fail
cmp dword [STATE+C],0
jne weaponreload_fail
mov ecx,[esp+28]
call local_object
test eax,eax
jz weaponreload_fail
mov edx,[esp+18]
test edx,edx
jz weaponreload_fail
mov eax,[edx+C]
cmp eax,3
jae weaponreload_fail
lea ebx,[ecx+1D0]
cmp [ebx+eax*4+8],edx
jne weaponreload_fail
mov ebx,[ebx+4]
test ebx,ebx
jz weaponreload_fail
cmp byte [ebx+50],0
jne weaponreload_fail
cmp dword [ebx+eax*4+14],0
jne weaponreload_fail
mov edi,[edx+8]
test edi,edi
jz weaponreload_fail
cmp [ebx+eax*4+8],edi
jne weaponreload_fail
popad
popfd
mov dword [esp+C],1
jmp weaponreload_original
weaponreload_fail:
popad
popfd
jmp weaponreload_original
weaponreload_original:
push ebp
mov ebp, esp
sub esp, 8
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C66D6
damage_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+24],0
je damage_fail
cmp dword [STATE+C],0
jne damage_fail
mov ecx,[ecx-8]
call local_object
test eax,eax
jz damage_fail
mov edx,[esp+28]
test edx,edx
jz damage_keep_protection
cmp dword [edx+20],8
jne damage_keep_protection
mov eax,[ecx+64]
cmp [edx+8],eax
je damage_fail
damage_keep_protection:
mov edx,[STATE+44]
xor eax,eax
protect_find:
cmp eax,edx
jae damage_fail
lea ebx,[eax+edx]
shr ebx,1
lea edi,[STATE+2000+ebx*8]
cmp [edi],ecx
je protect_identity
jb protect_higher
mov edx,ebx
jmp protect_find
protect_higher:
lea eax,[ebx+1]
jmp protect_find
protect_identity:
mov ebx,[ecx+64]
cmp [edi+4],ebx
jne damage_fail
protect_found:
popad
popfd
mov eax,[esp+4]
test eax,eax
jz damage_return
mov dword [eax+48],0
mov dword [eax+4C],0
damage_return:
pushfd
lock dec dword [STATE+30]
popfd
ret 4
damage_fail:
popad
popfd
jmp damage_original
damage_original:
push ebp
mov ebp, esp
push -1
pushfd
lock dec dword [STATE+30]
popfd
jmp 682C45
visual_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+24],0
je visual_fail
cmp dword [STATE+C],0
jne visual_fail
mov ecx,[ebx+88]
call local_object
test eax,eax
jz visual_fail
mov edx,[STATE+44]
xor eax,eax
visual_find:
cmp eax,edx
jae visual_fail
lea ebx,[eax+edx]
shr ebx,1
lea edi,[STATE+2000+ebx*8]
cmp [edi],ecx
je visual_identity
jb visual_higher
mov edx,ebx
jmp visual_find
visual_higher:
lea eax,[ebx+1]
jmp visual_find
visual_identity:
mov ebx,[ecx+64]
cmp [edi+4],ebx
jne visual_fail
visual_found:
popad
popfd
call 46FA80
mov dword [esp+24],3E4CCCCD
mov dword [esp+28],3ECCCCCD
mov dword [esp+2C],3F000000
test edi,edi
jz visual_skip_edi
fld dword [esp+24]
fadd dword [edi+0]
fstp dword [esp+24]
fld dword [esp+28]
fadd dword [edi+4]
fstp dword [esp+28]
fld dword [esp+2C]
fadd dword [edi+8]
fstp dword [esp+2C]
visual_skip_edi:
test eax,eax
jz visual_skip_eax
fld dword [esp+24]
fadd dword [eax+0]
fstp dword [esp+24]
fld dword [esp+28]
fadd dword [eax+4]
fstp dword [esp+28]
fld dword [esp+2C]
fadd dword [eax+8]
fstp dword [esp+2C]
visual_skip_eax:
pushfd
lock dec dword [STATE+30]
popfd
jmp 7676B4
visual_fail:
popad
popfd
jmp visual_original
visual_original:
call 46FA80
pushfd
lock dec dword [STATE+30]
popfd
jmp 76762B
ammo_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
cmp dword [STATE+1C],0
je ammo_fail
cmp dword [STATE+C],0
jne ammo_fail
mov ecx,edi
call local_object
test eax,eax
jz ammo_fail
push A
call 543CD0
test al,al
jz ammo_fail
popad
popfd
mov eax,[esi+14]
dec ebx
dec edx
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C8280
ammo_fail:
popad
popfd
jmp ammo_original
ammo_original:
mov eax, [esi+14]
dec eax
dec ebx
dec edx
pushfd
lock dec dword [STATE+30]
popfd
jmp 4C8280
terrainShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
cmp dword [STATE+4C],0
je terrainShroud_done
cmp dword [STATE+C],0
jne terrainShroud_done
mov dword [esp+10],0
terrainShroud_done:
popfd
jmp terrainShroud_original
terrainShroud_original:
mov eax, [A3ABC8]
pushfd
lock dec dword [STATE+30]
popfd
jmp 740CD5
radarShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
cmp dword [STATE+4C],0
je radarShroud_done
cmp dword [STATE+C],0
jne radarShroud_done
mov dword [esp+10],0
radarShroud_done:
popfd
jmp radarShroud_original
radarShroud_original:
mov eax, [A3ABC8]
pushfd
lock dec dword [STATE+30]
popfd
jmp 77BF25
clientShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
call 547D60
pushfd
cmp dword [STATE+4C],0
je clientShroud_done
cmp dword [STATE+C],0
jne clientShroud_done
mov eax,1
clientShroud_done:
popfd
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AD261
clientShroud_original:
call 547D60
pushfd
lock dec dword [STATE+30]
popfd
jmp 4AD261
renderShroud_hook:
pushfd
lock inc dword [STATE+30]
popfd
call 547D60
pushfd
cmp dword [STATE+4C],0
je renderShroud_done
cmp dword [STATE+C],0
jne renderShroud_done
mov eax,1
renderShroud_done:
popfd
pushfd
lock dec dword [STATE+30]
popfd
jmp 767541
renderShroud_original:
call 547D60
pushfd
lock dec dword [STATE+30]
popfd
jmp 767541
rank_menu_contains:
pushad
mov ebp,[edx+C]
mov ebx,[STATE]
mov ebx,[ebx+4]
test ebx,ebx
jz rank_menu_no
mov esi,[ebx+94]
mov ecx,4
call rank_set_contains
test eax,eax
jnz rank_menu_yes
mov esi,[ebx+98]
mov ecx,F
call rank_set_contains
test eax,eax
jnz rank_menu_yes
mov esi,[ebx+9C]
mov ecx,4
call rank_set_contains
test eax,eax
jnz rank_menu_yes
rank_menu_no:
xor eax,eax
jmp rank_menu_return
rank_menu_yes:
mov eax,1
rank_menu_return:
mov [esp+1C],eax
popad
ret
rank_set_contains:
pushad
test esi,esi
jz rank_set_no
add esi,4
mov edi,[A2B6E0]
test edi,edi
jz rank_set_no
mov edi,[edi+2C]
mov ebx,1000
rank_set_find:
test edi,edi
jz rank_set_no
mov eax,[edi+C]
test eax,eax
jz rank_set_next
add eax,4
xor ecx,ecx
rank_set_name:
mov dl,[eax+ecx]
cmp dl,[esi+ecx]
jne rank_set_next
test dl,dl
jz rank_set_match
inc ecx
cmp ecx,100
jb rank_set_name
rank_set_next:
mov edi,[edi+58]
dec ebx
jnz rank_set_find
jmp rank_set_no
rank_set_match:
mov ebx,40
rank_set_override:
mov eax,[edi+4]
test eax,eax
jz rank_set_buttons
mov edi,eax
dec ebx
jnz rank_set_override
jmp rank_set_no
rank_set_buttons:
xor esi,esi
rank_button_loop:
cmp esi,[esp+18]
jae rank_set_no
mov eax,[edi+10+esi*4]
mov ecx,40
rank_button_override:
test eax,eax
jz rank_button_next
mov edx,[eax+4]
test edx,edx
jz rank_button_check
mov eax,edx
loop rank_button_override
jmp rank_set_no
rank_button_check:
test dword [eax+18],80000
jnz rank_button_next
mov edx,[eax+4C]
test edx,edx
jz rank_button_next
cmp edx,[eax+50]
je rank_button_next
cmp [edx],ebp
je rank_set_yes
rank_button_next:
inc esi
jmp rank_button_loop
rank_set_no:
xor eax,eax
jmp rank_set_return
rank_set_yes:
mov eax,1
rank_set_return:
mov [esp+1C],eax
popad
ret
reveal_update:
pushad
mov eax,[STATE+48]
or eax,[STATE+4C]
or eax,[STATE+50]
or eax,[STATE+54]
jz reveal_done
mov esi,[A2C150]
test esi,esi
jz reveal_done
mov edi,[esi+3C]
test edi,edi
jz reveal_done
cmp dword [esi+38],0
jle reveal_done
cmp esi,[STATE+58]
jne reveal_new_map
cmp edi,[STATE+5C]
je reveal_compare
reveal_new_map:
mov [STATE+58],esi
mov [STATE+5C],edi
mov dword [STATE+50],0
mov dword [STATE+54],0
reveal_compare:
mov eax,[STATE+48]
xor eax,[STATE+50]
mov edx,[STATE+4C]
xor edx,[STATE+54]
or eax,edx
jz reveal_done
mov eax,[STATE]
test eax,eax
jz reveal_done
mov ebx,[eax+24]
cmp ebx,10
jae reveal_done
mov ebp,esp
sub esp,220
and esp,-10
fxsave [esp]
mov eax,[STATE+48]
cmp eax,[STATE+50]
je reveal_refresh
push ebx
mov ecx,esi
test eax,eax
jz reveal_remove
call 53C360
mov dword [STATE+50],1
jmp reveal_refresh
reveal_remove:
call 53C3A0
mov dword [STATE+50],0
reveal_refresh:
mov ecx,esi
call 53C580
mov eax,[STATE+4C]
mov [STATE+54],eax
fxrstor [esp]
mov esp,ebp
reveal_done:
popad
ret
frame_hook:
pushfd
lock inc dword [STATE+30]
popfd
pushfd
pushad
mov ebp,[A2BBEC]
test ebp,ebp
jz session_expired
cmp ebp,[STATE+4]
jne session_expired
mov eax,[ebp+3C]
cmp eax,[STATE+8]
jb session_expired
mov [STATE+8],eax
mov eax,[A2B688]
test eax,eax
jz session_expired
mov eax,[eax+C]
cmp eax,[STATE]
jne session_expired
mov eax,[ebp+94]
cmp eax,0
je frame_session_ok
cmp eax,2
jne session_expired
frame_session_ok:
cmp dword [STATE+C],0
jne frame_exit
mov eax,[STATE+14]
cmp eax,[STATE+38]
je power_refreshed
mov [STATE+38],eax
mov ecx,[STATE]
test eax,eax
jz power_native_state
xor edx,edx
jmp power_refresh_state
power_native_state:
mov edx,1
mov eax,[ebp+3C]
cmp eax,[ecx+8C]
jb power_refresh_state
xor edx,edx
mov eax,[ecx+84]
cmp eax,[ecx+88]
setl dl
power_refresh_state:
push edx
call 456820
power_refreshed:
cmp dword [STATE+3C],0
je rank_done
mov eax,[A2B97C]
test eax,eax
jz rank_done
mov edx,[eax+C]
sub edx,[eax+8]
sar edx,2
cmp edx,1
jl rank_done
cmp edx,20
jg rank_done
mov ecx,[STATE]
cmp [ecx+188],edx
jge rank_points
push dword [ebp+98]
mov [ebp+98],edx
push edx
call 4556C0
pop eax
mov [ebp+98],eax
rank_points:
mov eax,[A2B978]
test eax,eax
jz rank_done
mov esi,[eax+8]
mov edi,[eax+C]
mov eax,edi
sub eax,esi
cmp eax,10000
ja rank_done
xor ebx,ebx
rank_science_loop:
cmp esi,edi
jae rank_science_end
mov edx,[esi]
mov ecx,40
rank_override:
test edx,edx
jz rank_science_next
mov eax,[edx+4]
test eax,eax
jz rank_science_info
mov edx,eax
loop rank_override
jmp rank_done
rank_science_info:
cmp dword [edx+30],0
jle rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 455830
pop edx
test al,al
jnz rank_science_next
push edx
push dword [edx+C]
push dword [STATE]
mov ecx,[A2B978]
call 488DC0
pop edx
test al,al
jz rank_science_next
call rank_menu_contains
test eax,eax
jz rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 4558B0
pop edx
test al,al
jnz rank_science_next
push edx
push dword [edx+C]
mov ecx,[STATE]
call 455930
pop edx
test al,al
jnz rank_science_next
add ebx,[edx+30]
jo rank_done
rank_science_next:
add esi,4
jmp rank_science_loop
rank_science_end:
mov eax,[STATE]
cmp [eax+190],ebx
je rank_complete
mov [eax+190],ebx
mov ecx,[A2B6E0]
test ecx,ecx
jz rank_complete
push eax
call 45EB90
rank_complete:
mov dword [STATE+3C],0
rank_done:
call reveal_update
mov eax,[STATE+28]
cmp dword [STATE+2C],0
je promotion_done
mov eax,[A2C088]
test eax,eax
jz promotion_done
mov edi,[eax+18]
test edi,edi
jz promotion_done
mov esi,[edi]
mov ebx,10000
promotion_loop:
test esi,esi
jz promotion_done
cmp esi,edi
je promotion_done
dec ebx
jz promotion_done
mov eax,[esi+8]
test eax,eax
jz promotion_next
mov ecx,[eax+88]
test ecx,ecx
jz promotion_next
cmp [ecx+70],eax
jne promotion_next
call local_object
test eax,eax
jz promotion_next
mov ecx,[ecx+18C]
test ecx,ecx
jz promotion_next
cmp dword [ecx+C],3
jge promotion_next
push ecx
call 61B7D0
pop ecx
test al,al
jz promotion_next
push 1
push 3
call 61B860
promotion_next:
mov esi,[esi]
jmp promotion_loop
promotion_done:
mov dword [STATE+2C],0
cmp dword [STATE+28],0
je frame_exit
mov esi,[ebp+6C]
mov edi,10000
object_loop:
test esi,esi
jz object_done
dec edi
jz object_done
mov ecx,esi
call local_object
test eax,eax
jz object_next
mov ecx,esi
push 11
call 543CD0
test al,al
jz object_next
test byte [esi+200],20
jnz object_next
mov ecx,esi
push 4
call 549B10
mov ecx,esi
push 5
call 549AB0
object_next:
mov esi,[esi+78]
jmp object_loop
object_done:
mov dword [STATE+28],0
jmp frame_exit
session_expired:
mov dword [STATE+3C],0
mov dword [STATE+C],1
mov dword [STATE+28],0
mov dword [STATE+2C],0
frame_exit:
popad
popfd
jmp frame_original
frame_original:
mov ecx, [A2BBEC]
pushfd
lock dec dword [STATE+30]
popfd
jmp 4A6BC4
local_object:
xor eax,eax
test ecx,ecx
jz local_return
push edx
mov edx,[ecx+1B0]
test edx,edx
jz local_pop
mov edx,[edx+8]
test edx,edx
jz local_pop
mov edx,[edx+C]
cmp edx,[STATE]
jne local_pop
mov eax,1
local_pop:
pop edx
local_return:
ret]====],["gentool"]={["md5"]=[====[8a88058ccb6d2512df70b4c1c80e1317]====],["imageSize"]=9654272,["address"]=1598577,["original"]=[====[80 F1 AA 3A D9 74 04 C6 46 44 01]====],["latch"]=2404716,["checks"]={{["address"]=1598931,["original"]=[====[80 7E 44 00 74 06]====]},{["address"]=1598823,["original"]=[====[68 00 00 00 FF 6A 01]====]}},["asm"]=[====[gentool_hook:
pushfd
lock inc dword [STATE+30]
popfd
xor cl, AA
cmp bl, cl
je gentool_done
pushfd
push eax
mov eax, [A2BBEC]
test eax, eax
je gentool_original
mov eax, [eax+94]
cmp eax, 0
je gentool_offline
cmp eax, 2
je gentool_offline
cmp eax, 4
je gentool_offline
cmp eax, 6
je gentool_offline
gentool_original:
pop eax
popfd
mov byte [esi+44], 1
jmp gentool_done
gentool_offline:
pop eax
popfd
mov byte [esi+44], 0
gentool_done:
pushfd
lock dec dword [STATE+30]
popfd
jmp GTRETURN
]====]},["key"]=[====[p]====],["main"]=300,["ids"]={301,302,303,304,305,306,307,308,309,310,311},["options"]={["money"]=301,["power"]=302,["build"]=303,["ammo"]=304,["cooldown"]=305,["junk"]=306,["protect"]=307,["rank"]=308,["promote"]=309,["full"]=310,["visual"]=311}}}
local fields={money=16,power=20,build=24,ammo=28,cooldown=32,protect=36,junk=40,promote=44,rank=60,full=72,visual=76}
local al=getAddressList()
local function rec(id) return al.getMemoryRecordByID(id) end
local function message(s)
  T.lastError=tostring(s)
  if not T.closing then
    local plain=tostring(s)
    if plain:match(':%d+:') or plain:match('^%[string') then plain='Cheat Engine could not complete the action. Use Clear All before retrying; the technical details are retained in KZGenerals.lastError.' end
    showMessage(plain)
  end
end
local function bytes(a,n) return readBytes(a,n,true) end
local function equal(a,b)
  if not a or not b or #a~=#b then return false end
  for i=1,#a do if a[i]~=b[i] then return false end end
  return true
end
local function fromhex(s) local r={} for b in s:gmatch('%x%x') do r[#r+1]=tonumber(b,16) end return r end
local function write(a,v)
  if not writeInteger(a,v) or readInteger(a)~=v then error('A game-memory write did not complete. Use Clear All before retrying.',0) end
end
local function attached(a) return a and getOpenedProcessID()==a.pid and (not a.state or readInteger(a.state+52)==0x4b5a474e) end
local function alive(a)
  local p=getProcesslist() or {}
  return p[a.pid]~=nil
end
local function matchNow(c)
  local logic=readInteger(c.logic);local plist=readInteger(c.playerlist)
  if not logic or logic==0 or not plist or plist==0 then return end
  local player=readInteger(plist+12);local frame=readInteger(logic+0x3c);local mode=readInteger(logic+c.mode)
  if player and player~=0 and frame and frame&gt;0 and (mode==0 or mode==2) then
    return {logic=logic,playerlist=plist,player=player,frame=frame}
  end
end
local function session(a)
  if not a.player or a.player==0 or not attached(a) or not alive(a) then return false end
  if readInteger(a.c.logic)~=a.logic or readInteger(a.c.playerlist)~=a.playerlist then return false end
  if readInteger(a.playerlist+12)~=a.player then return false end
  local mode=readInteger(a.logic+a.c.mode)
  local frame=readInteger(a.logic+0x3c)
  return (mode==0 or mode==2) and frame and frame&gt;=a.frame and readInteger(a.state+12)==0
end
local function transaction(a,f)
  if not attached(a) or not alive(a) then error('The game attachment changed. Return to the original game before clearing its cheats.',0) end
  for attempt=1,(T.closing and 1 or 30) do
    pause()
    if not a.state or readInteger(a.state+48)==0 then
      local ok,result=pcall(f)
      unpause()
      if not ok then error(result,0) end
      return result
    end
    unpause();if not T.closing then sleep(10) end
  end
  error('The game is finishing a cheat action. Resume the match, then try again.',0)
end
local function setPower(a,on,cleanup)
  if not session(a) then return true end
  local desired=on and 1 or 0
  if readInteger(a.state+20)~=desired then transaction(a,function()
    if on and a.c.powerBonus then
      local supply=readInteger(a.player+a.c.energy+4)
      if not supply or supply&lt;0 or supply&gt;2147483647-a.c.powerBonus then error('The power supply is outside the supported range.',0) end
    end
    write(a.state+20,desired)
  end) end
  if not cleanup then return true end
  if T.closing and readInteger(a.state+56)~=desired then sleep(150) end
  return not session(a) or (readInteger(a.state+56)==desired and readInteger(a.state+48)==0)
end
local function setReveal(a,key,on,cleanup)
  if not session(a) then return true end
  local request=fields[key]
  local applied=key=='full' and 80 or 84
  local desired=on and 1 or 0
  if readInteger(a.state+request)~=desired then
    transaction(a,function() write(a.state+request,desired) end)
  end
  -- Simulation-frame acknowledgement is only required before removing the hooks.
  if not cleanup then return true end
  if T.closing and readInteger(a.state+applied)~=desired then sleep(150) end
  return not session(a) or (readInteger(a.state+applied)==desired and readInteger(a.state+48)==0)
end
local function undoMoney(a)
  if not a.moneyApplied then return end
  if session(a) then
    local addr=a.player+a.c.money+4
    local balance=readInteger(addr)
    if not balance then error('The money balance is unavailable. Resume the match and use Clear All.',0) end
    write(a.state+16,0)
    write(addr,math.max(0,balance-30000))
  end
  a.moneyApplied=false
end
local function quietRows()
  T.syncing=true
  for _,c in ipairs(configs) do
    for _,id in ipairs(c.ids) do rec(id).Active=false end
    rec(c.main).Active=false
  end
  T.syncing=false
end
local function clearGenToolBlack(a)
  if not a.gentool then return end
  local logic=readInteger(a.c.logic)
  local mode=logic and logic~=0 and readInteger(logic+a.c.mode)
  if mode==0 or mode==2 or mode==4 or mode==6 then
    local address=a.gentool.base+a.c.gentool.latch
    if not writeBytes(address,0) or not equal(bytes(address,1),{0}) then error('GenTool could not refresh the picture. Keep this table open and retry Clear All.',0) end
  end
end
function T.clear()
  local a=T.active
  if not a then quietRows();return true end
  if not alive(a) then
    unregisterSymbol('KZGeneralsMem');T.active=nil;quietRows();return true
  end
  local ok,why=pcall(function()
    transaction(a,function()
      undoMoney(a)
      for _,offset in pairs(fields) do write(a.state+offset,0) end
      a.wanted={}
    end)
    local powerDone=setPower(a,false,true)
    local fullDone=setReveal(a,'full',false,true)
    local visualDone=setReveal(a,'visual',false,true)
    if not powerDone or not fullDone or not visualDone then a.pendingClear=true;return false end
    transaction(a,function()
      for _,p in ipairs(a.patches) do
        local current=bytes(p.address,#p.patch)
        if not equal(current,p.patch) and not equal(current,fromhex(p.original)) then error('Another tool changed a cheat hook. Restore that tool’s patch, then use Clear All again.',0) end
      end
      undoMoney(a)
      for _,offset in pairs(fields) do write(a.state+offset,0) end
      for _,p in ipairs(a.patches) do
        if not autoAssemble(string.format('%X:\ndb %s',p.address,p.original)) then error('The original instructions could not be restored. Keep this table open and retry Clear All.',0) end
        if not equal(bytes(p.address,#p.patch),fromhex(p.original)) then error('A restored hook failed its read-back check.',0) end
      end
      clearGenToolBlack(a)
      if not deAlloc(a.state) then error('The cheat allocation could not be released.',0) end
      unregisterSymbol('KZGeneralsMem')
    end)
  end)
  if not ok then T.lastError=why;message(why);return false end
  if why==false then quietRows();return true end
  T.active=nil;quietRows();return true
end
local function identify(pid,name)
  for _,m in ipairs(enumModules(pid) or {}) do
    local leaf=(m.PathToFile or ''):match('([^\\/]+)$') or ''
    if leaf:lower()==name:lower() then
      local digest=md5file(m.PathToFile)
      for _,c in ipairs(configs) do
        if digest and digest:lower()==c.md5 then
          local _,v=getFileVersion(m.PathToFile)
          return {pid=pid,process=name,path=m.PathToFile,c=c,fileVersion=v,base=m.Address}
        end
      end
    end
  end
end
local function detect()
  if T.closing or T.active then return end
  local found={};local unsupported=false
  local processes=getProcesslist() or {}
  for pid in pairs(T.cache) do if not processes[pid] then T.cache[pid]=nil end end
  for pid,name in pairs(processes) do
    local leaf=name:match('([^\\/]+)$') or name
    if leaf:lower()=='game.dat' or leaf:lower()=='generals.exe' or leaf:lower()=='modded.exe' then
      local ok,s=true,T.cache[pid]
      if s==nil then ok,s=pcall(identify,pid,leaf);if ok then T.cache[pid]=s or false end end
      if ok and s then found[#found+1]=s end
      if not s and leaf:lower()~='generals.exe' then unsupported=true end
    end
  end
  T.selection=nil
  local description
  if #found==1 then
    local s=found[1]
    if getOpenedProcessID()~=s.pid then openProcess(s.pid) end
    if getOpenedProcessID()==s.pid then T.selection=s end
    description='Auto-Attach and Version Check — '..s.c.title..' ('..s.c.build..')'
  elseif #found&gt;1 then description='Auto-Attach and Version Check — both games running; close one'
  elseif unsupported then description='Auto-Attach and Version Check — wrong game version; unsupported executable'
  else description='Auto-Attach and Version Check — waiting for a supported game' end
  local row=rec(1)
  if row.Description~=description then row.Description=description end
end
local function genToolHooks(a)
  a.hooks={}
  for _,p in ipairs(a.c.hooks) do a.hooks[#a.hooks+1]=p end
  local gt=a.c.gentool
  if not gt then return end
  for _,m in ipairs(enumModules(a.pid) or {}) do
    local path=m.PathToFile or ''
    if (path:match('([^\\/]+)$') or ''):lower()=='d3d8.dll' then
      local digest=md5file(path)
      if digest and digest:lower()==gt.md5 then
        local base=m.Address
        local pe=base+readInteger(base+0x3c)
        if not equal(bytes(base,2),{0x4d,0x5a}) or readInteger(pe+0x50)~=gt.imageSize then error('The loaded GenTool image differs from the supported version. MAIN remains off.',0) end
        for _,check in ipairs(gt.checks) do
          local original=fromhex(check.original)
          if not equal(bytes(base+check.address,#original),original) then error('GenTool instructions were changed by another tool. MAIN remains off.',0) end
        end
        a.gentool={base=base}
        a.hooks[#a.hooks+1]={name='gentool',address=base+gt.address,length=#fromhex(gt.original),original=gt.original}
      else
        local _,version=getFileVersion(path)
        if version and ((version.ProductName or ''):lower():find('gentool',1,true) or (version.FileDescription or ''):lower():find('gentool',1,true)) then
          error('This GenTool version is not supported. Use GenTool 8.9 with the GenPatcher MAIN.',0)
        end
      end
    end
  end
end
function T.enableMain(c)
  if T.active then message('Use Clear All before enabling another MAIN.');return false end
  detect()
  local s=T.selection
  if not s then message('No supported game executable was found. Start one supported game. A different executable build needs its own verified targets.');return false end
  if s.c.key~=c.key then message('The running game is '..s.c.title..' ('..s.c.build..'). Enable its matching MAIN.');return false end
  local verified=identify(s.pid,'Game.dat')
  if not verified or verified.c.key~=c.key then message('The executable changed or is a different game version. MAIN remains off.');return false end
  if s.base~=0x400000 then message('This executable loaded at an unsupported address.');return false end
  local a={pid=s.pid,c=c,patches={},wanted={}}
  local ok,why=pcall(function()
    genToolHooks(a)
    transaction(a,function()
      local current=matchNow(c)
      a.logic=current and current.logic or 0;a.playerlist=current and current.playerlist or 0
      a.player=current and current.player or 0;a.frame=current and current.frame or 0
      for _,check in ipairs(c.rankChecks) do
        if not equal(bytes(check.address,24),fromhex(check.original)) then error('The game promotion instructions differ. Turn off other modifications before enabling MAIN.',0) end
      end
      if c.powerRefresh and not equal(bytes(c.powerRefresh,24),fromhex(c.powerRefreshOriginal)) then error('The game power-update instructions differ. Turn off other modifications before enabling MAIN.',0) end
      for _,p in ipairs(c.revealChecks) do
        if not equal(bytes(p.address,24),fromhex(p.original)) then error('The game visibility routines differ. Turn off other modifications before enabling MAIN.',0) end
      end
      for _,p in ipairs(a.hooks) do
        if not equal(bytes(p.address,p.length),fromhex(p.original)) then error('The game instructions differ, or another table changed them. Turn off other tables and retry.',0) end
      end
      local allocated=allocateMemory(16384)
      if not allocated or allocated==0 or allocated&gt;0xffffffff then error('Cheat Engine could not allocate a valid 32-bit cheat workspace.',0) end
      registerSymbol('KZGeneralsMem',allocated,true)
      write(allocated+52,0x4b5a474e)
      a.state=allocated
      write(a.state,a.player);write(a.state+4,a.logic);write(a.state+8,a.frame)
      write(a.state+12,a.player==0 and 1 or 0)
      local script={'define(STATE,KZGeneralsMem)'}
      for _,p in ipairs(c.hooks) do script[#script+1]='aobscanmodule(KZ_'..p.name..','..s.process..','..p.signature..')' end
      if a.gentool then
        local p=a.hooks[#a.hooks]
        script[#script+1]=string.format('define(KZ_gentool,%X)\ndefine(GTRETURN,%X)',p.address,p.address+p.length)
        for label in c.gentool.asm:gmatch('([%w_]+):') do script[#script+1]='label('..label..')' end
        script[#script+1]='KZGeneralsMem+800:\n'..c.gentool.asm
      end
      for label in c.asm:gmatch('([%w_]+):') do script[#script+1]='label('..label..')' end
      script[#script+1]='KZGeneralsMem+1000:'
      script[#script+1]=c.asm
      for _,p in ipairs(a.hooks) do
        script[#script+1]=string.format('assert(KZ_%s,%s)\nKZ_%s:\njmp %s_hook\n%s',p.name,p.original,p.name,p.name,p.length&gt;5 and ('nop '..string.format('%X',p.length-5)) or '')
      end
      local installed,details=autoAssemble(table.concat(script,'\n'))
      if not installed then T.technicalError=details;error('Cheat Engine could not assemble this build’s hooks. MAIN remains off.',0) end
      for _,p in ipairs(a.hooks) do
        local patch=bytes(p.address,p.length)
        if not patch or patch[1]~=0xe9 then error('A cheat hook failed its read-back check.',0) end
        a.patches[#a.patches+1]={address=p.address,original=p.original,patch=patch}
      end
      clearGenToolBlack(a)
    end)
  end)
  if not ok then
    if a.state then
      local rolled=pcall(function() transaction(a,function()
        for _,p in ipairs(a.hooks) do
          local now=bytes(p.address,p.length)
          if now and now[1]==0xe9 then
            local d=readInteger(p.address+1)
            if d and d&gt;=0x80000000 then d=d-0x100000000 end
            local target=d and p.address+5+d
            if target and target&gt;=a.state and target&lt;a.state+16384 then
              if not autoAssemble(string.format('%X:\ndb %s',p.address,p.original)) then error('rollback') end
            elseif not equal(now,fromhex(p.original)) then error('foreign patch') end
          elseif not equal(now,fromhex(p.original)) then error('foreign patch') end
        end
        clearGenToolBlack(a)
        if not deAlloc(a.state) then error('allocation cleanup') end
        unregisterSymbol('KZGeneralsMem')
      end) end)
      if not rolled then T.active=a end
    end
    T.lastError=why;message(why);return false
  end
  T.active=a;return true
end
local function captureProtection(a)
  local ui=readInteger(a.c.selection)
  local head=ui and ui~=0 and readInteger(ui+0x18)
  local node=head and head~=0 and readInteger(head)
  local targets={};local seen={}
  while node and node~=0 and node~=head do
    if seen[node] or #targets&gt;=1024 then error('The selected group is too large or unavailable. Select a smaller group and retry.',0) end
    seen[node]=true
    local draw=readInteger(node+8)
    local obj=draw and draw~=0 and readInteger(draw+0x88)
    if obj and obj~=0 and readInteger(obj+0x70)==draw then
      local team=readInteger(obj+a.c.team)
      local template=team and team~=0 and readInteger(team+8)
      local owner=template and template~=0 and readInteger(template+12)
      local id=readInteger(obj+0x64)
      if owner==a.player and id and id~=0 then targets[#targets+1]={obj,id} end
    end
    node=readInteger(node)
  end
  if #targets==0 then error('Select units or buildings you own in a live match, then enable Invulnerability.',0) end
  table.sort(targets,function(left,right) return left[1]&lt;right[1] end)
  write(a.state+36,0);write(a.state+68,0)
  for i,target in ipairs(targets) do
    local address=a.state+0x2000+(i-1)*8
    write(address,target[1]);write(address+4,target[2])
  end
  write(a.state+68,#targets)
end
function T.toggle(key,on)
  if T.syncing then return true end
  local a=T.active
  if not a then if on then message('Enable the matching MAIN first.');return false end return true end
  if a.pendingClear then
    if on then message('Cleanup is waiting for the match to resume. Resume the game before enabling cheats.');return false end
    return true
  end
  if on and (key=='full' or key=='visual') then
    local other=key=='full' and 'visual' or 'full'
    if a.wanted[other] or readInteger(a.state+fields[other])==1 then
      if not T.toggle(other,false) then return false end
      T.syncing=true;rec(a.c.options[other]).Active=false;T.syncing=false
    end
  end
  if not session(a) then
    if key=='protect' and on then message('Select units or buildings you own in a live match, then enable Invulnerability.');return false end
    a.wanted[key]=on;return true
  end
  local ok,why=pcall(function()
    if key=='full' or key=='visual' then setReveal(a,key,on);return end
    if key=='power' and a.c.powerRefresh then setPower(a,on);return end
    if key=='promote' then
      -- Only publish a request; the game thread owns the selection walk and grant.
      -- An aligned DWORD does not require suspending every game/GenTool thread.
      if not attached(a) then error('The game attachment changed. Use Clear All before retrying.',0) end
      local address=a.state+fields.promote
      local desired=on and 1 or 0
      if not writeInteger(address,desired) then error('The promotion request could not be sent. Retry the option.',0) end
      local current=readInteger(address)
      -- A fast game update can consume On before this readback.
      if current~=0 and current~=desired then error('The promotion request could not be checked. Use Clear All before retrying.',0) end
      return
    end
    transaction(a,function()
      if on and not session(a) then error('The match changed. Use Clear All, then enable MAIN again.',0) end
      if key=='protect' then
        if on then captureProtection(a) else write(a.state+68,0) end
      end
      if key=='money' then
        if on and not a.moneyApplied then
          local addr=a.player+a.c.money+4;local value=readInteger(addr)
          if not value or value&lt;0 or value&gt;2000000000 then error('The money balance is outside the supported range.',0) end
          write(addr,value+30000);a.moneyApplied=true
        elseif not on then undoMoney(a) end
      end
      write(a.state+fields[key],on and 1 or 0)
    end)
  end)
  if not ok then T.lastError=why;message(why);return false end
  a.wanted[key]=on
  return true
end
local function resumeMatch(a)
  a.wanted.protect=false
  T.syncing=true;rec(a.c.options.protect).Active=false;T.syncing=false
  local current=matchNow(a.c)
  if not current then a.candidate=nil;return end
  local last=a.candidate
  a.candidate=current
  if not last or current.logic~=last.logic or current.playerlist~=last.playerlist or current.player~=last.player or current.frame&lt;last.frame then return end
  transaction(a,function()
    local now=matchNow(a.c)
    if not now or now.logic~=current.logic or now.playerlist~=current.playerlist or now.player~=current.player or now.frame&lt;current.frame then return end
    write(a.state+12,1)
    for _,offset in pairs(fields) do write(a.state+offset,0) end
    write(a.state+56,0);write(a.state+68,0)
    for _,offset in ipairs({80,84,88,92}) do write(a.state+offset,0) end
    a.logic=now.logic;a.playerlist=now.playerlist;a.player=now.player;a.frame=now.frame;a.moneyApplied=false
    write(a.state,a.player);write(a.state+4,a.logic);write(a.state+8,a.frame)
    write(a.state+12,0)
  end)
  if session(a) then
    a.candidate=nil
    for key,on in pairs(a.wanted) do
      if on and not T.toggle(key,true) then error(T.lastError,0) end
    end
  end
end
for _,c in ipairs(configs) do
  local main=rec(c.main)
  main.OnActivate=function(_,before) if not before or T.syncing then return true end return T.enableMain(c) end
  main.OnDeactivate=function(_,before) if not before or T.syncing then return true end return T.clear() end
  for key,id in pairs(c.options) do
    local r=rec(id)
    r.OnActivate=function(_,before)
      if not before or T.syncing then return true end
      if T.active and T.active.c.key~=c.key then message('Enable the MAIN for the running game.');return false end
      return T.toggle(key,true)
    end
    r.OnDeactivate=function(_,before) if not before or T.syncing then return true end return T.toggle(key,false) end
  end
end
rec(2).OnActivate=function(_,before) if before then shellExecute('https://ko-fi.com/katzy');return false end return true end
rec(3).OnActivate=function(_,before) if before then showMessage([====[How to use - Katzy
Table identification: Katzy.

Allow the table's Lua when opening it. Start a supported game. The separate Zero Hour (GenPatcher) MAIN is for the verified GenPatcher 1.04 executable; the other sections are for the original Steam executables. Use cheats only in single-player. The GenPatcher MAIN supports GenTool 8.9 in single-player and the menu, preventing its black-screen response while MAIN is enabled. LAN, online games and replays are excluded. Clear All restores GenTool's original behavior. Other GenTool versions are not supported. You can enable MAIN and arm options in the main menu; they apply when a single-player mission or skirmish starts. The first row identifies the detected game and build. Enable its matching MAIN, then the individual options. MAIN does not enable child options.

Enabled ongoing options remain checked between maps and automatically resume in the next match. One-shot options still untick after running; when armed in the menu they run once in the next match. Use Clear All before switching games, detaching, or replacing the table. Do not save with Infinite Money or Infinite Power enabled: saves can include their temporary bonuses. Use one table at a time.

Infinite Money: adds a temporary 30,000 allowance to your balance. Earnings increase it; purchases spend the surplus down to the allowance. Disabling removes only the allowance and retains unspent earnings.

Infinite Power: in Generals, adds 1,000 temporary power supply. Zero Hour overrides power availability and prevents power-shortage events from disabling your buildings or radar, without changing stored production or demand. Both refresh buildings and radar on the next game update; changes made while paused wait for play to resume. Disabling restores the current natural power state, including Zero Hour sabotage, and preserves normal production changes.

Instant Build: makes newly calculated unit and building build times one simulation frame. Placement, doors, prerequisites, and costs still apply. In both games, paid upgrade research also completes on its next production update.

Infinite Aircraft Ammo: prevents ordinary shots from consuming your aircraft's clip ammo. Fire rate and damage stay unchanged. Empty aircraft need a normal reload first. Disabling resumes consumption.

Instant Superweapons, Support Powers and Unit Abilities: bypasses recharge for your superweapons, support powers and unit special abilities, including Capture Building, regardless of selection. Also removes independent clip reloads for manual-only weapon abilities such as vehicle sniping and rocket pods. Required research, science unlocks, power, valid targets, range, preparation and active animations still apply; capturing a building still takes its normal action time. Ordinary gunfire, delays between shots and weapons sharing their reload with other weapons are unchanged. Disabling restores normal recharge checks and future weapon reloads; reloads already completed stay complete.

Invulnerability - Selected Units and Buildings: select a group you own in a live match, then enable. That captured group stays protected after deselection; selecting other objects does not move protection. Untick or use Clear All to remove protection. Toggle off and on with a new selection to change targets. A map change clears this option and its targets. Deliberate self-destruction is allowed and consumes the unit. Scripted removal and custom body types are excluded; healing remains available. Protected targets show a steady blue-white highlight in both games; normal status coloring and selection flashes remain. The highlight ends with protection. This selection-based option requires a live match.

Reveal Map - Full: grants full gameplay sight to your player using the native reveal system. Can trigger discoveries and mission events; turning it off cannot undo discoveries or events already triggered. Disabling removes only this option’s reveal layer.

Reveal Map - Visual Only: shows terrain and objects without granting gameplay sight. Scouting, targeting, cloaking and radar detection remain normal. Recommended for campaigns.
Use only one Reveal Map mode at a time. Switching modes turns the previous mode off. Both can be armed in the main menu and resume on the next map. Changes made while paused wait for play to resume. Clear All and MAIN off retain only the cleanup needed until the game refreshes visibility. Turn reveal off before saving/loading.

GLA - Maximum Junk Upgrade (One Shot): gives every currently owned weapon-salvaging vehicle its maximum native junk weapon upgrade without collecting scrap. Includes eligible captured vehicles. It unticks after the next simulation update. Upgrades remain; toggle again for new units. Does not grant veterancy or unrelated research.

Maximum General Rank and Power Points (One Shot): grants the highest General rank and adds enough unspent General points to purchase all remaining powers eligible for your faction or general, using the game’s science costs and faction prerequisites. Purchased powers remain; unspent points are set to the cost of the remaining available powers. It unticks after running; the grant remains until the game resets it. Can be queued in the main menu. Mission purchase restrictions still apply.

Promote Selected Units - Maximum Veterancy (One Shot): grants maximum native veterancy to currently selected, owned, trainable units that are below maximum rank. It unticks after the next simulation update. Promotion remains after disabling MAIN.

Clear All: turns off temporary cheats and removes the hooks. One-shot grants remain. MAIN off performs the same cleanup.
Fuel the Cheats: opens Katzy's Ko-fi page only when you deliberately toggle it.
]====]);return false end return true end
rec(4).OnActivate=function(_,before) if before then T.clear();return false end return true end
local timer=createTimer(nil,false)
T.timer=timer;timer.Interval=1500
timer.OnTimer=function()
  if T.closing then return end
  local a=T.active
  if not a then detect();return end
  if not alive(a) then T.clear();return end
  if not attached(a) then return end
  if a.pendingClear then T.clear();return end
  if not session(a) then
    local ok,why=pcall(resumeMatch,a)
    if not ok and not a.reportedResumeError then a.reportedResumeError=true;message(why) end
    return
  end
  a.reportedResumeError=nil
  for _,key in ipairs({'junk','promote','rank'}) do
    local r=rec(a.c.options[key])
    if r.Active and readInteger(a.state+fields[key])==0 then a.wanted[key]=false;T.syncing=true;r.Active=false;T.syncing=false end
  end
end
function T.shutdown()
  T.closing=true
  local ok=T.clear()
  if not ok or T.active then T.closing=false;return false end
  if T.timer then T.timer.destroy();T.timer=nil end
  if T.closeHandler and getMainForm().OnClose==T.closeHandler then getMainForm().OnClose=T.previousClose end
  T.closeHandler=nil
  return true
end
-- Run before CE's native FormClose tears down its process/debugger services.
-- registerCloseCallback runs after that handler, which is too late for restoration.
T.previousClose=getMainForm().OnClose
T.closeHandler=function(sender,closeAction)
  T.closing=true
  if T.timer then T.timer.Enabled=false end
  local ok,result=pcall(T.clear)
  if not ok then T.lastError=tostring(result) end
  if T.previousClose then
    local nativeOK,nativeAction=pcall(T.previousClose,sender,closeAction)
    if nativeOK and nativeAction~=nil then return nativeAction end
    if not nativeOK then T.lastError=tostring(nativeAction) end
  end
  return closeAction
end
getMainForm().OnClose=T.closeHandler

timer.Enabled=true
detect()
</LuaScript>
</CheatTable>