<?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, true)
    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", "F2 0F 5C 05 ** ** ** ** F2 0F 11 01 48 83 C4 20 5B C3")
createHackingPoint("invincibility", "Invincibility", "84 C0 0F 84 ** ** ** ** 8B 87 B0 00 00 00 D1 E8 A8 01")
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" moDeactivateChildrenAsWell="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>16</ID>
          <Description>"Infinite Lives"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <Color>00AA00</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
alloc(newmem,2048,infLives) 
label(returnhere)
label(originalcode)
label(exit)

alloc(pLives, 8)
registersymbol(pLives)

newmem:
cmp r9, D
jne originalcode

mov [pLives], rcx
jmp exit

originalcode:
subsd xmm0,[PrisonCity.exe+10EE938]

exit:
jmp returnhere

infLives:
jmp newmem
nop 3
returnhere:

[DISABLE]
dealloc(*)
unregistersymbol(*)

infLives:
db F2 0F 5C 05 50 FA 01 01
//subsd xmm0,[PrisonCity.exe+10EE938]
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>17</ID>
              <Description>"Lives (die to update)"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Double</VariableType>
              <Address>pLives</Address>
              <Offsets>
                <Offset>0</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>7</ID>
          <Description>"Invincibility"</Description>
          <Color>00AA00</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
alloc(newmem,2048,invincibility) 
label(returnhere)
label(originalcode)
label(exit)

newmem:
jmp PrisonCity.exe+95F5D4

originalcode:
test al,al
je PrisonCity.exe+95F5D4

exit:
jmp returnhere

invincibility:
jmp newmem
nop 3
returnhere:

[DISABLE]
dealloc(newmem)
invincibility:
db 84 C0 0F 84 CD 01 00 00
//test al,al
//je PrisonCity.exe+95F5D4

</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>4</ID>
          <Description>"Moon Jump"</Description>
          <Options moHideChildren="1"/>
          <Color>00AA00</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$LUA}
if syntaxcheck then return end

moonJumpTimer = createTimer(nil)
moonJumpTimer.Interval = 10 -- Checks every 10 milliseconds (Extremely fast)
moonJumpTimer.OnTimer = function(t)
  local moonJumpHotkey = getAddressSafe("moonJumpHotkey")
  if not moonJumpHotkey then return end

  if isKeyPressed(VK_A) then -- When 'A' key is pressed
    writeByte(moonJumpHotkey, 1) -- Enable
  else
    writeByte(moonJumpHotkey, 0) -- Disable
  end
end
{$ASM}
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]
{$LUA}
if syntaxcheck then return end
if moonJumpTimer then
  moonJumpTimer.destroy()
  moonJumpTimer = nil
end
{$ASM}

moonJump:
 readmem(instructionBytes, 8)

dealloc(*)
unregistersymbol(*)
</AssemblerScript>
        </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>
    <CodeEntry>
      <Description>Code :movsd [rcx],xmm0</Description>
      <AddressString>PrisonCity.exe+CEEE8</AddressString>
      <Before>
        <Byte>05</Byte>
        <Byte>50</Byte>
        <Byte>FA</Byte>
        <Byte>01</Byte>
        <Byte>01</Byte>
      </Before>
      <Actual>
        <Byte>F2</Byte>
        <Byte>0F</Byte>
        <Byte>11</Byte>
        <Byte>01</Byte>
      </Actual>
      <After>
        <Byte>48</Byte>
        <Byte>83</Byte>
        <Byte>C4</Byte>
        <Byte>20</Byte>
        <Byte>5B</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols/>
</CheatTable>
