<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="52">
  <Files>
    <File Name="launchgame.dat" Encoding="Ascii85">/7Z%C.Nnu=N:wWsPKA(F</File>
  </Files>
  <CheatEntries>
    <CheatEntry>
      <ID>21</ID>
      <Description>"Get Hacking Points"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <Color>008000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$LUA}
if syntaxcheck then return end

-- Gemini Code, with my own modifications --
-- Changes Color if script activates or fails to activate
-- Check if the global post-execution event already exists to prevent duplication
if not onMemRecPostExecute then
    function onMemRecPostExecute(memoryrecord, newState, succeeded)
        -- newState = the state it tried to change to (true for activate)
        -- succeeded = whether the activation/deactivation actually worked
        if newState == true then
            if succeeded == false then
              -- Set color to Red (RGB: 255, 0, 0 converted to integer via 0xBBGGRR or RGB format)
              memoryrecord.Color = clRed
            else
              memoryrecord.Color = clGreen
            end
        end
    end
end

{$ASM}
// Writes to Health
aobscanmodule(hackingPointOne, $process, 8B 82 58 02 00 00 89 34 B8 E8 ** ** ** ** 83 C4 0C)
registersymbol(hackingPointOne)

// Writes to Lives and Power Ups
aobscanmodule(hackingPointTwo, $process, 2B CA 89 48 08 5F 5E)
registersymbol(hackingPointTwo)

// Writes to canJump and isInvincible
aobscanmodule(hackingPointThree, $process, 8B 48 08 89 4E 08 5F 5E 5D 5B)
registersymbol(hackingPointThree)

[DISABLE]
unregistersymbol(*)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>22</ID>
          <Description>"Script One"</Description>
          <Options moHideChildren="1" moManualExpandCollapse="1"/>
          <Color>008000</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>/* Script One: Writes to Health */

[ENABLE]
// Check for compatibility
assert(hackingPointOne, 8B 82 58 02 00 00 89 34 B8 E8 ** ** ** ** 83 C4 0C)

alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

alloc(pBeers, 4)
registersymbol(pBeers)

newmem:
// Health is negative
lea eax, [edi*4]
mov [pBeers], eax

originalcode:
mov eax,[edx+00000258]

exit:
add [pBeers], eax
jmp returnhere

hackingPointOne:
jmp newmem
nop
returnhere:

[DISABLE]
dealloc(*)
unregistersymbol(*)

hackingPointOne:
db 8B 82 58 02 00 00
//mov eax,[edx+00000258]
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>23</ID>
              <Description>"Beers"</Description>
              <ShowAsSigned>1</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pBeers</Address>
              <Offsets>
                <Offset>0</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>24</ID>
          <Description>"Script Two"</Description>
          <Options moHideChildren="1" moManualExpandCollapse="1"/>
          <Color>008000</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>/* Script Two: Writes to Lives and Power Ups */

[ENABLE]
assert(hackingPointTwo, 2B CA 89 48 08 5F 5E)

alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

alloc(pLives, 4)
alloc(pPowerUp, 4)
registersymbol(pLives)
registersymbol(pPowerUp)

newmem:
cmp edi, A // Lives ID
jne @f
mov [pLives], eax
jmp originalcode

@@:
mov [pPowerUp], eax

originalcode:
sub ecx,edx
mov [eax+08],ecx
pop edi

exit:
jmp returnhere

hackingPointTwo:
jmp newmem
nop
returnhere:

[DISABLE]
dealloc(*)
unregistersymbol(*)

hackingPointTwo:
db 2B CA 89 48 08 5F
//sub ecx,edx
//mov [eax+08],ecx
//pop edi
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>25</ID>
              <Description>"Lives"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pLives</Address>
              <Offsets>
                <Offset>08</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>26</ID>
              <Description>"Power Up"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pPowerUp</Address>
              <Offsets>
                <Offset>08</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>27</ID>
          <Description>"Script Three"</Description>
          <Options moHideChildren="1" moManualExpandCollapse="1"/>
          <Color>008000</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>/* Script Three: Infinite Jumps and Invincibility */

[ENABLE]
assert(hackingPointThree, 8B 48 08 89 4E 08 5F 5E 5D 5B)
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

alloc(enableJumps, 1)
alloc(enableInvincible, 1)
registersymbol(enableJumps)
registersymbol(enableInvincible)

// Change this to alter the defeault state (enabled or disabled) when activating the script
enableJumps:
db 1 // Default state

enableInvincible:
db 0 // Default state

newmem:
mov ecx,[eax+08] // original code

cmp [esp+08], 3
jne originalcode

cmp ecx, 0
jne originalcode

cmp [esi+08], 1
jne originalcode

cmp [edi+08], 0 // 0 means it's invincibility address
je @f

cmp [enableJumps], 0
jne exit // Allow player to jump again

@@:
cmp [enableInvincible], 0
jne exit


originalcode:
//mov ecx,[eax+08]
mov [esi+08],ecx

exit:
jmp returnhere

hackingPointThree:
jmp newmem
nop
returnhere:

[DISABLE]
dealloc(*)
unregistersymbol(*)

hackingPointThree:
db 8B 48 08 89 4E 08
//mov ecx,[eax+08]
//mov [esi+08],ecx
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>28</ID>
              <Description>"Infinite Jumps"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:disabled
1:enabled
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Byte</VariableType>
              <Address>enableJumps</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>29</ID>
              <Description>"Invincibility"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:disabled
1:enabled
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Byte</VariableType>
              <Address>enableInvincible</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <Comments>Angry Video Game Nerd Adventures Cheat Table By HNI96

Current Features:
* Pointer to Health (Beers)
* Pointer to Lives
* Pointer to Power Up amount
* Infinite Jumps (Can Always Jump)
* Invincibility (Ignores Everything / No knock-back or damage)

How-to in case the table needs an update:
* Script One:
-- If you have 3 beers on screen, scan for -4 (4-bytes)
-- Find what writes to the address when you take damage
-- Avoid hard coding infinite health, or the character will become stuck
on the bottom of the screen, even with infinite jumps enabled

* Script Two:
-- Scan for the amount of Lives plus One (4-bytes)
-- Find what writes, that will access both Lives and Power Ups
-- Check if edi can be used to distinguish them

* Script Three:
-- 1 means you can jump, 0 means that you can't
-- Keep scanning for 0/1 until you find the address
-- The instruction that writes to canJump also writes to a bunch of other
addresses, so you'll need a way to distinguish them.
-- One obvious method is that you already known canJump goes from 1 to 0. This already filters most addresses, and the remaining addresses can be further filtered by analyzing the esp stack and [edi] structure.
</Comments>
</CheatTable>
