<?xml version="1.0" encoding="utf-8"?>
<CheatTable ApoctEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>85</ID>
      <Description>"Map Reveal1"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Civ IV: Beyond The Sword
  Version: 
  Date   : 2023-09-01
  Author : Apocalypticx

  This script does map reveal1
}

[ENABLE]

aobscanmodule(mapreveal1,Civ4BeyondSword.exe,83 39 01 75 22) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
mov dword ptr [ecx],(byte)2

code:
  cmp dword ptr [ecx],01
  jne Civ4BeyondSword.exe+624AA
  jmp return

mapreveal1:
  jmp newmem
return:
registersymbol(mapreveal1)

[DISABLE]

mapreveal1:
  db 83 39 01 75 22

unregistersymbol(mapreveal1)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Civ4BeyondSword.exe+62483

Civ4BeyondSword.exe+62460: 2B D3                    - sub edx,ebx
Civ4BeyondSword.exe+62462: 03 FA                    - add edi,edx
Civ4BeyondSword.exe+62464: 8B 54 24 18              - mov edx,[esp+18]
Civ4BeyondSword.exe+62468: 8D 2C 08                 - lea ebp,[eax+ecx]
Civ4BeyondSword.exe+6246B: 8B 4C 24 1C              - mov ecx,[esp+1C]
Civ4BeyondSword.exe+6246F: 8D 1C 10                 - lea ebx,[eax+edx]
Civ4BeyondSword.exe+62472: 8D 14 08                 - lea edx,[eax+ecx]
Civ4BeyondSword.exe+62475: 8B 4C 24 20              - mov ecx,[esp+20]
Civ4BeyondSword.exe+62479: 03 C8                    - add ecx,eax
Civ4BeyondSword.exe+6247B: C7 44 24 28 04 00 00 00  - mov [esp+28],00000004
// ---------- INJECTING HERE ----------
Civ4BeyondSword.exe+62483: 83 39 01                 - cmp dword ptr [ecx],01
// ---------- DONE INJECTING  ----------
Civ4BeyondSword.exe+62486: 75 22                    - jne Civ4BeyondSword.exe+624AA
Civ4BeyondSword.exe+62488: 8B 44 24 64              - mov eax,[esp+64]
Civ4BeyondSword.exe+6248C: D9 80 90 00 00 00        - fld dword ptr [eax+00000090]
Civ4BeyondSword.exe+62492: D9 41 08                 - fld dword ptr [ecx+08]
Civ4BeyondSword.exe+62495: DA E9                    - fucompp 
Civ4BeyondSword.exe+62497: DF E0                    - fnstsw ax
Civ4BeyondSword.exe+62499: F6 C4 44                 - test ah,44
Civ4BeyondSword.exe+6249C: 7A 0C                    - jp Civ4BeyondSword.exe+624AA
Civ4BeyondSword.exe+6249E: 8B 44 24 64              - mov eax,[esp+64]
Civ4BeyondSword.exe+624A2: D8 80 98 00 00 00        - fadd dword ptr [eax+00000098]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>87</ID>
      <Description>"Map Reveal2"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Civ IV: Beyond The Sword
  Version: 
  Date   : 2023-09-01
  Author : Apocalypticx

  This script does map reveal2
}

[ENABLE]

aobscanmodule(mapreveal2,Civ4BeyondSword.exe,8B 04 08 83 C7 01) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
mov [eax+ecx],(byte)2

code:
  mov eax,[eax+ecx]
  add edi,01
  jmp return

mapreveal2:
  jmp newmem
  nop
return:
registersymbol(mapreveal2)

[DISABLE]

mapreveal2:
  db 8B 04 08 83 C7 01

unregistersymbol(mapreveal2)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Civ4BeyondSword.exe+618F6

Civ4BeyondSword.exe+618DD: EB 0D                 - jmp Civ4BeyondSword.exe+618EC
Civ4BeyondSword.exe+618DF: 8B 54 24 14           - mov edx,[esp+14]
Civ4BeyondSword.exe+618E3: 83 C2 FF              - add edx,-01
Civ4BeyondSword.exe+618E6: 3B C2                 - cmp eax,edx
Civ4BeyondSword.exe+618E8: 7E 02                 - jle Civ4BeyondSword.exe+618EC
Civ4BeyondSword.exe+618EA: 8B C2                 - mov eax,edx
Civ4BeyondSword.exe+618EC: 0F AF C3              - imul eax,ebx
Civ4BeyondSword.exe+618EF: 03 C1                 - add eax,ecx
Civ4BeyondSword.exe+618F1: 8B 0E                 - mov ecx,[esi]
Civ4BeyondSword.exe+618F3: C1 E0 04              - shl eax,04
// ---------- INJECTING HERE ----------
Civ4BeyondSword.exe+618F6: 8B 04 08              - mov eax,[eax+ecx]
// ---------- DONE INJECTING  ----------
Civ4BeyondSword.exe+618F9: 83 C7 01              - add edi,01
Civ4BeyondSword.exe+618FC: 83 FF 05              - cmp edi,05
Civ4BeyondSword.exe+618FF: D8 84 86 8C 00 00 00  - fadd dword ptr [esi+eax*4+0000008C]
Civ4BeyondSword.exe+61906: 0F 8C 76 FF FF FF     - jl Civ4BeyondSword.exe+61882
Civ4BeyondSword.exe+6190C: D8 0D F4 0E AD 00     - fmul dword ptr [Civ4BeyondSword.exe+6D0EF4]
Civ4BeyondSword.exe+61912: 8B 7C 24 24           - mov edi,[esp+24]
Civ4BeyondSword.exe+61916: 8B 44 24 78           - mov eax,[esp+78]
Civ4BeyondSword.exe+6191A: 83 F8 01              - cmp eax,01
Civ4BeyondSword.exe+6191D: 8B 4C 24 20           - mov ecx,[esp+20]
Civ4BeyondSword.exe+61921: 89 4C 24 3C           - mov [esp+3C],ecx
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>125</ID>
      <Description>"City Reveal"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Civ IV: Beyond The Sword
  Version: 
  Date   : 2023-09-01
  Author : Apocalypticx

  This script does city reveal
}

[ENABLE]

aobscanmodule(cityreveal,CvGameCoreDLL.dll,8A 04 01 5E C2 08 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov al,[ecx+eax]
  mov al,1
  pop esi
  ret 0008
  jmp return

cityreveal:
  jmp newmem
  nop 2
return:
registersymbol(cityreveal)

[DISABLE]

cityreveal:
  db 8A 04 01 5E C2 08 00

unregistersymbol(cityreveal)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: CvGameCoreDLL.CvCity::isRevealed+29

CvGameCoreDLL.CvCity::isRevealed+8: 74 15              - je CvGameCoreDLL.CvCity::isRevealed+1F
CvGameCoreDLL.CvCity::isRevealed+A: 8B 0D C4 31 5D 07  - mov ecx,[CvGameCoreDLL.dll+4531C4]
CvGameCoreDLL.CvCity::isRevealed+10: E8 6B 44 05 00     - call CvGameCoreDLL.CvGame::isDebugMode
CvGameCoreDLL.CvCity::isRevealed+15: 84 C0              - test al,al
CvGameCoreDLL.CvCity::isRevealed+17: 74 06              - je CvGameCoreDLL.CvCity::isRevealed+1F
CvGameCoreDLL.CvCity::isRevealed+19: B0 01              - mov al,01
CvGameCoreDLL.CvCity::isRevealed+1B: 5E                 - pop esi
CvGameCoreDLL.CvCity::isRevealed+1C: C2 08 00           - ret 0008
CvGameCoreDLL.CvCity::isRevealed+1F: 8B 86 DC 01 00 00  - mov eax,[esi+000001DC]
CvGameCoreDLL.CvCity::isRevealed+25: 8B 4C 24 08        - mov ecx,[esp+08]
// ---------- INJECTING HERE ----------
CvGameCoreDLL.CvCity::isRevealed+29: 8A 04 01           - mov al,[ecx+eax]
// ---------- DONE INJECTING  ----------
CvGameCoreDLL.CvCity::isRevealed+2C: 5E                 - pop esi
CvGameCoreDLL.CvCity::isRevealed+2D: C2 08 00           - ret 0008
CvGameCoreDLL.CvCity::getName: 51                 - push ecx
CvGameCoreDLL.CvCity::getName+1: 8B 44 24 0C        - mov eax,[esp+0C]
CvGameCoreDLL.CvCity::getName+5: 56                 - push esi
CvGameCoreDLL.CvCity::getName+6: 6A 01              - push 01
CvGameCoreDLL.CvCity::getName+8: 50                 - push eax
CvGameCoreDLL.CvCity::getName+9: 83 EC 1C           - sub esp,1C
CvGameCoreDLL.CvCity::getName+C: 8D 91 E4 01 00 00  - lea edx,[ecx+000001E4]
CvGameCoreDLL.CvCity::getName+12: 8B CC              - mov ecx,esp
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>122</ID>
      <Description>"Unit Reveal"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Civ IV: Beyond The Sword
  Version: 
  Date   : 2023-09-01
  Author : Apocalypticx

  This script does unit reveal
}

[ENABLE]

aobscanmodule(unitreveal,CvGameCoreDLL.dll,74 06 B0 01 5E C2 08 00 8B 4C) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov al,01
  pop esi
  jmp return

unitreveal:
  jmp newmem
return:
registersymbol(unitreveal)

[DISABLE]

unitreveal:
  db 74 06 B0 01 5E

unregistersymbol(unitreveal)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: CvGameCoreDLL.CvPlot::isVisible+17

CvGameCoreDLL.CvPlot::getSymbolOffsetY+47D: CC                 - int 3 
CvGameCoreDLL.CvPlot::getSymbolOffsetY+47E: CC                 - int 3 
CvGameCoreDLL.CvPlot::getSymbolOffsetY+47F: CC                 - int 3 
CvGameCoreDLL.CvPlot::isVisible: 80 7C 24 08 00     - cmp byte ptr [esp+08],00
CvGameCoreDLL.CvPlot::isVisible+5: 56                 - push esi
CvGameCoreDLL.CvPlot::isVisible+6: 8B F1              - mov esi,ecx
CvGameCoreDLL.CvPlot::isVisible+8: 74 15              - je CvGameCoreDLL.CvPlot::isVisible+1F
CvGameCoreDLL.CvPlot::isVisible+A: 8B 0D C4 31 87 07  - mov ecx,[CvGameCoreDLL.dll+4531C4]
CvGameCoreDLL.CvPlot::isVisible+10: E8 5B 1E EE FF     - call CvGameCoreDLL.CvGame::isDebugMode
CvGameCoreDLL.CvPlot::isVisible+15: 84 C0              - test al,al
// ---------- INJECTING HERE ----------
CvGameCoreDLL.CvPlot::isVisible+17: 74 06              - je CvGameCoreDLL.CvPlot::isVisible+1F
// ---------- DONE INJECTING  ----------
CvGameCoreDLL.CvPlot::isVisible+19: B0 01              - mov al,01
CvGameCoreDLL.CvPlot::isVisible+1B: 5E                 - pop esi
CvGameCoreDLL.CvPlot::isVisible+1C: C2 08 00           - ret 0008
CvGameCoreDLL.CvPlot::isVisible+1F: 8B 4C 24 08        - mov ecx,[esp+08]
CvGameCoreDLL.CvPlot::isVisible+23: 83 F9 FF           - cmp ecx,-01
CvGameCoreDLL.CvPlot::isVisible+26: 75 06              - jne CvGameCoreDLL.CvPlot::isVisible+2E
CvGameCoreDLL.CvPlot::isVisible+28: 32 C0              - xor al,al
CvGameCoreDLL.CvPlot::isVisible+2A: 5E                 - pop esi
CvGameCoreDLL.CvPlot::isVisible+2B: C2 08 00           - ret 0008
CvGameCoreDLL.CvPlot::isVisible+2E: 8B 46 64           - mov eax,[esi+64]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>126</ID>
      <Description>"Unit Flags"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Civ IV: Beyond The Sword
  Version: 
  Date   : 2023-09-01
  Author : Apocalypticx

  This script does unit flags
}

[ENABLE]

aobscanmodule(unitflags,CvGameCoreDLL.dll,75 62 83 FE FF) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  je CvGameCoreDLL.CvPlot::getSymbolOffsetX+223B
  cmp esi,-01
  jmp return

unitflags:
  jmp newmem
return:
registersymbol(unitflags)

[DISABLE]

unitflags:
  db 75 62 83 FE FF

unregistersymbol(unitflags)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: CvGameCoreDLL.CvPlot::getSymbolOffsetX+21D7

CvGameCoreDLL.CvPlot::getSymbolOffsetX+21AF: E8 DC 99 F5 FF     - call CvGameCoreDLL.CvInfoBase::isGraphicalOnly
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21B4: 84 C0              - test al,al
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21B6: 0F 84 4F 03 00 00  - je CvGameCoreDLL.CvPlot::getSymbolOffsetX+250B
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21BC: 8B 0D C4 31 5D 07  - mov ecx,[CvGameCoreDLL.dll+4531C4]
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21C2: 56                 - push esi
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21C3: E8 A8 07 EE FF     - call CvGameCoreDLL.CvGame::getActiveTeam
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21C8: 8B 0D C4 31 5D 07  - mov ecx,[CvGameCoreDLL.dll+4531C4]
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21CE: 8B F0              - mov esi,eax
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21D0: E8 8B 9A ED FF     - call CvGameCoreDLL.CvGame::isDebugMode
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21D5: 84 C0              - test al,al
// ---------- INJECTING HERE ----------
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21D7: 75 62              - jne CvGameCoreDLL.CvPlot::getSymbolOffsetX+223B
// ---------- DONE INJECTING  ----------
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21D9: 83 FE FF           - cmp esi,-01
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21DC: 74 1E              - je CvGameCoreDLL.CvPlot::getSymbolOffsetX+21FC
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21DE: 8B 45 64           - mov eax,[ebp+64]
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21E1: 85 C0              - test eax,eax
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21E3: 74 08              - je CvGameCoreDLL.CvPlot::getSymbolOffsetX+21ED
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21E5: 0F BF 04 70        - movsx eax,word ptr [eax+esi*2]
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21E9: 85 C0              - test eax,eax
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21EB: 7F 4E              - jg CvGameCoreDLL.CvPlot::getSymbolOffsetX+223B
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21ED: 8B 45 68           - mov eax,[ebp+68]
CvGameCoreDLL.CvPlot::getSymbolOffsetX+21F0: 85 C0              - test eax,eax
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>127</ID>
      <Description>"Invis Reveal"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Civ IV: Beyond The Sword
  Version: 
  Date   : 2023-09-05
  Author : Apocalypticx

  This script does invis reveal
}

[ENABLE]

aobscanmodule(invisreveal,CvGameCoreDLL.dll,0F 9F C1 88 C8 C2 08 00 8B) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  setg cl
  mov al,cl
  mov al,1
  jmp return

invisreveal:
  jmp newmem
return:
registersymbol(invisreveal)

[DISABLE]

invisreveal:
  db 0F 9F C1 88 C8

unregistersymbol(invisreveal)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: CvGameCoreDLL.CvPlot::isRiverCrossing+FB

CvGameCoreDLL.CvPlot::isRiverCrossing+E0: 8B 81 AC 00 00 00  - mov eax,[ecx+000000AC]
CvGameCoreDLL.CvPlot::isRiverCrossing+E6: 85 C0              - test eax,eax
CvGameCoreDLL.CvPlot::isRiverCrossing+E8: 74 0B              - je CvGameCoreDLL.CvPlot::isRiverCrossing+F5
CvGameCoreDLL.CvPlot::isRiverCrossing+EA: 8B 4C 24 04        - mov ecx,[esp+04]
CvGameCoreDLL.CvPlot::isRiverCrossing+EE: 8B 04 88           - mov eax,[eax+ecx*4]
CvGameCoreDLL.CvPlot::isRiverCrossing+F1: 85 C0              - test eax,eax
CvGameCoreDLL.CvPlot::isRiverCrossing+F3: 75 0E              - jne CvGameCoreDLL.CvPlot::isRiverCrossing+103
CvGameCoreDLL.CvPlot::isRiverCrossing+F5: 33 C0              - xor eax,eax
CvGameCoreDLL.CvPlot::isRiverCrossing+F7: 33 C9              - xor ecx,ecx
CvGameCoreDLL.CvPlot::isRiverCrossing+F9: 85 C0              - test eax,eax
// ---------- INJECTING HERE ----------
CvGameCoreDLL.CvPlot::isRiverCrossing+FB: 0F 9F C1           - setg cl
// ---------- DONE INJECTING  ----------
CvGameCoreDLL.CvPlot::isRiverCrossing+FE: 88 C8              - mov al,cl
CvGameCoreDLL.CvPlot::isRiverCrossing+100: C2 08 00           - ret 0008
CvGameCoreDLL.CvPlot::isRiverCrossing+103: 8B 54 24 08        - mov edx,[esp+08]
CvGameCoreDLL.CvPlot::isRiverCrossing+107: 0F BF 04 50        - movsx eax,word ptr [eax+edx*2]
CvGameCoreDLL.CvPlot::isRiverCrossing+10B: 33 C9              - xor ecx,ecx
CvGameCoreDLL.CvPlot::isRiverCrossing+10D: 85 C0              - test eax,eax
CvGameCoreDLL.CvPlot::isRiverCrossing+10F: 0F 9F C1           - setg cl
CvGameCoreDLL.CvPlot::isRiverCrossing+112: 88 C8              - mov al,cl
CvGameCoreDLL.CvPlot::isRiverCrossing+114: C2 08 00           - ret 0008
CvGameCoreDLL.CvPlot::isRiverCrossing+117: CC                 - int 3 
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>128</ID>
      <Description>"Donate Paypal"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
--NO_ACTIVATE
if syntaxcheck then return end
if memrec then print(memrec.Description) end

shellExecute('https://paypal.me/apocalypticx?country.x=GB&amp;locale.x=en_GB')

getLuaEngine().MenuItem1.DoClick()
getLuaEngine().Close()

[DISABLE]

</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <Comments>Info about this table:
</Comments>
</CheatTable>
