<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>11</ID>
      <Description>"Compact mode"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
--https://forum.cheatengine.org/viewtopic.php?t=570055
LuaCall(function cycleFullCompact(sender,force) local state = not(compactmenuitem.Caption == 'Compact View Mode'); if force~=nil then state = not force end; compactmenuitem.Caption = state and 'Compact View Mode' or 'Full View Mode'; getMainForm().Splitter1.Visible = state; getMainForm().Panel4.Visible    = state; getMainForm().Panel5.Visible    = state; end; function addCompactMenu() if compactmenualreadyexists then return end; local parent = getMainForm().Menu.Items; compactmenuitem = createMenuItem(parent); parent.add(compactmenuitem); compactmenuitem.Caption = 'Compact View Mode'; compactmenuitem.OnClick = cycleFullCompact; compactmenualreadyexists = 'yes'; end; addCompactMenu(); cycleFullCompact(nil,true))

[DISABLE]
LuaCall(cycleFullCompact(nil,false))

</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>12</ID>
      <Description>"Enable (enable twice)"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then
    return
end
if process == nil then
    ShowMessage("Process is not selected.")
elseif readInteger(process) == 0 then
    ShowMessage("Process cannot be opened.")
else
    if monopipe ~= nil and monopipe.ProcessID ~= getOpenedProcessID() then
        monopipe.destroy()
        monopipe = nil
    end
    if monopipe == nil then
        LaunchMonoDataCollector()
    end
end


{$asm}
//define(ResourceManagerClearItemCountsProc, "ResourceManager.ClearItemCounts")
//registersymbol(ResourceManagerClearItemCountsProc)


[DISABLE]
{$lua}
if syntaxcheck then return end;if not syntaxcheck and monopipe then monopipe=nil,monopipe.Destroy()end

{$asm}
unregistersymbol(*)

</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>20</ID>
          <Description>"Get stats"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-29
  Author :
}

[ENABLE]

aobscanregion(INJECT_GET_STATS,Stats:get_value+16,Stats:get_value+86,48 8D 44 88 20) // should be unique
alloc(newmem,$1000,INJECT_GET_STATS)

label(code)
label(return)
label(i_base_stat_addr)

newmem:
  cmp word ptr [i_base_stat_addr], 0
  jne code

  cmp dword ptr [rax+18], #30
  jb code

  cmp dword ptr [rax+18], #36
  ja code

  cmp dword ptr [rax+20], 0
  jne code

  cmp dword ptr [rax+24], 0
  je code

  cmp dword ptr [rax+28], 0
  je code

  mov [i_base_stat_addr], rax

code:
  lea rax,[rax+rcx*4+20]
  jmp return
align 10 cc
  i_base_stat_addr:
  dq 0


INJECT_GET_STATS:
  jmp newmem
return:
registersymbol(INJECT_GET_STATS)
registersymbol(i_base_stat_addr)
[DISABLE]

INJECT_GET_STATS:
  db 48 8D 44 88 20

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Stats:get_value+1f

1C690E6A98C: 00 00                          - add [rax],al
1C690E6A98E: 00 00                          - add [rax],al
Stats:get_value: 48 83 EC 08                    - sub rsp,08
Stats:get_value+4: 48 89 34 24                    - mov [rsp],rsi
Stats:get_value+8: 48 8B F1                       - mov rsi,rcx
Stats:get_value+b: 48 8B 46 20                    - mov rax,[rsi+20]
Stats:get_value+f: 48 63 4E 28                    - movsxd  rcx,dword ptr [rsi+28]
Stats:get_value+13: 48 63 C9                       - movsxd  rcx,ecx
Stats:get_value+16: 39 48 18                       - cmp [rax+18],ecx
Stats:get_value+19: 0F 86 11 00 00 00              - jbe Stats:get_value+30
// ---------- INJECTING HERE ----------
Stats:get_value+1f: 48 8D 44 88 20                 - lea rax,[rax+rcx*4+20]
// ---------- DONE INJECTING  ----------
Stats:get_value+24: 48 63 00                       - movsxd  rax,dword ptr [rax]
Stats:get_value+27: 48 8B 34 24                    - mov rsi,[rsp]
Stats:get_value+2b: 48 83 C4 08                    - add rsp,08
Stats:get_value+2f: C3                             - ret 
Stats:get_value+30: BA 32 00 00 00                 - mov edx,00000032
Stats:get_value+35: B9 46 01 00 00                 - mov ecx,00000146
Stats:get_value+3a: 48 8D 6D 00                    - lea rbp,[rbp+00]
Stats:get_value+3e: 49 BB 60 1F F7 9B C4 01 00 00  - mov r11,000001C49BF71F60
Stats:get_value+48: 41 FF D3                       - call r11
1C690E6A9DB: 00 00                          - add [rax],al
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>21</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>24</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>32</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>28</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>33</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>30</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>31</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>38</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>24</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>48</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>26</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>4C</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>25</ID>
              <Description>"Stamina"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>50</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>28</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>54</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>29</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>58</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>30</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>5C</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>22</ID>
              <Description>"Mana"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>60</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>23</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>64</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>27</ID>
              <Description>"??"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>FF8080</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_stat_addr</Address>
              <Offsets>
                <Offset>70</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>17</ID>
          <Description>"Set min. mana"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-29
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanregion(INJECT_SET_MIN_MANA,StatsMana:Mod+357,StatsMana:Mod+3A7,48 8D 65 00 5D) // should be unique
alloc(newmem,$1000,INJECT_SET_MIN_MANA)

label(code)
label(return i_min_mana)

newmem:
  cmp eax, [i_min_mana]
  jae code
  mov eax, [i_min_mana]

code:
  lea rsp,[rbp+00]
  pop rbp
  jmp return
align 10 cc
  i_min_mana:
  dd 14

INJECT_SET_MIN_MANA:
  jmp newmem
return:
registersymbol(INJECT_SET_MIN_MANA i_min_mana)

[DISABLE]

INJECT_SET_MIN_MANA:
  db 48 8D 65 00 5D

unregistersymbol(INJECT_SET_MIN_MANA i_min_mana)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: StatsMana:Mod+37f

StatsMana:Mod+355: BA 2F 01 00 00                 - mov edx,0000012F
StatsMana:Mod+35a: 45 33 C9                       - xor r9d,r9d
StatsMana:Mod+35d: 83 38 00                       - cmp dword ptr [rax],00
StatsMana:Mod+360: 48 8D 64 24 00                 - lea rsp,[rsp+00]
StatsMana:Mod+365: 90                             - nop 
StatsMana:Mod+366: 49 BB E6 3C C5 68 C6 01 00 00  - mov r11,000001C668C53CE6
StatsMana:Mod+370: 41 FF D3                       - call r11
StatsMana:Mod+373: 48 8B 75 E8                    - mov rsi,[rbp-18]
StatsMana:Mod+377: 48 8B 7D F0                    - mov rdi,[rbp-10]
StatsMana:Mod+37b: 4C 8B 7D F8                    - mov r15,[rbp-08]
// ---------- INJECTING HERE ----------
StatsMana:Mod+37f: 48 8D 65 00                    - lea rsp,[rbp+00]
// ---------- DONE INJECTING  ----------
StatsMana:Mod+383: 5D                             - pop rbp
StatsMana:Mod+384: C3                             - ret 
1C691126705: 00 00                          - add [rax],al
1C691126707: 00 01                          - add [rcx],al
1C691126709: 04 02                          - add al,02
1C69112670B: 05 04 03 01 50                 - add eax,50010304
1C691126710: 00 00                          - add [rax],al
1C691126712: 00 00                          - add [rax],al
1C691126714: 00 00                          - add [rax],al
1C691126716: 00 00                          - add [rax],al
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>18</ID>
              <Description>"value"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_min_mana</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>15</ID>
          <Description>"inf. ability"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript Async="1">{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-29
  Author : bbfox@https://https://opencheattables.com
}

[ENABLE]

aobscan(INJECT_INF_ABILITY,41 2B C8 89 48 2C 49)
alloc(newmem,$1000,INJECT_INF_ABILITY)

label(code)
label(return)

newmem:

code:
  sub ecx,r8d
  //
  cmp ecx, A
  jae @F
  mov ecx, A

@@:
  //
  mov [rax+2C],ecx
  jmp return

INJECT_INF_ABILITY:
  jmp newmem
  nop
return:
registersymbol(INJECT_INF_ABILITY)

[DISABLE]

INJECT_INF_ABILITY:
  db 41 2B C8 89 48 2C

unregistersymbol(INJECT_INF_ABILITY)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Chara:UseAbility+e32

Chara:UseAbility+e0a: 48 C1 F9 25                    - sar rcx,25
Chara:UseAbility+e0e: 48 8B C1                       - mov rax,rcx
Chara:UseAbility+e11: 48 C1 E8 3F                    - shr rax,3F
Chara:UseAbility+e15: 48 03 C1                       - add rax,rcx
Chara:UseAbility+e18: 89 85 50 FF FF FF              - mov [rbp-000000B0],eax
Chara:UseAbility+e1e: E9 15 00 00 00                 - jmp Chara:UseAbility+e38
Chara:UseAbility+e23: 49 8B 45 20                    - mov rax,[r13+20]
Chara:UseAbility+e27: 48 8B D0                       - mov rdx,rax
Chara:UseAbility+e2a: 48 63 48 2C                    - movsxd  rcx,dword ptr [rax+2C]
Chara:UseAbility+e2e: 4D 63 45 30                    - movsxd  r8,dword ptr [r13+30]
// ---------- INJECTING HERE ----------
Chara:UseAbility+e32: 41 2B C8                       - sub ecx,r8d
// ---------- DONE INJECTING  ----------
Chara:UseAbility+e35: 89 48 2C                       - mov [rax+2C],ecx
Chara:UseAbility+e38: 49 8B 4D 20                    - mov rcx,[r13+20]
Chara:UseAbility+e3c: 66 90                          - nop 2
Chara:UseAbility+e3e: 49 BB 00 89 10 91 C6 01 00 00  - mov r11,LayerAbility:SetDirty
Chara:UseAbility+e48: 41 FF D3                       - call r11
Chara:UseAbility+e4b: E9 3B 04 00 00                 - jmp Chara:UseAbility+128b
Chara:UseAbility+e50: 49 8B 45 20                    - mov rax,[r13+20]
Chara:UseAbility+e54: 48 8B C8                       - mov rcx,rax
Chara:UseAbility+e57: 83 38 00                       - cmp dword ptr [rax],00
Chara:UseAbility+e5a: 48 8D 6D 00                    - lea rbp,[rbp+00]
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>2</ID>
          <Description>"Set min. stamina"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-21
  Author :
}

[ENABLE]

aobscanregion(INJECT_SET_STA,Stats:Mod+a0,Stats:Mod+1b0,48 8B CF 48 8B 07) // should be unique
alloc(newmem,$1000,INJECT_SET_STA)

label(code)
label(return)
label(i_min_sta)

newmem:
  push r12
  mov r12d, [rax]
  mov r12, [rdi]

  cmp dword ptr [rdi+18], 3 // stamina
  jne endp
  mov r12d, [i_min_sta]
  cmp [rax], r12d
  jae endp
  mov [rax], r12d

endp:
  pop r12

code:
  mov rcx,rdi
  mov rax,[rdi]
  jmp return
align 10 cc
  i_min_sta:
  dd 8

INJECT_SET_STA:
  jmp newmem
  nop
return:
registersymbol(INJECT_SET_STA)
registersymbol(i_min_sta)

[DISABLE]

INJECT_SET_STA:
  db 48 8B CF 48 8B 07

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Stats:Mod+a9

Stats:Mod+83: FF 90 80 00 00 00  - call qword ptr [rax+00000080]
Stats:Mod+89: 4C 8B F8           - mov r15,rax
Stats:Mod+8c: 48 8B CF           - mov rcx,rdi
Stats:Mod+8f: 48 8B 07           - mov rax,[rdi]
Stats:Mod+92: FF 90 20 01 00 00  - call qword ptr [rax+00000120]
Stats:Mod+98: 48 8B D0           - mov rdx,rax
Stats:Mod+9b: 03 D6              - add edx,esi
Stats:Mod+9d: 48 8B CF           - mov rcx,rdi
Stats:Mod+a0: 48 8B 07           - mov rax,[rdi]
Stats:Mod+a3: FF 90 18 01 00 00  - call qword ptr [rax+00000118]
// ---------- INJECTING HERE ----------
Stats:Mod+a9: 48 8B CF           - mov rcx,rdi
// ---------- DONE INJECTING  ----------
Stats:Mod+ac: 48 8B 07           - mov rax,[rdi]
Stats:Mod+af: FF 90 20 01 00 00  - call qword ptr [rax+00000120]
Stats:Mod+b5: 48 89 45 D8        - mov [rbp-28],rax
Stats:Mod+b9: 48 8B CF           - mov rcx,rdi
Stats:Mod+bc: 48 8B 07           - mov rax,[rdi]
Stats:Mod+bf: FF 90 F8 00 00 00  - call qword ptr [rax+000000F8]
Stats:Mod+c5: 48 8B C8           - mov rcx,rax
Stats:Mod+c8: 48 8B 45 D8        - mov rax,[rbp-28]
Stats:Mod+cc: 3B C1              - cmp eax,ecx
Stats:Mod+ce: 0F 8D 20 00 00 00  - jnl Stats:Mod+f4
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>3</ID>
              <Description>"min. stamina"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_min_sta</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Get HP"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-21
  Author :
}

[ENABLE]

aobscanregion(INJECT_GET_HP,WidgetHP:Refresh+8f, WidgetHP:Refresh+19f, 48 63 40 58 48 89 85 90 FE FF FF) // should be unique
alloc(newmem,$1000,INJECT_GET_HP)

label(code)
label(return)
label(i_base_hp_addr)
newmem:
  mov [i_base_hp_addr], rax

code:
  movsxd  rax,dword ptr [rax+58]
  mov [rbp-00000170],rax
  jmp return
align 10 cc
  i_base_hp_addr:
  dq 0
INJECT_GET_HP:
  jmp newmem
  nop 6
return:
registersymbol(INJECT_GET_HP)
registersymbol(i_base_hp_addr)
[DISABLE]

INJECT_GET_HP:
  db 48 63 40 58 48 89 85 90 FE FF FF

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: WidgetHP:Refresh+9f

WidgetHP:Refresh+6f: 85 C0                          - test eax,eax
WidgetHP:Refresh+71: 0F 85 A6 02 00 00              - jne WidgetHP:Refresh+31d
WidgetHP:Refresh+77: 48 8D AD 00 00 00 00           - lea rbp,[rbp+00000000]
WidgetHP:Refresh+7e: 49 BB 90 FC 45 90 4F 02 00 00  - mov r11,EMono:get_pc
WidgetHP:Refresh+88: 41 FF D3                       - call r11
WidgetHP:Refresh+8b: 48 8B C8                       - mov rcx,rax
WidgetHP:Refresh+8e: 83 39 00                       - cmp dword ptr [rcx],00
WidgetHP:Refresh+91: 48 8B 40 28                    - mov rax,[rax+28]
WidgetHP:Refresh+95: 83 78 18 0E                    - cmp dword ptr [rax+18],0E
WidgetHP:Refresh+99: 0F 86 51 0E 00 00              - jbe WidgetHP:Refresh+ef0
// ---------- INJECTING HERE ----------
WidgetHP:Refresh+9f: 48 63 40 58                    - movsxd  rax,dword ptr [rax+58]
// ---------- DONE INJECTING  ----------
WidgetHP:Refresh+a3: 48 89 85 90 FE FF FF           - mov [rbp-00000170],rax
WidgetHP:Refresh+aa: 48 8D 6D 00                    - lea rbp,[rbp+00]
WidgetHP:Refresh+ae: 49 BB 90 FC 45 90 4F 02 00 00  - mov r11,EMono:get_pc
WidgetHP:Refresh+b8: 41 FF D3                       - call r11
WidgetHP:Refresh+bb: 48 8B C8                       - mov rcx,rax
WidgetHP:Refresh+be: 48 8B 00                       - mov rax,[rax]
WidgetHP:Refresh+c1: FF 90 18 02 00 00              - call qword ptr [rax+00000218]
WidgetHP:Refresh+c7: 48 8B C8                       - mov rcx,rax
WidgetHP:Refresh+ca: 48 8B 85 90 FE FF FF           - mov rax,[rbp-00000170]
WidgetHP:Refresh+d1: 3B C1                          - cmp eax,ecx
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>5</ID>
              <Description>"HP double heal"</Description>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-21
  Author :
}

[ENABLE]

aobscanregion(INJECT_HEAL_HP_MULTI,Card:HealHP+34, Card:HealHP+144, 03 4D 98 49 8B 47 28) // should be unique
alloc(newmem,$1000,INJECT_HEAL_HP_MULTI)

label(code)
label(return)

newmem:
  cmp rax, [i_base_hp_addr]
  jne code
  add ecx,[rbp-68]

code:
  add ecx,[rbp-68]
  mov rax,[r15+28]
  jmp return

INJECT_HEAL_HP_MULTI:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_HEAL_HP_MULTI)

[DISABLE]

INJECT_HEAL_HP_MULTI:
  db 03 4D 98 49 8B 47 28

unregistersymbol(INJECT_HEAL_HP_MULTI)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Card:HealHP+44

Card:HealHP+13: 4C 8B F9              - mov r15,rcx
Card:HealHP+16: 48 89 55 98           - mov [rbp-68],rdx
Card:HealHP+1a: 49 8B F0              - mov rsi,r8
Card:HealHP+1d: C7 45 A0 00 00 00 00  - mov [rbp-60],00000000
Card:HealHP+24: C7 45 A4 00 00 00 00  - mov [rbp-5C],00000000
Card:HealHP+2b: C7 45 A8 00 00 00 00  - mov [rbp-58],00000000
Card:HealHP+32: 49 8B 47 28           - mov rax,[r15+28]
Card:HealHP+36: 83 78 18 0E           - cmp dword ptr [rax+18],0E
Card:HealHP+3a: 0F 86 19 02 00 00     - jbe Card:HealHP+259
Card:HealHP+40: 48 63 48 58           - movsxd  rcx,dword ptr [rax+58]
// ---------- INJECTING HERE ----------
Card:HealHP+44: 03 4D 98              - add ecx,[rbp-68]
// ---------- DONE INJECTING  ----------
Card:HealHP+47: 49 8B 47 28           - mov rax,[r15+28]
Card:HealHP+4b: 83 78 18 0E           - cmp dword ptr [rax+18],0E
Card:HealHP+4f: 0F 86 FD 01 00 00     - jbe Card:HealHP+252
Card:HealHP+55: 89 48 58              - mov [rax+58],ecx
Card:HealHP+58: 49 8B 47 28           - mov rax,[r15+28]
Card:HealHP+5c: 83 78 18 0E           - cmp dword ptr [rax+18],0E
Card:HealHP+60: 0F 86 E5 01 00 00     - jbe Card:HealHP+24b
Card:HealHP+66: 48 63 40 58           - movsxd  rax,dword ptr [rax+58]
Card:HealHP+6a: 48 89 45 90           - mov [rbp-70],rax
Card:HealHP+6e: 49 8B CF              - mov rcx,r15
}
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>7</ID>
              <Description>"HP"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>i_base_hp_addr</Address>
              <Offsets>
                <Offset>58</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>10</ID>
          <Description>"Dag item: set min. stock to X, if &gt; 1"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Elin.exe
  Version: 
  Date   : 2024-12-21
  Author :
}

[ENABLE]

aobscanregion(INJECT_ITEM_DRAG,InvOwner:OnDrag+9b2,InvOwner:OnDrag+ac2,48 63 40 38 48 89 85 48 FF FF FF) // should be unique
alloc(newmem,$1000,INJECT_ITEM_DRAG)

label(code)
label(return i_set_item_to)

newmem:
  cmp dword ptr [rax+38], 1
  je code
  mov ecx, [i_set_item_to]

  cmp dword ptr [rax+38], ecx
  jae code
  mov dword ptr [rax+38], ecx

code:
  movsxd  rax,dword ptr [rax+38]
  mov [rbp-000000B8],rax
  jmp return
align 10 cc
  i_set_item_to:
  dd C

INJECT_ITEM_DRAG:
  jmp newmem
  nop 6
return:
registersymbol(INJECT_ITEM_DRAG i_set_item_to)

[DISABLE]

INJECT_ITEM_DRAG:
  db 48 63 40 38 48 89 85 48 FF FF FF

unregistersymbol(INJECT_ITEM_DRAG i_set_item_to)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: InvOwner:OnDrag+9c2

InvOwner:OnDrag+99f: 85 C0                          - test eax,eax
InvOwner:OnDrag+9a1: 75 07                          - jne InvOwner:OnDrag+9aa
InvOwner:OnDrag+9a3: 33 C0                          - xor eax,eax
InvOwner:OnDrag+9a5: E9 0B 02 00 00                 - jmp InvOwner:OnDrag+bb5
InvOwner:OnDrag+9aa: 49 8B 46 20                    - mov rax,[r14+20]
InvOwner:OnDrag+9ae: 48 8B C8                       - mov rcx,rax
InvOwner:OnDrag+9b1: 83 39 00                       - cmp dword ptr [rcx],00
InvOwner:OnDrag+9b4: 48 8B 40 28                    - mov rax,[rax+28]
InvOwner:OnDrag+9b8: 83 78 18 06                    - cmp dword ptr [rax+18],06
InvOwner:OnDrag+9bc: 0F 86 38 02 00 00              - jbe InvOwner:OnDrag+bfa
// ---------- INJECTING HERE ----------
InvOwner:OnDrag+9c2: 48 63 40 38                    - movsxd  rax,dword ptr [rax+38]
// ---------- DONE INJECTING  ----------
InvOwner:OnDrag+9c6: 48 89 85 48 FF FF FF           - mov [rbp-000000B8],rax
InvOwner:OnDrag+9cd: 48 B9 28 11 AE 92 50 02 00 00  - mov rcx,0000025092AE1128
InvOwner:OnDrag+9d7: 48 8D AD 00 00 00 00           - lea rbp,[rbp+00000000]
InvOwner:OnDrag+9de: 49 BB 10 30 E2 1D 4F 02 00 00  - mov r11,System.Object:__icall_wrapper_ves_icall_object_new_specific
InvOwner:OnDrag+9e8: 41 FF D3                       - call r11
InvOwner:OnDrag+9eb: 4C 8B 8D 48 FF FF FF           - mov r9,[rbp-000000B8]
InvOwner:OnDrag+9f2: 48 89 85 50 FF FF FF           - mov [rbp-000000B0],rax
InvOwner:OnDrag+9f9: 48 8B C8                       - mov rcx,rax
InvOwner:OnDrag+9fc: 49 8B D6                       - mov rdx,r14
InvOwner:OnDrag+9ff: 4D 8B C7                       - mov r8,r15
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>34</ID>
              <Description>"set stock to"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_set_item_to</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>13</ID>
      <Description>"Elin (EA)  /  https://opencheattables.com"</Description>
      <Color>00B500</Color>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
