<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="32">
  <CheatEntries>
    <CheatEntry>
      <ID>45</ID>
      <Description>"Gem-Scripts - you have to collect one gem to actually load the code in memory!"</Description>
      <Options moHideChildren="1"/>
      <LastState Value="" RealAddress="00000000"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>3</ID>
          <Description>"find address of gems - collect one gem to update address"</Description>
          <Options moHideChildren="1"/>
          <LastState/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

aobscan(gems,89 47 20 8B 47 10 89) // should be unique
alloc(newmem,$1000)
globalalloc(gemaddy,4)

label(code)
label(return)

gemaddy:
  dw 0

newmem:
  push eax
  lea eax,[edi]
  mov [gemaddy],eax
  pop eax
code:
  mov [edi+20],eax
  mov eax,[edi+10]
  jmp return

gems:
  jmp newmem
  nop
return:
registersymbol(gems)

[DISABLE]

gems:
  db 89 47 20 8B 47 10

unregistersymbol(gems)
dealloc(newmem)
dealloc(gemaddy)

{
// ORIGINAL CODE - INJECTION POINT: GameManager:AddGem+e

UnityEngine:Time:get_timeScale+49: DD 5D D0        - fstp qword ptr [ebp-30]
UnityEngine:Time:get_timeScale+4c: EB E0           - jmp UnityEngine:Time:get_timeScale+2e
16D2E28E: 00 00           - add [eax],al
GameManager:AddGem: 55              - push ebp
GameManager:AddGem+1: 8B EC           - mov ebp,esp
GameManager:AddGem+3: 57              - push edi
GameManager:AddGem+4: 83 EC 04        - sub esp,04
GameManager:AddGem+7: 8B 7D 08        - mov edi,[ebp+08]
GameManager:AddGem+a: 8B 47 20        - mov eax,[edi+20]
GameManager:AddGem+d: 40              - inc eax
// ---------- INJECTING HERE ----------
GameManager:AddGem+e: 89 47 20        - mov [edi+20],eax
// ---------- DONE INJECTING  ----------
GameManager:AddGem+11: 8B 47 10        - mov eax,[edi+10]
GameManager:AddGem+14: 89 45 F8        - mov [ebp-08],eax
GameManager:AddGem+17: 8D 47 20        - lea eax,[edi+20]
GameManager:AddGem+1a: 83 EC 0C        - sub esp,0C
GameManager:AddGem+1d: 50              - push eax
GameManager:AddGem+1e: E8 85 11 ED EE  - call System:Int32:ToString
GameManager:AddGem+23: 83 C4 10        - add esp,10
GameManager:AddGem+26: 8B C8           - mov ecx,eax
GameManager:AddGem+28: 8B 45 F8        - mov eax,[ebp-08]
GameManager:AddGem+2b: 83 EC 08        - sub esp,08
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>4</ID>
              <Description>"Collected Gems"</Description>
              <LastState Value="99" RealAddress="138AB390"/>
              <VariableType>4 Bytes</VariableType>
              <Address>gemaddy</Address>
              <Offsets>
                <Offset>20</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>47</ID>
          <Description>"--- OR ---"</Description>
          <LastState Value="" RealAddress="00000000"/>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>46</ID>
          <Description>"set gems to 99 when collecting one"</Description>
          <Options moHideChildren="1"/>
          <LastState/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

aobscan(gems,89 47 20 8B 47 10 89) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  mov eax,#99
code:
  mov [edi+20],eax
  mov eax,[edi+10]
  jmp return

gems:
  jmp newmem
  nop
return:
registersymbol(gems)

[DISABLE]

gems:
  db 89 47 20 8B 47 10

unregistersymbol(gems)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameManager:AddGem+e

UnityEngine:Time:get_timeScale+49: DD 5D D0        - fstp qword ptr [ebp-30]
UnityEngine:Time:get_timeScale+4c: EB E0           - jmp UnityEngine:Time:get_timeScale+2e
16D2E28E: 00 00           - add [eax],al
GameManager:AddGem: 55              - push ebp
GameManager:AddGem+1: 8B EC           - mov ebp,esp
GameManager:AddGem+3: 57              - push edi
GameManager:AddGem+4: 83 EC 04        - sub esp,04
GameManager:AddGem+7: 8B 7D 08        - mov edi,[ebp+08]
GameManager:AddGem+a: 8B 47 20        - mov eax,[edi+20]
GameManager:AddGem+d: 40              - inc eax
// ---------- INJECTING HERE ----------
GameManager:AddGem+e: 89 47 20        - mov [edi+20],eax
// ---------- DONE INJECTING  ----------
GameManager:AddGem+11: 8B 47 10        - mov eax,[edi+10]
GameManager:AddGem+14: 89 45 F8        - mov [ebp-08],eax
GameManager:AddGem+17: 8D 47 20        - lea eax,[edi+20]
GameManager:AddGem+1a: 83 EC 0C        - sub esp,0C
GameManager:AddGem+1d: 50              - push eax
GameManager:AddGem+1e: E8 85 11 ED EE  - call System:Int32:ToString
GameManager:AddGem+23: 83 C4 10        - add esp,10
GameManager:AddGem+26: 8B C8           - mov ecx,eax
GameManager:AddGem+28: 8B 45 F8        - mov eax,[ebp-08]
GameManager:AddGem+2b: 83 EC 08        - sub esp,08
}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>48</ID>
      <Description>"Health-Scripts - chose one"</Description>
      <LastState Value="" RealAddress="00000000"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>44</ID>
          <Description>"GodMode for Player"</Description>
          <LastState Activated="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>// Mono-Address: DealDamage:Attack+2ff

[ENABLE]
aobscan(health,2B 4D 10 89 48 3C 83 EC 0C 56 39 36 E8 48 B2) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  push ebx
  mov ebx,[eax+18]
  cmp ebx,0
  jne code
  mov ecx,4
  mov [eax+3C],ecx
  pop ebx
  jmp return

code:
  sub ecx,[ebp+10]
  mov [eax+3C],ecx
  pop ebx
  jmp return

health:
  jmp newmem
  nop
return:
registersymbol(health)

[DISABLE]

health:
  db 2B 4D 10 89 48 3C

unregistersymbol(health)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: 142132E7

142132CA: E8 41 9C 07 F2  - call 0628CF10
142132CF: 83 C4 10        - add esp,10
142132D2: 85 C0           - test eax,eax
142132D4: 74 17           - je 142132ED
142132D6: 8B 43 10        - mov eax,[ebx+10]
142132D9: 0F B6 40 5F     - movzx eax,byte ptr [eax+5F]
142132DD: 85 C0           - test eax,eax
142132DF: 75 0C           - jne 142132ED
142132E1: 8B 43 10        - mov eax,[ebx+10]
142132E4: 8B 48 3C        - mov ecx,[eax+3C]
// ---------- INJECTING HERE ----------
142132E7: 2B 4D 10        - sub ecx,[ebp+10]
// ---------- DONE INJECTING  ----------
142132EA: 89 48 3C        - mov [eax+3C],ecx
142132ED: 83 EC 0C        - sub esp,0C
142132F0: 56              - push esi
142132F1: 39 36           - cmp [esi],esi
142132F3: E8 48 B2 FF FF  - call 1420E540
142132F8: 83 C4 10        - add esp,10
142132FB: 83 EC 08        - sub esp,08
142132FE: 68 A0 1E 8A 13  - push 138A1EA0
14213303: 50              - push eax
14213304: E8 3F EA FF F1  - call 06211D48
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>41</ID>
          <Description>"don't get or deal damage"</Description>
          <LastState/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>// Mono-Address: DealDamage:Attack+2ff

[ENABLE]
aobscan(health,2B 4D 10 89 48 3C 83 EC 0C 56 39 36 E8 48 B2) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  // sub ecx,[ebp+10]
  mov [eax+3C],ecx
  jmp return

health:
  jmp newmem
  nop
return:
registersymbol(health)

[DISABLE]

health:
  db 2B 4D 10 89 48 3C

unregistersymbol(health)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: 142132E7

142132CA: E8 41 9C 07 F2  - call 0628CF10
142132CF: 83 C4 10        - add esp,10
142132D2: 85 C0           - test eax,eax
142132D4: 74 17           - je 142132ED
142132D6: 8B 43 10        - mov eax,[ebx+10]
142132D9: 0F B6 40 5F     - movzx eax,byte ptr [eax+5F]
142132DD: 85 C0           - test eax,eax
142132DF: 75 0C           - jne 142132ED
142132E1: 8B 43 10        - mov eax,[ebx+10]
142132E4: 8B 48 3C        - mov ecx,[eax+3C]
// ---------- INJECTING HERE ----------
142132E7: 2B 4D 10        - sub ecx,[ebp+10]
// ---------- DONE INJECTING  ----------
142132EA: 89 48 3C        - mov [eax+3C],ecx
142132ED: 83 EC 0C        - sub esp,0C
142132F0: 56              - push esi
142132F1: 39 36           - cmp [esi],esi
142132F3: E8 48 B2 FF FF  - call 1420E540
142132F8: 83 C4 10        - add esp,10
142132FB: 83 EC 08        - sub esp,08
142132FE: 68 A0 1E 8A 13  - push 138A1EA0
14213303: 50              - push eax
14213304: E8 3F EA FF F1  - call 06211D48
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>43</ID>
          <Description>"No damage for Units with health avove 1"</Description>
          <LastState/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>// Mono-Address: DealDamage:Attack+2ff

[ENABLE]
aobscan(health,2B 4D 10 89 48 3C 83 EC 0C 56 39 36 E8 48 B2) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  cmp ecx,1  // rats have 1 health
  jle code   // if above, set health to 4 and exit
  mov ecx,4
  mov [eax+3C],ecx
  jmp return

code:
  sub ecx,[ebp+10]
  mov [eax+3C],ecx
  jmp return

health:
  jmp newmem
  nop
return:
registersymbol(health)

[DISABLE]

health:
  db 2B 4D 10 89 48 3C

unregistersymbol(health)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: 142132E7

142132CA: E8 41 9C 07 F2  - call 0628CF10
142132CF: 83 C4 10        - add esp,10
142132D2: 85 C0           - test eax,eax
142132D4: 74 17           - je 142132ED
142132D6: 8B 43 10        - mov eax,[ebx+10]
142132D9: 0F B6 40 5F     - movzx eax,byte ptr [eax+5F]
142132DD: 85 C0           - test eax,eax
142132DF: 75 0C           - jne 142132ED
142132E1: 8B 43 10        - mov eax,[ebx+10]
142132E4: 8B 48 3C        - mov ecx,[eax+3C]
// ---------- INJECTING HERE ----------
142132E7: 2B 4D 10        - sub ecx,[ebp+10]
// ---------- DONE INJECTING  ----------
142132EA: 89 48 3C        - mov [eax+3C],ecx
142132ED: 83 EC 0C        - sub esp,0C
142132F0: 56              - push esi
142132F1: 39 36           - cmp [esi],esi
142132F3: E8 48 B2 FF FF  - call 1420E540
142132F8: 83 C4 10        - add esp,10
142132FB: 83 EC 08        - sub esp,08
142132FE: 68 A0 1E 8A 13  - push 138A1EA0
14213303: 50              - push eax
14213304: E8 3F EA FF F1  - call 06211D48
}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <CheatCodes>
    <CodeEntry Color="20000000">
      <Description>Change of je PlayerMove:JumpCalculations+92</Description>
      <AddressString>121BBA87</AddressString>
      <Before>
        <Byte>00</Byte>
        <Byte>8B</Byte>
        <Byte>F7</Byte>
        <Byte>85</Byte>
        <Byte>C0</Byte>
      </Before>
      <Actual>
        <Byte>74</Byte>
        <Byte>41</Byte>
      </Actual>
      <After>
        <Byte>D9</Byte>
        <Byte>87</Byte>
        <Byte>B8</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </After>
    </CodeEntry>
    <CodeEntry Color="20000000">
      <Description>Change of jne PlayerMove:JumpCalculations+1da</Description>
      <AddressString>121BBB24</AddressString>
      <Before>
        <Byte>83</Byte>
        <Byte>C4</Byte>
        <Byte>10</Byte>
        <Byte>85</Byte>
        <Byte>C0</Byte>
      </Before>
      <Actual>
        <Byte>0F</Byte>
        <Byte>85</Byte>
        <Byte>E8</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>8B</Byte>
        <Byte>47</Byte>
        <Byte>24</Byte>
        <Byte>83</Byte>
        <Byte>EC</Byte>
      </After>
    </CodeEntry>
    <CodeEntry Color="20000000">
      <Description>Change of je PlayerMove:JumpCalculations+1da</Description>
      <AddressString>121BBB3B</AddressString>
      <Before>
        <Byte>83</Byte>
        <Byte>C4</Byte>
        <Byte>10</Byte>
        <Byte>85</Byte>
        <Byte>C0</Byte>
      </Before>
      <Actual>
        <Byte>0F</Byte>
        <Byte>84</Byte>
        <Byte>D1</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>83</Byte>
        <Byte>EC</Byte>
        <Byte>0C</Byte>
        <Byte>57</Byte>
        <Byte>E8</Byte>
      </After>
    </CodeEntry>
    <CodeEntry Color="20000000">
      <Description>Change of jbe PlayerMove:JumpCalculations+1da</Description>
      <AddressString>121BBB6E</AddressString>
      <Before>
        <Byte>E8</Byte>
        <Byte>DF</Byte>
        <Byte>F1</Byte>
        <Byte>DD</Byte>
        <Byte>D8</Byte>
      </Before>
      <Actual>
        <Byte>0F</Byte>
        <Byte>86</Byte>
        <Byte>9E</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>83</Byte>
        <Byte>EC</Byte>
        <Byte>0C</Byte>
        <Byte>57</Byte>
        <Byte>E8</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols>
    <SymbolEntry>
      <Name>gemaddy</Name>
      <Address>00C10000</Address>
    </SymbolEntry>
  </UserdefinedSymbols>
  <Comments>PlayerMove:JumpCalculations 
</Comments>
</CheatTable>
