<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="52">
  <Files>
    <File Name="launchgame.dat" Encoding="Ascii85">b75d$2q=-d(d,nsEUDB;tw]l@wu+80cUN#v%uOwhfygO/BxBIjDR8AF/]kzwNB^</File>
  </Files>
  <CheatEntries>
    <CheatEntry>
      <ID>3</ID>
      <Description>"Activate First"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{$LUA}
if syntaxcheck then return end

[ENABLE]
local processName = "PrisonCity.exe"
local moduleName = processName

local function createHackingPoint(symbolName, recordName, AOB)
  local address = AOBScanModuleUnique(moduleName, AOB)
  local memoryRecord = AddressList.getMemoryRecordByDescription(recordName)

  if memoryRecord then
    if address then
      memoryRecord.Color = 0x00AA00
      registerSymbol(symbolName, address)
    else
      memoryRecord.Color = 0x0000AA
    end
  end

end

createHackingPoint("infHealth", "Infinite Health", "48 8B 06 48 89 03 4C 8D 5C 24 60")
createHackingPoint("infLives", "Infinite Lives", "")
createHackingPoint("invincibility", "Invincibility", "")
createHackingPoint("moonJump", "Moon Jump", "84 C0 0F 84 ** ** ** ** C7 44 24 60 4B 00 00 00 8B 15 ** ** ** **")

[DISABLE]
unregisterSymbol("infHealth")
unregisterSymbol("infLives")
unregisterSymbol("invincibility")
unregisterSymbol("moonJump")
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>5</ID>
          <Description>"Infinite Health"</Description>
          <Options moHideChildren="1"/>
          <Color>00AA00</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
alloc(newmem,2048,infHealth) 
label(returnhere)
label(originalcode)
label(exit)

alloc(healthPointer, 8)
alloc(manaPointer, 8)

registersymbol(healthPointer)
registersymbol(manaPointer)

newmem:
cmp r11, 18B1D // ID for Health
jne @f
mov [healthPointer], rbx

@@:
cmp r11, 18B26 // ID for Mana
jne originalcode
mov [manaPointer], rbx

nop [rbx] // DEBUG: check if only intended addresses are being accessed

originalcode:
mov rax,[rsi]
mov [rbx],rax

exit:
jmp returnhere

infHealth:
jmp newmem
nop
returnhere:

[DISABLE]
dealloc(*)
unregistersymbol(*)

infHealth:
db 48 8B 06 48 89 03
//mov rax,[rsi]
//mov [rbx],rax
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>13</ID>
              <Description>"Health"</Description>
              <ShowAsSigned>1</ShowAsSigned>
              <VariableType>Double</VariableType>
              <Address>healthPointer</Address>
              <Offsets>
                <Offset>0</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>14</ID>
              <Description>"Mana"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Double</VariableType>
              <Address>manaPointer</Address>
              <Offsets>
                <Offset>0</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>6</ID>
          <Description>"Infinite Lives"</Description>
          <Color>0000AA</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]

</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>7</ID>
          <Description>"Invincibility"</Description>
          <Color>0000AA</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]

</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>4</ID>
          <Description>"Moon Jump"</Description>
          <Options moHideChildren="1"/>
          <Color>00AA00</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
alloc(newmem,2048,moonJump)
label(returnhere)
label(originalcode)
label(exit)

alloc(moonJumpHotkey, 1)
registersymbol(moonJumpHotkey)

alloc(instructionBytes, 8)
registersymbol(instructionBytes)

moonJumpHotkey:
 db 0

instructionBytes:
 readmem(moonJump, 8)


newmem:
cmp byte ptr [moonJumpHotkey], 1
jne originalcode

mov al, 1

originalcode:
test al,al
je PrisonCity.exe+5160BA

exit:
jmp returnhere

moonJump:
jmp newmem
nop 3

returnhere:

[DISABLE]
moonJump:
 readmem(instructionBytes, 8)

dealloc(*)
unregistersymbol(*)
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>8</ID>
              <Description>"Keep 'A' pressed (configurable in hotkeys)"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Byte</VariableType>
              <Address>moonJumpHotkey</Address>
              <Hotkeys>
                <Hotkey OnlyWhileDown="1">
                  <Action>Set Value</Action>
                  <Keys>
                    <Key>65</Key>
                  </Keys>
                  <Value>1</Value>
                  <ID>0</ID>
                </Hotkey>
              </Hotkeys>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <CheatCodes>
    <CodeEntry>
      <Description>Change of mov [rsp+20],00000001</Description>
      <AddressString>PrisonCity.exe+689B7</AddressString>
      <Before>
        <Byte>8B</Byte>
        <Byte>02</Byte>
        <Byte>48</Byte>
        <Byte>89</Byte>
        <Byte>03</Byte>
      </Before>
      <Actual>
        <Byte>C7</Byte>
        <Byte>44</Byte>
        <Byte>24</Byte>
        <Byte>20</Byte>
        <Byte>01</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>48</Byte>
        <Byte>8B</Byte>
        <Byte>D7</Byte>
        <Byte>48</Byte>
        <Byte>8B</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Code :mov [rbx],rax</Description>
      <AddressString>PrisonCity.exe+890E99</AddressString>
      <Before>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>48</Byte>
        <Byte>8B</Byte>
        <Byte>06</Byte>
      </Before>
      <Actual>
        <Byte>48</Byte>
        <Byte>89</Byte>
        <Byte>03</Byte>
      </Actual>
      <After>
        <Byte>4C</Byte>
        <Byte>8D</Byte>
        <Byte>5C</Byte>
        <Byte>24</Byte>
        <Byte>60</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Code :mov rax,[rdi]</Description>
      <AddressString>PrisonCity.exe+88FA21</AddressString>
      <Before>
        <Byte>E8</Byte>
        <Byte>DF</Byte>
        <Byte>B9</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Before>
      <Actual>
        <Byte>48</Byte>
        <Byte>8B</Byte>
        <Byte>07</Byte>
      </Actual>
      <After>
        <Byte>48</Byte>
        <Byte>89</Byte>
        <Byte>03</Byte>
        <Byte>48</Byte>
        <Byte>83</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols/>
</CheatTable>
