<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="42">
  <CheatEntries>
    <CheatEntry>
      <ID>62</ID>
      <Description>"Activate for 200 CP for party during battle"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-11
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadCPAmtDuringBattle,hnk.exe,0F B7 48 0C 41 0F B7 C7 66 41 3B CF 66 0F 43 C1) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov word ptr [rax+0C],#200 // New Code
  movzx ecx,word ptr [rax+0C]
  movzx eax,r15w
  cmp cx,r15w
  cmovae ax,cx
  jmp return

ReadCPAmtDuringBattle:
  jmp far newmem
  nop 2
return:
registersymbol(ReadCPAmtDuringBattle)

[DISABLE]

ReadCPAmtDuringBattle:
  db 0F B7 48 0C 41 0F B7 C7 66 41 3B CF 66 0F 43 C1

unregistersymbol(ReadCPAmtDuringBattle)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+C8F51

hnk.exe+C8F27: 66 44 89 67 02        - mov [rdi+02],r12w
hnk.exe+C8F2C: 48 8B 4E 50           - mov rcx,[rsi+50]
hnk.exe+C8F30: E8 3B 2D 02 00        - call hnk.exe+EBC70
hnk.exe+C8F35: 0F B7 48 08           - movzx ecx,word ptr [rax+08]
hnk.exe+C8F39: 66 3B 4F 02           - cmp cx,[rdi+02]
hnk.exe+C8F3D: E9 C6 FE FF FF        - jmp hnk.exe+C8E08
hnk.exe+C8F42: 80 7B 1E 1F           - cmp byte ptr [rbx+1E],1F
hnk.exe+C8F46: 75 1C                 - jne hnk.exe+C8F64
hnk.exe+C8F48: 48 8B 4E 50           - mov rcx,[rsi+50]
hnk.exe+C8F4C: E8 1F 2D 02 00        - call hnk.exe+EBC70
// ---------- INJECTING HERE ----------
hnk.exe+C8F51: 0F B7 48 0C           - movzx ecx,word ptr [rax+0C]
// ---------- DONE INJECTING  ----------
hnk.exe+C8F55: 41 0F B7 C7           - movzx eax,r15w
hnk.exe+C8F59: 66 41 3B CF           - cmp cx,r15w
hnk.exe+C8F5D: 66 0F 43 C1           - cmovae ax,cx
hnk.exe+C8F61: 66 89 07              - mov [rdi],ax
hnk.exe+C8F64: 48 8B 85 88 81 00 00  - mov rax,[rbp+00008188]
hnk.exe+C8F6B: 4C 8B 46 50           - mov r8,[rsi+50]
hnk.exe+C8F6F: 4C 8B 88 58 03 00 00  - mov r9,[rax+00000358]
hnk.exe+C8F76: 4D 3B C1              - cmp r8,r9
hnk.exe+C8F79: 0F 84 81 00 00 00     - je hnk.exe+C9000
hnk.exe+C8F7F: 4D 85 C9              - test r9,r9
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>69</ID>
      <Description>"Mira Pointer"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>hnk.exe+16324D8</Address>
    </CheatEntry>
    <CheatEntry>
      <ID>78</ID>
      <Description>"Sepith Pointers"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>70</ID>
          <Description>"earth"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+1632438</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>71</ID>
          <Description>"water"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+163243C</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>72</ID>
          <Description>"fire"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+1632440</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>73</ID>
          <Description>"wind"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+1632444</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>74</ID>
          <Description>"time"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+1632448</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>75</ID>
          <Description>"space"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+163244C</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>76</ID>
          <Description>"mirage"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+1632450</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>77</ID>
          <Description>"mass"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>hnk.exe+1632454</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>48</ID>
      <Description>"Lloyd BP/Assault meter pointers"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>67</ID>
          <Description>"Assault Meter (lloyd) (1 bar = 100)"</Description>
          <VariableType>2 Bytes</VariableType>
          <Address>hnk.exe+1632506</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>68</ID>
          <Description>"BP pointer (lloyd)"</Description>
          <VariableType>Byte</VariableType>
          <Address>hnk.exe+163A8CA</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>49</ID>
      <Description>"protag2 BP/Assault meter pointers"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>59</ID>
          <Description>"Assault Meter (protag2) (1 bar = 100)"</Description>
          <VariableType>2 Bytes</VariableType>
          <Address>hnk.exe+1632504</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>63</ID>
          <Description>"BP pointer (protag2)"</Description>
          <VariableType>Byte</VariableType>
          <Address>hnk.exe+163A8C9</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>54</ID>
      <Description>"protag3 BP/Assault meter pointers"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>65</ID>
          <Description>"Assault Meter (protag3) (1 bar = 100)"</Description>
          <VariableType>2 Bytes</VariableType>
          <Address>hnk.exe+1632508</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>66</ID>
          <Description>"BP pointer (protag3)"</Description>
          <VariableType>Byte</VariableType>
          <Address>hnk.exe+163A8CB</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>40</ID>
      <Description>"Megalith effect (hp/ep regen on field)"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>33</ID>
          <Description>"HP regen (800 per sec)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-08
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadHPEverySecondOnField,hnk.exe,41 83 3E 00 0F 84 A3 04 00 00 0F B7 D7 49 8B CA) // should be unique
alloc(newmem,$1000)

label(code)
label(dothis)
label(return)

newmem:

code:
  mov r8d,dword ptr [r14]
  add r8d,#800 // Amt HP restored per sec
  // Compare to max HP, to not go over
  cmp r8d,dword ptr [r14+4]
  jl dothis
  mov r8d,dword ptr [r14+4]
  jmp dothis

dothis:
  mov dword ptr [r14],r8d
  cmp dword ptr [r14],00
  je hnk.exe+32A2C1
  movzx edx,di
  mov rcx,r10
  jmp return

ReadHPEverySecondOnField:
  jmp far newmem
  nop 2
return:
registersymbol(ReadHPEverySecondOnField)

[DISABLE]

ReadHPEverySecondOnField:
  db 41 83 3E 00 0F 84 A3 04 00 00 0F B7 D7 49 8B CA

unregistersymbol(ReadHPEverySecondOnField)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+329E14

hnk.exe+329DE0: 4D 8B 95 30 0C 00 00  - mov r10,[r13+00000C30]
hnk.exe+329DE7: 49 8B 82 48 CF 79 00  - mov rax,[r10+0079CF48]
hnk.exe+329DEE: 41 0F B7 3C 07        - movzx edi,word ptr [r15+rax]
hnk.exe+329DF3: 83 FF 40              - cmp edi,40
hnk.exe+329DF6: 0F 83 C5 04 00 00     - jae hnk.exe+32A2C1
hnk.exe+329DFC: 48 8D 0C BF           - lea rcx,[rdi+rdi*4]
hnk.exe+329E00: 48 C1 E1 04           - shl rcx,04
hnk.exe+329E04: 4D 8D B2 4C 2C 7B 00  - lea r14,[r10+007B2C4C]
hnk.exe+329E0B: 4C 03 F1              - add r14,rcx
hnk.exe+329E0E: 0F 84 AD 04 00 00     - je hnk.exe+32A2C1
// ---------- INJECTING HERE ----------
hnk.exe+329E14: 41 83 3E 00           - cmp dword ptr [r14],00
// ---------- DONE INJECTING  ----------
hnk.exe+329E18: 0F 84 A3 04 00 00     - je hnk.exe+32A2C1
hnk.exe+329E1E: 0F B7 D7              - movzx edx,di
hnk.exe+329E21: 49 8B CA              - mov rcx,r10
hnk.exe+329E24: E8 17 43 02 00        - call hnk.exe+34E140
hnk.exe+329E29: 83 F8 03              - cmp eax,03
hnk.exe+329E2C: 0F 87 8F 04 00 00     - ja hnk.exe+32A2C1
hnk.exe+329E32: 41 B9 FF FF FF FF     - mov r9d,FFFFFFFF
hnk.exe+329E38: 41 B8 00 00 00 01     - mov r8d,01000000
hnk.exe+329E3E: 49 8B CA              - mov rcx,r10
hnk.exe+329E41: E8 7A F4 04 00        - call hnk.exe+3792C0
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>37</ID>
          <Description>"EP regen (50 per sec)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-08
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadEPEvrySecOnField,hnk.exe,43 0F B7 84 37 56 2C 7B 00 49 8D 9E 4C 2C 7B 00) // should be unique
alloc(newmem,$1000)

label(code)
label(dothis)
label(return)

newmem:

code:
  mov ax,word ptr [r15+r14+007B2C54]
  add ax,#50 // Amt of EP added per sec
  cmp ax,word ptr [r15+r14+007B2C54+2]
  jle dothis
  mov ax,word ptr [r15+r14+007B2C54+2]
  jmp dothis

dothis:
  mov word ptr [r15+r14+007B2C54],ax
  movzx eax,word ptr [r15+r14+007B2C56]
  lea rbx,[r14+007B2C4C]
  jmp return

ReadEPEvrySecOnField:
  jmp far newmem
  nop 2
return:
registersymbol(ReadEPEvrySecOnField)

[DISABLE]

ReadEPEvrySecOnField:
  db 43 0F B7 84 37 56 2C 7B 00 49 8D 9E 4C 2C 7B 00

unregistersymbol(ReadEPEvrySecOnField)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+32A670

hnk.exe+32A644: 75 11                       - jne hnk.exe+32A657
hnk.exe+32A646: C5 FA 2C 51 04              - vcvttss2si edx,[rcx+04]
hnk.exe+32A64B: 45 33 C0                    - xor r8d,r8d
hnk.exe+32A64E: C6 45 70 01                 - mov byte ptr [rbp+70],01
hnk.exe+32A652: E8 A9 5E 0D 00              - call hnk.exe+400500
hnk.exe+32A657: 48 8B 15 72 DB B5 00        - mov rdx,[hnk.exe+E881D0]
hnk.exe+32A65E: BF 42 0E 00 00              - mov edi,00000E42
hnk.exe+32A663: 66 FF C6                    - inc si
hnk.exe+32A666: 66 83 FE 02                 - cmp si,02
hnk.exe+32A66A: 0F 82 20 FD FF FF           - jb hnk.exe+32A390
// ---------- INJECTING HERE ----------
hnk.exe+32A670: 43 0F B7 84 37 56 2C 7B 00  - movzx eax,word ptr [r15+r14+007B2C56]
// ---------- DONE INJECTING  ----------
hnk.exe+32A679: 49 8D 9E 4C 2C 7B 00        - lea rbx,[r14+007B2C4C]
hnk.exe+32A680: 66 43 39 84 37 54 2C 7B 00  - cmp [r15+r14+007B2C54],ax
hnk.exe+32A689: 0F 84 BC 02 00 00           - je hnk.exe+32A94B
hnk.exe+32A68F: 45 33 D2                    - xor r10d,r10d
hnk.exe+32A692: 41 8B F2                    - mov esi,r10d
hnk.exe+32A695: 49 03 DF                    - add rbx,r15
hnk.exe+32A698: 0F 1F 84 00 00 00 00 00     - nop dword ptr [rax+rax+00000000]
hnk.exe+32A6A0: B8 FF 00 00 00              - mov eax,000000FF
hnk.exe+32A6A5: 66 3B F0                    - cmp si,ax
hnk.exe+32A6A8: 0F 85 49 01 00 00           - jne hnk.exe+32A7F7
}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>85</ID>
      <Description>"200 CP upon starting or finishing a battle"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-19
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadCPAmtOnBattleStartAndEnd,hnk.exe,0F B7 56 0C F3 0F 11 74 24 20) // should be unique
alloc(newmem,$1000,ReadCPAmtOnBattleStartAndEnd)

label(code)
label(return)

newmem:

code:
  mov word ptr [rsi+0C],#200 // New Code
  movzx edx,word ptr [rsi+0C]
  movss [rsp+20],xmm6
  jmp return

ReadCPAmtOnBattleStartAndEnd:
  jmp newmem
  nop 5
return:
registersymbol(ReadCPAmtOnBattleStartAndEnd)

[DISABLE]

ReadCPAmtOnBattleStartAndEnd:
  db 0F B7 56 0C F3 0F 11 74 24 20

unregistersymbol(ReadCPAmtOnBattleStartAndEnd)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+1BAA90

hnk.exe+1BAA67: 74 13                 - je hnk.exe+1BAA7C
hnk.exe+1BAA69: 48 8B 8B A0 03 00 00  - mov rcx,[rbx+000003A0]
hnk.exe+1BAA70: 0F 57 C9              - xorps xmm1,xmm1
hnk.exe+1BAA73: 48 8B 01              - mov rax,[rcx]
hnk.exe+1BAA76: FF 90 E0 01 00 00     - call qword ptr [rax+000001E0]
hnk.exe+1BAA7C: 48 8B 8B A8 03 00 00  - mov rcx,[rbx+000003A8]
hnk.exe+1BAA83: 48 85 C9              - test rcx,rcx
hnk.exe+1BAA86: 74 2E                 - je hnk.exe+1BAAB6
hnk.exe+1BAA88: 44 0F B7 46 0E        - movzx r8d,word ptr [rsi+0E]
hnk.exe+1BAA8D: 41 B1 01              - mov r9l,01
// ---------- INJECTING HERE ----------
hnk.exe+1BAA90: 0F B7 56 0C           - movzx edx,word ptr [rsi+0C]
// ---------- DONE INJECTING  ----------
hnk.exe+1BAA94: F3 0F 11 74 24 20     - movss [rsp+20],xmm6
hnk.exe+1BAA9A: E8 21 D2 FF FF        - call hnk.exe+1B7CC0
hnk.exe+1BAA9F: 84 C0                 - test al,al
hnk.exe+1BAAA1: 74 13                 - je hnk.exe+1BAAB6
hnk.exe+1BAAA3: 48 8B 8B A8 03 00 00  - mov rcx,[rbx+000003A8]
hnk.exe+1BAAAA: 0F 57 C9              - xorps xmm1,xmm1
hnk.exe+1BAAAD: 48 8B 01              - mov rax,[rcx]
hnk.exe+1BAAB0: FF 90 E0 01 00 00     - call qword ptr [rax+000001E0]
hnk.exe+1BAAB6: 48 8B 8B B8 03 00 00  - mov rcx,[rbx+000003B8]
hnk.exe+1BAABD: 48 85 C9              - test rcx,rcx
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>7</ID>
      <Description>"79 of item upon tossing (discarding) it in menu"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-08
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadItmAmtOnToss,hnk.exe,41 8B 44 D1 04 2B C6 85 C0 44 0F 4F D0 45 89 54 D1 04) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov [r9+rdx*8+04],#80//New Code
  mov eax,[r9+rdx*8+04]
  sub eax,esi
  test eax,eax
  cmovg r10d,eax
  mov [r9+rdx*8+04],r10d
  jmp return

ReadItmAmtOnToss:
  jmp far newmem
  nop 4
return:
registersymbol(ReadItmAmtOnToss)

[DISABLE]

ReadItmAmtOnToss:
  db 41 8B 44 D1 04 2B C6 85 C0 44 0F 4F D0 45 89 54 D1 04

unregistersymbol(ReadItmAmtOnToss)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+3F763A

hnk.exe+3F7620: 8B C1                    - mov eax,ecx
hnk.exe+3F7622: 48 03 C0                 - add rax,rax
hnk.exe+3F7625: 8B D1                    - mov edx,ecx
hnk.exe+3F7627: 66 45 39 1C C1           - cmp [r9+rax*8],r11w
hnk.exe+3F762C: 74 09                    - je hnk.exe+3F7637
hnk.exe+3F762E: FF C1                    - inc ecx
hnk.exe+3F7630: 41 3B C8                 - cmp ecx,r8d
hnk.exe+3F7633: 72 EB                    - jb hnk.exe+3F7620
hnk.exe+3F7635: EB 15                    - jmp hnk.exe+3F764C
hnk.exe+3F7637: 48 03 D2                 - add rdx,rdx
// ---------- INJECTING HERE ----------
hnk.exe+3F763A: 41 8B 44 D1 04           - mov eax,[r9+rdx*8+04]
// ---------- DONE INJECTING  ----------
hnk.exe+3F763F: 2B C6                    - sub eax,esi
hnk.exe+3F7641: 85 C0                    - test eax,eax
hnk.exe+3F7643: 44 0F 4F D0              - cmovg r10d,eax
hnk.exe+3F7647: 45 89 54 D1 04           - mov [r9+rdx*8+04],r10d
hnk.exe+3F764C: 80 BC 24 50 04 00 00 00  - cmp byte ptr [rsp+00000450],00
hnk.exe+3F7654: 74 34                    - je hnk.exe+3F768A
hnk.exe+3F7656: 48 8B D7                 - mov rdx,rdi
hnk.exe+3F7659: E8 B2 00 00 00           - call hnk.exe+3F7710
hnk.exe+3F765E: EB 2A                    - jmp hnk.exe+3F768A
hnk.exe+3F7660: 41 B8 FF 03 00 00        - mov r8d,000003FF
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>64</ID>
      <Description>"8787 U-Materials upon opening menu"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-11
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(RdUMatAmtInMenu,hnk.exe,45 8B 44 D1 04 E9) // should be unique
alloc(newmem,$1000,RdUMatAmtInMenu)

label(code)
label(return)

newmem:

code:
  mov [r9+rdx*8+04],#8787 // New Code
  mov r8d,[r9+rdx*8+04]
  jmp return

RdUMatAmtInMenu:
  jmp newmem
return:
registersymbol(RdUMatAmtInMenu)

[DISABLE]

RdUMatAmtInMenu:
  db 45 8B 44 D1 04

unregistersymbol(RdUMatAmtInMenu)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+2115DA

hnk.exe+2115C0: 8B C1                       - mov eax,ecx
hnk.exe+2115C2: 48 03 C0                    - add rax,rax
hnk.exe+2115C5: 8B D1                       - mov edx,ecx
hnk.exe+2115C7: 66 45 39 1C C1              - cmp [r9+rax*8],r11w
hnk.exe+2115CC: 74 16                       - je hnk.exe+2115E4
hnk.exe+2115CE: FF C1                       - inc ecx
hnk.exe+2115D0: 41 3B C8                    - cmp ecx,r8d
hnk.exe+2115D3: 72 EB                       - jb hnk.exe+2115C0
hnk.exe+2115D5: EB 15                       - jmp hnk.exe+2115EC
hnk.exe+2115D7: 48 03 D2                    - add rdx,rdx
// ---------- INJECTING HERE ----------
hnk.exe+2115DA: 45 8B 44 D1 04              - mov r8d,[r9+rdx*8+04]
// ---------- DONE INJECTING  ----------
hnk.exe+2115DF: E9 59 FF FF FF              - jmp hnk.exe+21153D
hnk.exe+2115E4: 48 03 D2                    - add rdx,rdx
hnk.exe+2115E7: 41 8B 5C D1 04              - mov ebx,[r9+rdx*8+04]
hnk.exe+2115EC: 44 8B C3                    - mov r8d,ebx
hnk.exe+2115EF: 48 8D 15 6A 1A A2 00        - lea rdx,[hnk.exe+C33060]
hnk.exe+2115F6: 49 8B CA                    - mov rcx,r10
hnk.exe+2115F9: E8 42 55 46 00              - call hnk.exe+676B40
hnk.exe+2115FE: 48 8B 05 DB AA C6 00        - mov rax,[hnk.exe+E7C0E0]
hnk.exe+211605: F2 44 0F 2C 90 60 59 00 00  - cvttsd2si r10d,[rax+00005960]
hnk.exe+21160E: B8 89 88 88 88              - mov eax,88888889
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>79</ID>
      <Description>"8787 Phantasmal Shards upon entering "Use Phantasmal Shard" Menu at central core"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-11
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(RdPhantomShardAmtInUsePhantShardMenu,hnk.exe,41 8B 44 D1 04 C3 CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC 48 8B) // should be unique
alloc(newmem,$1000,RdPhantomShardAmtInUsePhantShardMenu)

label(code)
label(return)

newmem:

code:
  mov [r9+rdx*8+04],#8787 // New Code
  mov eax,[r9+rdx*8+04]
  jmp return

RdPhantomShardAmtInUsePhantShardMenu:
  jmp newmem
return:
registersymbol(RdPhantomShardAmtInUsePhantShardMenu)

[DISABLE]

RdPhantomShardAmtInUsePhantShardMenu:
  db 41 8B 44 D1 04

unregistersymbol(RdPhantomShardAmtInUsePhantShardMenu)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+3F845B

hnk.exe+3F8442: 48 03 C0        - add rax,rax
hnk.exe+3F8445: 8B D1           - mov edx,ecx
hnk.exe+3F8447: 66 45 39 14 C1  - cmp [r9+rax*8],r10w
hnk.exe+3F844C: 74 0A           - je hnk.exe+3F8458
hnk.exe+3F844E: FF C1           - inc ecx
hnk.exe+3F8450: 41 3B C8        - cmp ecx,r8d
hnk.exe+3F8453: 72 EB           - jb hnk.exe+3F8440
hnk.exe+3F8455: 33 C0           - xor eax,eax
hnk.exe+3F8457: C3              - ret 
hnk.exe+3F8458: 48 03 D2        - add rdx,rdx
// ---------- INJECTING HERE ----------
hnk.exe+3F845B: 41 8B 44 D1 04  - mov eax,[r9+rdx*8+04]
// ---------- DONE INJECTING  ----------
hnk.exe+3F8460: C3              - ret 
hnk.exe+3F8461: CC              - int 3 
hnk.exe+3F8462: CC              - int 3 
hnk.exe+3F8463: CC              - int 3 
hnk.exe+3F8464: CC              - int 3 
hnk.exe+3F8465: CC              - int 3 
hnk.exe+3F8466: CC              - int 3 
hnk.exe+3F8467: CC              - int 3 
hnk.exe+3F8468: CC              - int 3 
hnk.exe+3F8469: CC              - int 3 
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>12</ID>
      <Description>"All equipped Master Quartz to verge of level up upon starting battle"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-08
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadMasterQrtzXPWhenStartingBattle,hnk.exe,8B 69 04 4C 89 A4 24 88 04 00 00 41 89 69 1C) // should be unique
alloc(newmem,$1000)

label(code)
label(dothis)
label(return)

newmem:

code:
  mov ebp,[rcx+04]
  // check if you're already on the verge of lvl up
  cmp [rcx+04],#611911
  je dothis
  cmp [rcx+04],#494801
  je dothis
  cmp [rcx+04],#397879
  je dothis
  cmp [rcx+04],#322027
  je dothis
  cmp [rcx+04],#257229
  je dothis
  cmp [rcx+04],#202369
  je dothis
  cmp [rcx+04],#156387
  je dothis
  cmp [rcx+04],#127340
  je dothis
  cmp [rcx+04],#107407
  je dothis
  cmp [rcx+04],#97019
  je dothis
  // check which threshold you're in between
  cmp [rcx+04],#611911
  jge dothis
  mov ebp,#611911
  cmp [rcx+04],#494801
  jge dothis
  mov ebp,#494801
  cmp [rcx+04],#397879
  jge dothis
  mov ebp,#397879
  cmp [rcx+04],#322027
  jge dothis
  mov ebp,#322027
  cmp [rcx+04],#257229
  jge dothis
  mov ebp,#257229
  cmp [rcx+04],#202369
  jge dothis
  mov ebp,#202369
  cmp [rcx+04],#156387
  jge dothis
  mov ebp,#156387
  cmp [rcx+04],#127340
  jge dothis
  mov ebp,#127340
  cmp [rcx+04],#107407
  jge dothis
  mov ebp,#107407
  cmp [rcx+04],#97019
  jge dothis
  mov ebp,#97019

dothis:
  mov [rcx+04],ebp
  mov ebp,[rcx+04]
  mov [rsp+00000488],r12
  mov [r9+1C],ebp
  jmp return

ReadMasterQrtzXPWhenStartingBattle:
  jmp far newmem
  nop
return:
registersymbol(ReadMasterQrtzXPWhenStartingBattle)

[DISABLE]

ReadMasterQrtzXPWhenStartingBattle:
  db 8B 69 04 4C 89 A4 24 88 04 00 00 41 89 69 1C

unregistersymbol(ReadMasterQrtzXPWhenStartingBattle)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+16D74D

hnk.exe+16D72B: 48 03 C8                 - add rcx,rax
hnk.exe+16D72E: EB 18                    - jmp hnk.exe+16D748
hnk.exe+16D730: 66 41 83 FF 4F           - cmp r15w,4F
hnk.exe+16D735: 77 19                    - ja hnk.exe+16D750
hnk.exe+16D737: 41 8B CE                 - mov ecx,r14d
hnk.exe+16D73A: 48 81 C1 1B AC 07 00     - add rcx,0007AC1B
hnk.exe+16D741: 48 C1 E1 04              - shl rcx,04
hnk.exe+16D745: 48 03 CB                 - add rcx,rbx
hnk.exe+16D748: 48 85 C9                 - test rcx,rcx
hnk.exe+16D74B: 74 03                    - je hnk.exe+16D750
// ---------- INJECTING HERE ----------
hnk.exe+16D74D: 8B 69 04                 - mov ebp,[rcx+04]
// ---------- DONE INJECTING  ----------
hnk.exe+16D750: 4C 89 A4 24 88 04 00 00  - mov [rsp+00000488],r12
hnk.exe+16D758: 41 89 69 1C              - mov [r9+1C],ebp
hnk.exe+16D75C: 48 85 D2                 - test rdx,rdx
hnk.exe+16D75F: 75 39                    - jne hnk.exe+16D79A
hnk.exe+16D761: B8 0F 27 00 00           - mov eax,0000270F
hnk.exe+16D766: 66 3B F0                 - cmp si,ax
hnk.exe+16D769: 74 2F                    - je hnk.exe+16D79A
hnk.exe+16D76B: 41 B8 FF 03 00 00        - mov r8d,000003FF
hnk.exe+16D771: 48 8D 15 E0 2A AC 00     - lea rdx,[hnk.exe+C30258]
hnk.exe+16D778: 48 8D 4C 24 30           - lea rcx,[rsp+30]
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>11</ID>
      <Description>"Master Quartz to verge of level up upon highlighting it in Quartz menu"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-08
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadMasterQrtzXPAmtUponHighlight,hnk.exe,8B 48 04 0F B6 00 FE C0 89 8D 98 01 00 00) // should be unique
alloc(newmem,$1000)

label(code)
label(dothis)
label(return)

newmem:

code:
  mov ecx,[rax+04]
  // check if you're already on the verge of lvl up
  cmp [rax+04],#611911
  je dothis
  cmp [rax+04],#494801
  je dothis
  cmp [rax+04],#397879
  je dothis
  cmp [rax+04],#322027
  je dothis
  cmp [rax+04],#257229
  je dothis
  cmp [rax+04],#202369
  je dothis
  cmp [rax+04],#156387
  je dothis
  cmp [rax+04],#127340
  je dothis
  cmp [rax+04],#107407
  je dothis
  cmp [rax+04],#97019
  je dothis
  // check which threshold you're in between
  cmp [rax+04],#611911
  jge dothis
  mov ecx,#611911
  cmp [rax+04],#494801
  jge dothis
  mov ecx,#494801
  cmp [rax+04],#397879
  jge dothis
  mov ecx,#397879
  cmp [rax+04],#322027
  jge dothis
  mov ecx,#322027
  cmp [rax+04],#257229
  jge dothis
  mov ecx,#257229
  cmp [rax+04],#202369
  jge dothis
  mov ecx,#202369
  cmp [rax+04],#156387
  jge dothis
  mov ecx,#156387
  cmp [rax+04],#127340
  jge dothis
  mov ecx,#127340
  cmp [rax+04],#107407
  jge dothis
  mov ecx,#107407
  cmp [rax+04],#97019
  jge dothis
  mov ecx,#97019

dothis:
  mov [rax+04],ecx
  mov ecx,[rax+04]
  movzx eax,byte ptr [rax]
  inc al
  mov [rbp+00000198],ecx
  jmp return

ReadMasterQrtzXPAmtUponHighlight:
  jmp far newmem
return:
registersymbol(ReadMasterQrtzXPAmtUponHighlight)

[DISABLE]

ReadMasterQrtzXPAmtUponHighlight:
  db 8B 48 04 0F B6 00 FE C0 89 8D 98 01 00 00

unregistersymbol(ReadMasterQrtzXPAmtUponHighlight)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+6A80D4

hnk.exe+6A80B2: 0F B7 C6              - movzx eax,si
hnk.exe+6A80B5: 66 2B C1              - sub ax,cx
hnk.exe+6A80B8: 66 83 F8 4F           - cmp ax,4F
hnk.exe+6A80BC: 77 42                 - ja hnk.exe+6A8100
hnk.exe+6A80BE: 48 8D 86 1B AC 07 00  - lea rax,[rsi+0007AC1B]
hnk.exe+6A80C5: 48 C1 E0 04           - shl rax,04
hnk.exe+6A80C9: 49 03 C7              - add rax,r15
hnk.exe+6A80CC: 4C 8B F6              - mov r14,rsi
hnk.exe+6A80CF: 48 85 C0              - test rax,rax
hnk.exe+6A80D2: 74 2F                 - je hnk.exe+6A8103
// ---------- INJECTING HERE ----------
hnk.exe+6A80D4: 8B 48 04              - mov ecx,[rax+04]
// ---------- DONE INJECTING  ----------
hnk.exe+6A80D7: 0F B6 00              - movzx eax,byte ptr [rax]
hnk.exe+6A80DA: FE C0                 - inc al
hnk.exe+6A80DC: 89 8D 98 01 00 00     - mov [rbp+00000198],ecx
hnk.exe+6A80E2: 0F B6 D0              - movzx edx,al
hnk.exe+6A80E5: 49 8B CF              - mov rcx,r15
hnk.exe+6A80E8: E8 13 A3 CA FF        - call hnk.exe+352400
hnk.exe+6A80ED: 44 8B E0              - mov r12d,eax
hnk.exe+6A80F0: 8B 85 98 01 00 00     - mov eax,[rbp+00000198]
hnk.exe+6A80F6: 44 3B E0              - cmp r12d,eax
hnk.exe+6A80F9: 72 08                 - jb hnk.exe+6A8103
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>3</ID>
      <Description>"200 CP on any change in battle (applies to friend AND foe)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-07
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(WriteToCPUponUsage,hnk.exe,66 89 93 30 04 00 00 48 8B 5C 24 30 48 83 C4 20) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov dx,#200
  mov [rbx+00000430],dx
  mov rbx,[rsp+30]
  add rsp,20
  jmp return

WriteToCPUponUsage:
  jmp far newmem
  nop 2
return:
registersymbol(WriteToCPUponUsage)

[DISABLE]

WriteToCPUponUsage:
  db 66 89 93 30 04 00 00 48 8B 5C 24 30 48 83 C4 20

unregistersymbol(WriteToCPUponUsage)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+F1031

hnk.exe+F100F: 48 8B D8              - mov rbx,rax
hnk.exe+F1012: 75 DC                 - jne hnk.exe+F0FF0
hnk.exe+F1014: 0F B7 83 30 04 00 00  - movzx eax,word ptr [rbx+00000430]
hnk.exe+F101B: 33 C9                 - xor ecx,ecx
hnk.exe+F101D: 0F B7 93 32 04 00 00  - movzx edx,word ptr [rbx+00000432]
hnk.exe+F1024: 2B C7                 - sub eax,edi
hnk.exe+F1026: 85 C0                 - test eax,eax
hnk.exe+F1028: 0F 4F C8              - cmovg ecx,eax
hnk.exe+F102B: 3B CA                 - cmp ecx,edx
hnk.exe+F102D: 66 0F 4C D1           - cmovl dx,cx
// ---------- INJECTING HERE ----------
hnk.exe+F1031: 66 89 93 30 04 00 00  - mov [rbx+00000430],dx
// ---------- DONE INJECTING  ----------
hnk.exe+F1038: 48 8B 5C 24 30        - mov rbx,[rsp+30]
hnk.exe+F103D: 48 83 C4 20           - add rsp,20
hnk.exe+F1041: 5F                    - pop rdi
hnk.exe+F1042: C3                    - ret 
hnk.exe+F1043: CC                    - int 3 
hnk.exe+F1044: CC                    - int 3 
hnk.exe+F1045: CC                    - int 3 
hnk.exe+F1046: CC                    - int 3 
hnk.exe+F1047: CC                    - int 3 
hnk.exe+F1048: CC                    - int 3 
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>84</ID>
      <Description>"Minigame cheats"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>81</ID>
          <Description>"(Vantage Masters) instantly make enemy master have 1 HP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-11
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(ReadEnemyMasterHP,hnk.exe,41 0F B7 81 7C 03 00 00 66) // should be unique
alloc(newmem,$1000,ReadEnemyMasterHP)

label(code)
label(return)

newmem:

code:
  mov word ptr [r9+0000037C],#1 // New Code
  movzx eax,word ptr [r9+0000037C]
  jmp return

ReadEnemyMasterHP:
  jmp newmem
  nop 3
return:
registersymbol(ReadEnemyMasterHP)

[DISABLE]

ReadEnemyMasterHP:
  db 41 0F B7 81 7C 03 00 00

unregistersymbol(ReadEnemyMasterHP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+4594EA

hnk.exe+4594C0: 41 0F B7 C0              - movzx eax,r8w
hnk.exe+4594C4: 4D 8B 0C C2              - mov r9,[r10+rax*8]
hnk.exe+4594C8: 49 8B 81 68 03 00 00     - mov rax,[r9+00000368]
hnk.exe+4594CF: 66 83 78 02 02           - cmp word ptr [rax+02],02
hnk.exe+4594D4: 74 0D                    - je hnk.exe+4594E3
hnk.exe+4594D6: 66 41 FF C0              - inc r8w
hnk.exe+4594DA: 66 41 83 F8 07           - cmp r8w,07
hnk.exe+4594DF: 72 DF                    - jb hnk.exe+4594C0
hnk.exe+4594E1: EB 25                    - jmp hnk.exe+459508
hnk.exe+4594E3: 80 B9 E6 06 00 00 2E     - cmp byte ptr [rcx+000006E6],2E
// ---------- INJECTING HERE ----------
hnk.exe+4594EA: 41 0F B7 81 7C 03 00 00  - movzx eax,word ptr [r9+0000037C]
// ---------- DONE INJECTING  ----------
hnk.exe+4594F2: 66 89 81 EA 06 00 00     - mov [rcx+000006EA],ax
hnk.exe+4594F9: 75 0D                    - jne hnk.exe+459508
hnk.exe+4594FB: 66 83 F8 0A              - cmp ax,0A
hnk.exe+4594FF: 0F 9E C0                 - setle al
hnk.exe+459502: 88 81 15 08 00 00        - mov [rcx+00000815],al
hnk.exe+459508: 4C 8B 89 68 01 00 00     - mov r9,[rcx+00000168]
hnk.exe+45950F: 90                       - nop 
hnk.exe+459510: 0F B7 C2                 - movzx eax,dx
hnk.exe+459513: 4D 8B 04 C1              - mov r8,[r9+rax*8]
hnk.exe+459517: 49 8B 80 68 03 00 00     - mov rax,[r8+00000368]
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>82</ID>
          <Description>"(Pom Party) Instant 200 CP on activation (safe to leave on during Pom Party)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : hnk.exe
  Version: 
  Date   : 2023-07-13
  Author : chausies

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(PomPartyReadYourCP,hnk.exe,83 B9 44 8C 00 00 64) // should be unique
alloc(newmem,$1000,PomPartyReadYourCP)

label(code)
label(return)

newmem:

code:
  mov dword ptr [rcx+00008C44],#200 // New Code
  cmp dword ptr [rcx+00008C44],64
  jmp return

PomPartyReadYourCP:
  jmp newmem
  nop 2
return:
registersymbol(PomPartyReadYourCP)

[DISABLE]

PomPartyReadYourCP:
  db 83 B9 44 8C 00 00 64

unregistersymbol(PomPartyReadYourCP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: hnk.exe+431564

hnk.exe+431533: 0F 29 B4 24 80 00 00 00     - movaps [rsp+00000080],xmm6
hnk.exe+43153B: 45 33 ED                    - xor r13d,r13d
hnk.exe+43153E: 44 0F 29 44 24 60           - movaps [rsp+60],xmm8
hnk.exe+431544: 48 8B D9                    - mov rbx,rcx
hnk.exe+431547: F3 44 0F 10 05 B4 C3 83 00  - movss xmm8,[hnk.exe+C6D904]
hnk.exe+431550: 0F 57 F6                    - xorps xmm6,xmm6
hnk.exe+431553: 85 C0                       - test eax,eax
hnk.exe+431555: 0F 84 5E 03 00 00           - je hnk.exe+4318B9
hnk.exe+43155B: 83 F8 06                    - cmp eax,06
hnk.exe+43155E: 0F 84 55 03 00 00           - je hnk.exe+4318B9
// ---------- INJECTING HERE ----------
hnk.exe+431564: 83 B9 44 8C 00 00 64        - cmp dword ptr [rcx+00008C44],64
// ---------- DONE INJECTING  ----------
hnk.exe+43156B: 0F 8C 48 03 00 00           - jl hnk.exe+4318B9
hnk.exe+431571: 83 B9 48 8C 00 00 64        - cmp dword ptr [rcx+00008C48],64
hnk.exe+431578: 0F 8C 3B 03 00 00           - jl hnk.exe+4318B9
hnk.exe+43157E: 48 8B 41 10                 - mov rax,[rcx+10]
hnk.exe+431582: 44 39 A8 14 0A 00 00        - cmp [rax+00000A14],r13d
hnk.exe+431589: 0F 85 2A 03 00 00           - jne hnk.exe+4318B9
hnk.exe+43158F: E8 8C 89 42 00              - call hnk.exe+859F20
hnk.exe+431594: 41 8D 55 21                 - lea edx,[r13+21]
hnk.exe+431598: 48 8B C8                    - mov rcx,rax
hnk.exe+43159B: 45 8D 45 02                 - lea r8d,[r13+02]
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>83</ID>
          <Description>"protag2 beach minigame ticket pointer"</Description>
          <VariableType>Byte</VariableType>
          <Address>hnk.exe+E837F4</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
