<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="34">
  <CheatEntries>
    <CheatEntry>
      <ID>11</ID>
      <Description>"Activate"</Description>
      <Options moHideChildren="1"/>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
local gameName = "We Love Katamari REROLL"
local gameProcess = "WLKRR.exe"
if getProcessIDFromProcessName(gameProcess) ~= nil then
   if readInteger(process) == nil then
      openProcess(gameProcess)
   else
       if readInteger(process) ~= readInteger(gameProcess) then
          openProcess(gameProcess)
       end
   end
else
    beep() error(showMessage(string.format("%s is not running.",gameName)))
end
if syntaxcheck then return end

[DISABLE]
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>7</ID>
          <Description>"Option 1"</Description>
          <Options moHideChildren="1"/>
          <LastState Value="" RealAddress="00000000"/>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>6</ID>
              <Description>"time remaining selector"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">178200:99 minutes
0:end level
</DropDownList>
              <LastState Value="178200" RealAddress="1CB2EB10DBC"/>
              <VariableType>4 Bytes</VariableType>
              <Address>"GameAssembly.dll"+02DCE598</Address>
              <Offsets>
                <Offset>1BC</Offset>
                <Offset>318</Offset>
                <Offset>B0</Offset>
                <Offset>290</Offset>
                <Offset>710</Offset>
                <Offset>120</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Option 2"</Description>
          <Options moHideChildren="1"/>
          <LastState Value="" RealAddress="00000000"/>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>3</ID>
              <Description>"time freeze"</Description>
              <LastState/>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : We Love Katamari REROLL+ Royal Reverie
  Version: 
  Date   : 2023-06-03
  Author : nbarr

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(timeFreeze,GameAssembly.dll,89 4A 3C 48 83 C4 28 C3 E8) // should be unique
alloc(newmem,$1000,timeFreeze)

label(code)
label(return)

newmem:
 // mov [rdx+3C],ecx
  add rsp,28
  jmp return
code:
  mov [rdx+3C],ecx
  add rsp,28
  jmp return

timeFreeze:
  jmp newmem
  nop 2
return:
registersymbol(timeFreeze)

[DISABLE]

timeFreeze:
  db 89 4A 3C 48 83 C4 28

unregistersymbol(timeFreeze)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+638958

GameAssembly.dll+63892E: 75 0F                 - jne GameAssembly.dll+63893F
GameAssembly.dll+638930: 48 8B C8              - mov rcx,rax
GameAssembly.dll+638933: E8 18 1B BE FF        - call GameAssembly.il2cpp_runtime_class_init
GameAssembly.dll+638938: 48 8B 05 39 3C 63 02  - mov rax,[GameAssembly.dll+2C6C578]
GameAssembly.dll+63893F: 48 8B 80 B8 00 00 00  - mov rax,[rax+000000B8]
GameAssembly.dll+638946: 48 8B 90 B8 1F 00 00  - mov rdx,[rax+00001FB8]
GameAssembly.dll+63894D: 48 85 D2              - test rdx,rdx
GameAssembly.dll+638950: 74 0E                 - je GameAssembly.dll+638960
GameAssembly.dll+638952: 8B 42 3C              - mov eax,[rdx+3C]
GameAssembly.dll+638955: 8D 48 FF              - lea ecx,[rax-01]
// ---------- INJECTING HERE ----------
GameAssembly.dll+638958: 89 4A 3C              - mov [rdx+3C],ecx
// ---------- DONE INJECTING  ----------
GameAssembly.dll+63895B: 48 83 C4 28           - add rsp,28
GameAssembly.dll+63895F: C3                    - ret 
GameAssembly.dll+638960: E8 4B 1A BE FF        - call GameAssembly.mono_method_get_class+90
GameAssembly.dll+638965: CC                    - int 3 
GameAssembly.dll+638966: CC                    - int 3 
GameAssembly.dll+638967: CC                    - int 3 
GameAssembly.dll+638968: CC                    - int 3 
GameAssembly.dll+638969: CC                    - int 3 
GameAssembly.dll+63896A: CC                    - int 3 
GameAssembly.dll+63896B: CC                    - int 3 
}
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>5</ID>
              <Description>"end level"</Description>
              <LastState/>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : We Love Katamari REROLL+ Royal Reverie
  Version: 
  Date   : 2023-06-03
  Author : nbarr

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(timeFreeze,GameAssembly.dll,89 4A 3C 48 83 C4 28 C3 E8) // should be unique
alloc(newmem,$1000,timeFreeze)

label(code)
label(return)

newmem:
  mov [rdx+3C],0
  add rsp,28
  jmp return
code:
  mov [rdx+3C],ecx
  add rsp,28
  jmp return

timeFreeze:
  jmp newmem
  nop 2
return:
registersymbol(timeFreeze)

[DISABLE]

timeFreeze:
  db 89 4A 3C 48 83 C4 28

unregistersymbol(timeFreeze)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+638958

GameAssembly.dll+63892E: 75 0F                 - jne GameAssembly.dll+63893F
GameAssembly.dll+638930: 48 8B C8              - mov rcx,rax
GameAssembly.dll+638933: E8 18 1B BE FF        - call GameAssembly.il2cpp_runtime_class_init
GameAssembly.dll+638938: 48 8B 05 39 3C 63 02  - mov rax,[GameAssembly.dll+2C6C578]
GameAssembly.dll+63893F: 48 8B 80 B8 00 00 00  - mov rax,[rax+000000B8]
GameAssembly.dll+638946: 48 8B 90 B8 1F 00 00  - mov rdx,[rax+00001FB8]
GameAssembly.dll+63894D: 48 85 D2              - test rdx,rdx
GameAssembly.dll+638950: 74 0E                 - je GameAssembly.dll+638960
GameAssembly.dll+638952: 8B 42 3C              - mov eax,[rdx+3C]
GameAssembly.dll+638955: 8D 48 FF              - lea ecx,[rax-01]
// ---------- INJECTING HERE ----------
GameAssembly.dll+638958: 89 4A 3C              - mov [rdx+3C],ecx
// ---------- DONE INJECTING  ----------
GameAssembly.dll+63895B: 48 83 C4 28           - add rsp,28
GameAssembly.dll+63895F: C3                    - ret 
GameAssembly.dll+638960: E8 4B 1A BE FF        - call GameAssembly.mono_method_get_class+90
GameAssembly.dll+638965: CC                    - int 3 
GameAssembly.dll+638966: CC                    - int 3 
GameAssembly.dll+638967: CC                    - int 3 
GameAssembly.dll+638968: CC                    - int 3 
GameAssembly.dll+638969: CC                    - int 3 
GameAssembly.dll+63896A: CC                    - int 3 
GameAssembly.dll+63896B: CC                    - int 3 
}
</AssemblerScript>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <CheatCodes>
    <CodeEntry Color="80000008">
      <Description>Change of mov [rdx+3C],ecx</Description>
      <AddressString>GameAssembly.dll+638958</AddressString>
      <Before>
        <Byte>42</Byte>
        <Byte>3C</Byte>
        <Byte>8D</Byte>
        <Byte>48</Byte>
        <Byte>FF</Byte>
      </Before>
      <Actual>
        <Byte>89</Byte>
        <Byte>4A</Byte>
        <Byte>3C</Byte>
      </Actual>
      <After>
        <Byte>48</Byte>
        <Byte>83</Byte>
        <Byte>C4</Byte>
        <Byte>28</Byte>
        <Byte>C3</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols/>
  <Comments>Info about this table:
</Comments>
</CheatTable>
