<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="13">
  <CheatEntries>
    <CheatEntry>
      <ID>5</ID>
      <Description>"Painkiller HP AMMO"</Description>
      <Color>80000008</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
alloc(code3,2048)
registersymbol(code3)
label(returnhere)
label(originalcode)
label(exit)

label(TryAmmo)
label(TryAmmo2)
label(TryAmmo3)
label(TryAmmo4)
label(AMMOSET)
label(VALUE)




code3:
// STANDARD CHECK START
//standard register check
cmp ecx,3
jne originalcode

//standard STACK check
cmp dword ptr [esp+30],00000001
jne originalcode
cmp dword ptr [esp+34],00000007
jne originalcode
// STANDARD CHECK END


//health STACK check
cmp dword ptr [esp+20],00000070
jne TryAmmo
cmp dword ptr [esp+28],00000007
jne TryAmmo

//health structure check
cmp dword ptr [esi+40],00000004
jne TryAmmo
cmp dword ptr [esi+44],40100000
jne TryAmmo

//HEALTH
fld qword ptr [VALUE]
fstp qword ptr [eax+08]
jmp originalcode


TryAmmo:
//ammo STACK check
cmp dword ptr [esp+20],000000E0
jne originalcode
cmp dword ptr [esp+28],0000000E
jne originalcode

//ammo structure check
cmp dword ptr [esi+18],00000000
jne TryAmmo2
cmp dword ptr [esi+1c],40080000
jne TryAmmo2

jmp AMMOSET

TryAmmo2:
//ammo structure check
cmp dword ptr [esi-58],00000000
jne TryAmmo3
cmp dword ptr [esi-54],40080000
jne TryAmmo3

jmp AMMOSET

TryAmmo3:
//ammo structure check
cmp dword ptr [esi-138],00000000
jne TryAmmo4
cmp dword ptr [esi-134],40080000
jne TryAmmo4

jmp AMMOSET

TryAmmo4:
//ammo structure check
cmp dword ptr [esi-198],00000000
jne originalcode
cmp dword ptr [esi-194],40080000
jne originalcode

//AMMO Set
AMMOSET:
fld qword ptr [VALUE+8]
fstp qword ptr [eax+08]

originalcode:
mov ecx,[eax+08]
mov [edi+08],ecx

exit:
jmp returnhere

VALUE:
dq (double)666	//health
dq (double)99	//ammo

"Engine.dll"+15CD11:
jmp code3
nop
returnhere:

[DISABLE]
dealloc(code3)
"Engine.dll"+15CD11:
//Alt: mov ecx,[eax+08]
//Alt: mov [edi+08],ecx
db 8B 48 08 89 4F 08

unregistersymbol(code3)
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <LuaScript>strings_add(getAutoAttachList(), "painkiller.exe")
</LuaScript>
</CheatTable>
