<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="38">
  <CheatEntries>
    <CheatEntry>
      <ID>10</ID>
      <Description>"Gold"</Description>
      <LastState Value="20" Activated="1" RealAddress="2081630C"/>
      <VariableType>4 Bytes</VariableType>
      <Address>"mono.dll"+0020B574</Address>
      <Offsets>
        <Offset>3C</Offset>
        <Offset>4C</Offset>
        <Offset>40</Offset>
        <Offset>8</Offset>
        <Offset>2B4</Offset>
        <Offset>10</Offset>
      </Offsets>
    </CheatEntry>
    <CheatEntry>
      <ID>3</ID>
      <Description>"always enough gold in the bucket"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscan(gold,89 48 3C 83 EC 0C 50) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  mov ecx,#20
code:
  mov [eax+3C],ecx
  sub esp,0C
  jmp return

gold:
  jmp newmem
  nop
return:
registersymbol(gold)

[DISABLE]

gold:
  db 89 48 3C 83 EC 0C

unregistersymbol(gold)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Wallet:set_coins+20

Wallet:set_coins+3: 83 EC 08        - sub esp,08
Wallet:set_coins+6: 8B 45 08        - mov eax,[ebp+08]
Wallet:set_coins+9: 8B 40 28        - mov eax,[eax+28]
Wallet:set_coins+c: 83 EC 08        - sub esp,08
Wallet:set_coins+f: FF 75 0C        - push [ebp+0C]
Wallet:set_coins+12: 50              - push eax
Wallet:set_coins+13: E8 E0 CD FE FF  - call UnityEngine.Mathf:Min
Wallet:set_coins+18: 83 C4 10        - add esp,10
Wallet:set_coins+1b: 8B C8           - mov ecx,eax
Wallet:set_coins+1d: 8B 45 08        - mov eax,[ebp+08]
// ---------- INJECTING HERE ----------
Wallet:set_coins+20: 89 48 3C        - mov [eax+3C],ecx
// ---------- DONE INJECTING  ----------
Wallet:set_coins+23: 83 EC 0C        - sub esp,0C
Wallet:set_coins+26: 50              - push eax
Wallet:set_coins+27: E8 1C 81 FE FF  - call Wallet:ShowCoinBag
Wallet:set_coins+2c: 83 C4 10        - add esp,10
Wallet:set_coins+2f: C9              - leave 
Wallet:set_coins+30: C3              - ret 
06C66AB1: 00 00           - add [eax],al
06C66AB3: 00 00           - add [eax],al
06C66AB5: 00 00           - add [eax],al
06C66AB7: 00 55 8B        - add [ebp-75],dl
}
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
