<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="24">
  <CheatEntries>
    <CheatEntry>
      <ID>171</ID>
      <Description>"Health Step 2 CE Tuto 32Bit"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscanmodule(INJECT,Tutorial-i386.exe,89 83 80 04 00 00 8D 55 D4 E8 02) // should be unique
alloc(newmem,$1000)
alloc(org,100)

label(code)
label(return)

newmem:
  call rand

code:
  mov eax,[RND]
  mov [ebx+00000480],eax
  mov [org],ebx
  add [org],480
  jmp return

INJECT:
  jmp newmem
  nop
return:

registersymbol(INJECT)
registersymbol(org)

[DISABLE]
INJECT:
  db 89 83 80 04 00 00

unregistersymbol(INJECT)
unregistersymbol(org)
dealloc(newmem)
dealloc(org)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>173</ID>
          <Description>"org"</Description>
          <LastState Value="166" RealAddress="002EFDD8"/>
          <VariableType>4 Bytes</VariableType>
          <Address>[org]</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>174</ID>
      <Description>"Activate then "call rand" and use 'RND' address"</Description>
      <Options moHideChildren="1"/>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
alloc(rand,$1000)
alloc(RND,100)
alloc(lowerBound,100)
alloc(upperBound,100)

lowerBound:
dd #1

upperBound:
dd #2

rand:
pushad
call msvcrt.rand
xor edx,edx
mov ebx,[lowerBound]
mov ecx,[upperBound]
cmp ecx,ebx
cmovl ecx,ebx
inc ecx
sub ecx,ebx
idiv ecx
mov [RND],edx
add [RND],ebx
popad
ret

registersymbol(rand)
registersymbol(RND)
registersymbol(lowerBound)
registersymbol(upperBound)

[DISABLE]
unregistersymbol(rand)
unregistersymbol(RND)
unregistersymbol(lowerBound)
unregistersymbol(upperBound)
dealloc(rand)
dealloc(RND)
dealloc(lowerBound)
dealloc(upperBound)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>172</ID>
          <Description>"RND"</Description>
          <LastState Value="166" RealAddress="01681000"/>
          <VariableType>4 Bytes</VariableType>
          <Address>RND</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>175</ID>
          <Description>"Min"</Description>
          <LastState Value="50" RealAddress="01681064"/>
          <ShowAsSigned>1</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>lowerBound</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>176</ID>
          <Description>"Max"</Description>
          <LastState Value="200" RealAddress="016810C8"/>
          <ShowAsSigned>1</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>upperBound</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols>
    <SymbolEntry>
      <Name>asTimeGoesByDisactive</Name>
      <Address>003608AF</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>asTimeGoesBy</Name>
      <Address>003F0872</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>myRandomNumber</Name>
      <Address>0174003B</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>INJECT</Name>
      <Address> 00423B00</Address>
    </SymbolEntry>
  </UserdefinedSymbols>
</CheatTable>
