<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="52">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"THE KING OF FIGHTERS 2002 UNLIMITED MATCH"</Description>
      <Options moHideChildren="1" moActivateChildrenAsWell="1" moDeactivateChildrenAsWell="1"/>
      <Color>C08000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if not syntaxcheck then
  function deactivateIn(header, desc)
    local al = getAddressList()
    local parent = al.getMemoryRecordByDescription(header)
    if not parent then return end
    for i = 0, parent.Count - 1 do
      if parent[i].Description == desc then
        parent[i].Active = false
        break
      end
    end
  end

  function unlockAch(mr, id)
    local fn = getAddressSafe("KingOfFighters2002UM_x64.exe+582EB0")
    if fn then executeCode(fn, id) end
    if not mr then return end
    local t = createTimer(nil)
    t.Interval = 150
    t.OnTimer = function(tm)
      tm.destroy()
      mr.Active = false
    end
  end
end
{$asm}

aobscanmodule(One,KingOfFighters2002UM_x64.exe,0F B7 3D D1 FC FE 03)
aobscanmodule(Two,KingOfFighters2002UM_x64.exe,0F B7 3D 9E FD FE 03)
aobscanmodule(Three,KingOfFighters2002UM_x64.exe,0F B6 15 B3 E2 FE 03)
aobscanmodule(Four,KingOfFighters2002UM_x64.exe,0F B6 15 FB E0 FE 03)
aobscanmodule(Five,KingOfFighters2002UM_x64.exe,0F B6 05 D0 07 FF 03)
aobscanmodule(Six,KingOfFighters2002UM_x64.exe,0F B6 0D 0D 09 FF 03)

alloc(newmemOne,$1000,One)
alloc(newmemTwo,$1000,Two)
alloc(newmemThree,$1000,Three)
alloc(newmemFour,$1000,Four)
alloc(newmemFive,$1000,Five)
alloc(newmemSix,$1000,Six)

registersymbol(One,Two,Three,Four,Five,Six)
registersymbol(Eight,Nine,Ten,Eleven,Twelve,Thirteen,Fourteen,Fifteen)
registersymbol(Sixteen,Seventeen,Eighteen,Nineteen,Twenty)

label(codeOne,codeTwo,codeThree,codeFour,codeFive,codeSix,codeSeven,codeEight,codeNine)
label(codeTen,codeEleven,codeTwelve,codeThirteen,codeFourteen,codeFifteen,codeSixteen)
label(codeSeventeen,codeEighteen)
label(returnOne,returnTwo,returnThree,returnFour,returnFive,returnSix)
label(Eight,Nine,Ten,Eleven,Twelve,Thirteen,Fourteen,Fifteen)
label(Sixteen,Seventeen,Eighteen,Nineteen,Twenty)

newmemOne:
  cmp byte ptr [Eight],1
  je codeOne
  cmp byte ptr [Nine],1
  je codeTwo
  jmp codeThree

codeOne:
  mov word ptr [KingOfFighters2002UM_x64.exe+40BA354],78
  jmp codeThree

codeTwo:
  cmp word ptr [KingOfFighters2002UM_x64.exe+40BA354],1
  jbe codeThree
  mov word ptr [KingOfFighters2002UM_x64.exe+40BA354],1

codeThree:
  movzx edi,word ptr [KingOfFighters2002UM_x64.exe+40BA354]
  jmp returnOne

newmemTwo:
  cmp byte ptr [Ten],1
  je codeFour
  cmp byte ptr [Eleven],1
  je codeFive
  jmp codeSix

codeFour:
  mov word ptr [KingOfFighters2002UM_x64.exe+40BA574],78
  jmp codeSix

codeFive:
  cmp word ptr [KingOfFighters2002UM_x64.exe+40BA574],1
  jbe codeSix
  mov word ptr [KingOfFighters2002UM_x64.exe+40BA574],1

codeSix:
  movzx edi,word ptr [KingOfFighters2002UM_x64.exe+40BA574]
  jmp returnTwo

newmemThree:
  cmp byte ptr [Twelve],1
  je codeSeven
  cmp byte ptr [Thirteen],1
  je codeEight
  jmp codeNine

codeSeven:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA3FF],4
  jmp codeNine

codeEight:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA3FF],0

codeNine:
  movzx edx,byte ptr [KingOfFighters2002UM_x64.exe+40BA3FF]
  jmp returnThree

newmemFour:
  cmp byte ptr [Fourteen],1
  je codeTen
  cmp byte ptr [Fifteen],1
  je codeEleven
  jmp codeTwelve

codeTen:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA61F],4
  jmp codeTwelve

codeEleven:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA61F],0

codeTwelve:
  movzx edx,byte ptr [KingOfFighters2002UM_x64.exe+40BA61F]
  jmp returnFour

newmemFive:
  cmp byte ptr [Sixteen],1
  je codeThirteen
  cmp byte ptr [Seventeen],1
  je codeFourteen
  jmp codeFifteen

codeThirteen:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA362],78
  jmp codeFifteen

codeFourteen:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA362],0

codeFifteen:
  movzx eax,byte ptr [KingOfFighters2002UM_x64.exe+40BA362]
  jmp returnFive

newmemSix:
  cmp byte ptr [Eighteen],1
  je codeSixteen
  cmp byte ptr [Nineteen],1
  je codeSeventeen
  jmp codeEighteen

codeSixteen:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA582],78
  jmp codeEighteen

codeSeventeen:
  mov byte ptr [KingOfFighters2002UM_x64.exe+40BA582],0

codeEighteen:
  movzx ecx,byte ptr [KingOfFighters2002UM_x64.exe+40BA582]
  jmp returnSix

Eight:
  db 0
Nine:
  db 0
Ten:
  db 0
Eleven:
  db 0
Twelve:
  db 0
Thirteen:
  db 0
Fourteen:
  db 0
Fifteen:
  db 0
Sixteen:
  db 0
Seventeen:
  db 0
Eighteen:
  db 0
Nineteen:
  db 0
Twenty:
  resb 50

One:
  jmp newmemOne
  nop 2
returnOne:

Two:
  jmp newmemTwo
  nop 2
returnTwo:

Three:
  jmp newmemThree
  nop 2
returnThree:

Four:
  jmp newmemFour
  nop 2
returnFour:

Five:
  jmp newmemFive
  nop 2
returnFive:

Six:
  jmp newmemSix
  nop 2
returnSix:

[DISABLE]

One:
  db 0F B7 3D D1 FC FE 03
Two:
  db 0F B7 3D 9E FD FE 03
Three:
  db 0F B6 15 B3 E2 FE 03
Four:
  db 0F B6 15 FB E0 FE 03
Five:
  db 0F B6 05 D0 07 FF 03
Six:
  db 0F B6 0D 0D 09 FF 03

unregistersymbol(*)
dealloc(*)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>1</ID>
          <Description>"==== Player 1 ===="</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <Color>C080FF</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>4</ID>
              <Description>"Freeze Time"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

aobscanmodule(Seven,KingOfFighters2002UM_x64.exe,88 08 48 8D 0D AB 3F F7 03)
registersymbol(Seven)

Seven:
  db 90 90

[DISABLE]

Seven:
  db 88 08

unregistersymbol(Seven)
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>5</ID>
              <Description>"Infinite Health"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 2 ====", "Quick Win")
{$asm}

Eight:
  db 1

[DISABLE]

Eight:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>6</ID>
              <Description>"Infinite Guard"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 2 ====", "Opponent Zero Guard")
{$asm}

Sixteen:
  db 1

[DISABLE]

Sixteen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>7</ID>
              <Description>"Infinite Power"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 2 ====", "Opponent Zero Power")
{$asm}

Twelve:
  db 1

[DISABLE]

Twelve:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>8</ID>
              <Description>"Opponent Zero Power"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 2 ====", "Infinite Power")
{$asm}

Fifteen:
  db 1

[DISABLE]

Fifteen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>9</ID>
              <Description>"Opponent Zero Guard"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 2 ====", "Infinite Guard")
{$asm}

Nineteen:
  db 1

[DISABLE]

Nineteen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>10</ID>
              <Description>"Quick Win"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 2 ====", "Infinite Health")
{$asm}

Eleven:
  db 1

[DISABLE]

Eleven:
  db 0
</AssemblerScript>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>2</ID>
          <Description>"==== Player 2 ===="</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <Color>C080FF</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>12</ID>
              <Description>"Infinite Health"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 1 ====", "Quick Win")
{$asm}

Ten:
  db 1

[DISABLE]

Ten:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>13</ID>
              <Description>"Infinite Guard"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 1 ====", "Opponent Zero Guard")
{$asm}

Eighteen:
  db 1

[DISABLE]

Eighteen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>14</ID>
              <Description>"Infinite Power"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 1 ====", "Opponent Zero Power")
{$asm}

Fourteen:
  db 1

[DISABLE]

Fourteen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>15</ID>
              <Description>"Opponent Zero Power"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 1 ====", "Infinite Power")
{$asm}

Thirteen:
  db 1

[DISABLE]

Thirteen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>16</ID>
              <Description>"Opponent Zero Guard"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 1 ====", "Infinite Guard")
{$asm}

Seventeen:
  db 1

[DISABLE]

Seventeen:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>17</ID>
              <Description>"Quick Win"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  deactivateIn("==== Player 1 ====", "Infinite Health")
{$asm}

Nine:
  db 1

[DISABLE]

Nine:
  db 0
</AssemblerScript>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>3</ID>
          <Description>"==== Extras ====="</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <Color>C080FF</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>18</ID>
              <Description>"Achievements"</Description>
              <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
              <Color>C08000</Color>
              <GroupHeader>1</GroupHeader>
              <CheatEntries>
                <CheatEntry>
                  <ID>33</ID>
                  <Description>"⚠Achievements will unlock permanently."</Description>
                  <Color>8080FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
                <CheatEntry>
                  <ID>21</ID>
                  <Description>"CHAMPION"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 1)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>22</ID>
                  <Description>"The King of Fighters"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 2)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>23</ID>
                  <Description>"Unnamed Challenger"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 3)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>24</ID>
                  <Description>"Challenger"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 4)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>25</ID>
                  <Description>"Expert Challenger"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 5)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>28</ID>
                  <Description>"Rookie Fighter"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 6)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>26</ID>
                  <Description>"Agile Fighter"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 7)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>27</ID>
                  <Description>"Veteran Fighter"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 8)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>29</ID>
                  <Description>"Raging Throw"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 9)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>31</ID>
                  <Description>"Mighty Blow"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 10)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>30</ID>
                  <Description>"Online Fighter"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 11)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>32</ID>
                  <Description>"Online Master"</Description>
                  <Color>808080</Color>
                  <VariableType>Auto Assembler Script</VariableType>
                  <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  unlockAch(memrec, 12)
{$asm}

[DISABLE]
</AssemblerScript>
                </CheatEntry>
                <CheatEntry>
                  <ID>34</ID>
                  <Description>"⬆Click the ones you want to unlock while in a match."</Description>
                  <Color>C0C0C0</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>19</ID>
              <Description>"Unlock All Challenges"</Description>
              <Color>C08000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]

{$lua}
  if syntaxcheck then return end
  local b = getAddressSafe("KingOfFighters2002UM_x64.exe+40E3C58")
  if b then
    local o = readBytes(b, 50, true)
    writeBytes("Twenty", o)
    local u = {}
    for i = 1, 50 do u[i] = (o[i] == 2) and 2 or 1 end
    writeBytes(b, u)
  end
{$asm}

[DISABLE]

{$lua}
  if syntaxcheck then return end
  local b = getAddressSafe("KingOfFighters2002UM_x64.exe+40E3C58")
  if b then writeBytes(b, readBytes("Twenty", 50, true)) end
{$asm}
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>20</ID>
              <Description>"⬆Enable before clicking Challenge mode."</Description>
              <Color>C0C0C0</Color>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <Comments>Created by: Outrun
https://opencheattables.com</Comments>
</CheatTable>
