<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
  <CheatEntries>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Peggle Hack v2.2 (Hack State: 1/0 = ON/OFF)"</Description>
      <Options moHideChildren="1"/>
      <LastState Activated="1"/>
      <Color>0000FF</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{
Procces: Peggle.exe
Game Version: Peggle Deluxe 1.01 (Origin)
Table version: 2.2
CE Version: 6.4

By: mixmax35
Date: 30.06.2014
}

[enable]

//========================= LABELS, SYMBOLS, AOBSCANS, ETC'

alloc(allocMem,1024)
registersymbol(allocMem)

label(code_balls)
label(next_balls)
label(back_balls)

label(code_score)
label(next_score)
label(back_score)

registersymbol(i_balls)
label(i_balls)

registersymbol(i_score)
label(i_score)

aobscan(aob_balls,01 8c 86 7c 01 00 00)
registersymbol(aob_balls)

aobscan(aob_score,01 84 91 74 01 00 00)
registersymbol(aob_score)

//========================= ALLOC ADDRESS

allocMem:

//========================= BALLS HACK

code_balls:

pushfd
cmp [i_balls],0 //CMP if the hack is ACTIVE(1)
jne next_balls //if ACTIVE jump to HACKED / else continue to ORIGINAL

popfd
mov [esi+eax*4+17C],ecx //ORIGINAL CODE
jmp back_balls //return

next_balls:
popfd
add [esi+eax*4+17C],#99 //HACKED CODE
jmp back_balls //return

//========================= SCORE HACK

code_score:

pushfd
cmp [i_score],0 //CMP if the hack is ACTIVE(1)
jne next_score //if ACTIVE jump to HACKED / else continue to ORIGINAL

popfd
mov [ecx+edx*4+174],eax //ORIGINAL CODE
jmp back_score //return

next_score:
popfd
mov [ecx+edx*4+174],#9999999 //HACKED CODE
jmp back_score //return

//========================= DECLARING DEFAULT VARIABLES

i_balls:
dd 1

i_score:
dd 1

//========================= INJECTION POINTS

aob_balls:
jmp code_balls
nop
nop
back_balls:

aob_score:
jmp code_score
nop
nop
back_score:

[disable]

//========================= GIVE BACK THE ORIGINAL INSTRUCTIONS

aob_score:
add [ecx+edx*4+174],eax //SCORE

aob_balls:
add [esi+eax*4+17C],ecx //BALLS

//========================= UN-SYMBOL, DEALLOC, ETC'

unregistersymbol(aob_balls)
unregistersymbol(aob_score)

unregistersymbol(i_balls)
unregistersymbol(i_score)

unregistersymbol(allocMem)
dealloc(allocMem)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>2</ID>
          <Description>"allocMem"</Description>
          <LastState Value="683D839C" Activated="0" RealAddress="039F0000"/>
          <ShowAsHex>1</ShowAsHex>
          <Color>808080</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>allocMem</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>3</ID>
          <Description>"Balls Hack"</Description>
          <LastState Value="1" Activated="0" RealAddress="039F0068"/>
          <Color>008000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_balls</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>4</ID>
          <Description>"Score Hack"</Description>
          <LastState Value="1" Activated="0" RealAddress="039F006C"/>
          <Color>008000</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>i_score</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols>
    <SymbolEntry>
      <Name>i_balls</Name>
      <Address>039F0068</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>i_score</Name>
      <Address>039F006C</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>aob_balls</Name>
      <Address> 0045D88F</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>aob_score</Name>
      <Address> 0044832A</Address>
    </SymbolEntry>
  </UserdefinedSymbols>
</CheatTable>
