<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>8</ID>
      <Description>"[ACTIVATE]"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>// Original Code by G40sty.
[ENABLE]
{$lua}
local gameName = "Dead Space"
local gameProcess = "Dead Space.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
--; Auto Attach Process For User
if syntaxcheck then return end
if messageDialog([[
Copyright © 2022 OpenCheatTables.com
Table Creator: Marcus101RR
Would you like to read additional information?
]],mtInformation,mbYes,mbNo) == mrYes then
messageDialog("This information has been added to deter users of FRF (Fearless Revolution Forums) to violate the GPL License. You are hereby informed that use of this table is strictly forbidden from distribution, upload, or alterations with or without consent from this author on FRF. All other sources are allowed with permission.")
else
end


[DISABLE]
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>9</ID>
          <Description>"[POINTERS]"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

define(DS_Player,"Dead Space.exe"+5560418)
define(DS_Difficulty,"Dead Space.exe"+52A90B8 )

registersymbol(DS_Player)
registersymbol(DS_Difficulty)

[DISABLE]
unregistersymbol(DS_Player)
unregistersymbol(DS_Difficulty)



</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>46</ID>
              <Description>"Difficulty"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>DS_Difficulty</Address>
              <Offsets>
                <Offset>24</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>42</ID>
              <Description>"Health"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Float</VariableType>
              <Address>DS_Player</Address>
              <Offsets>
                <Offset>40</Offset>
                <Offset>100</Offset>
                <Offset>C8</Offset>
                <Offset>40</Offset>
                <Offset>28</Offset>
                <Offset>30</Offset>
              </Offsets>
              <CheatEntries>
                <CheatEntry>
                  <ID>47</ID>
                  <Description>"Health"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <VariableType>Float</VariableType>
                  <Address>DS_Player</Address>
                  <Offsets>
                    <Offset>44</Offset>
                    <Offset>100</Offset>
                    <Offset>C8</Offset>
                    <Offset>40</Offset>
                    <Offset>28</Offset>
                    <Offset>30</Offset>
                  </Offsets>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>56</ID>
              <Description>"Max Air Supply"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Float</VariableType>
              <Address>DS_Player</Address>
              <Offsets>
                <Offset>5C</Offset>
                <Offset>DB0</Offset>
                <Offset>C8</Offset>
                <Offset>40</Offset>
                <Offset>28</Offset>
                <Offset>30</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>61</ID>
              <Description>"Air"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Float</VariableType>
              <Address>DS_Player</Address>
              <Offsets>
                <Offset>60</Offset>
                <Offset>DB0</Offset>
                <Offset>C8</Offset>
                <Offset>40</Offset>
                <Offset>28</Offset>
                <Offset>30</Offset>
              </Offsets>
            </CheatEntry>
            <CheatEntry>
              <ID>15</ID>
              <Description>"Inventory Capacity"</Description>
              <Options moHideChildren="1"/>
              <GroupHeader>1</GroupHeader>
              <CheatEntries>
                <CheatEntry>
                  <ID>62</ID>
                  <Description>"Plasma Energy Max"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <VariableType>4 Bytes</VariableType>
                  <Address>DS_Player</Address>
                  <Offsets>
                    <Offset>98</Offset>
                    <Offset>10</Offset>
                    <Offset>20</Offset>
                    <Offset>70</Offset>
                    <Offset>60</Offset>
                    <Offset>30</Offset>
                    <Offset>30</Offset>
                    <Offset>20</Offset>
                    <Offset>38</Offset>
                  </Offsets>
                </CheatEntry>
                <CheatEntry>
                  <ID>64</ID>
                  <Description>"Pulse Rounds Max"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <VariableType>4 Bytes</VariableType>
                  <Address>DS_Player</Address>
                  <Offsets>
                    <Offset>98</Offset>
                    <Offset>40</Offset>
                    <Offset>20</Offset>
                    <Offset>70</Offset>
                    <Offset>60</Offset>
                    <Offset>30</Offset>
                    <Offset>30</Offset>
                    <Offset>20</Offset>
                    <Offset>38</Offset>
                  </Offsets>
                </CheatEntry>
                <CheatEntry>
                  <ID>66</ID>
                  <Description>"Flamethrower Fuel"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <VariableType>4 Bytes</VariableType>
                  <Address>DS_Player</Address>
                  <Offsets>
                    <Offset>98</Offset>
                    <Offset>70</Offset>
                    <Offset>20</Offset>
                    <Offset>70</Offset>
                    <Offset>60</Offset>
                    <Offset>30</Offset>
                    <Offset>30</Offset>
                    <Offset>20</Offset>
                    <Offset>38</Offset>
                  </Offsets>
                </CheatEntry>
                <CheatEntry>
                  <ID>65</ID>
                  <Description>"Line Gun Max"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <VariableType>4 Bytes</VariableType>
                  <Address>DS_Player</Address>
                  <Offsets>
                    <Offset>98</Offset>
                    <Offset>A0</Offset>
                    <Offset>20</Offset>
                    <Offset>70</Offset>
                    <Offset>60</Offset>
                    <Offset>30</Offset>
                    <Offset>30</Offset>
                    <Offset>20</Offset>
                    <Offset>38</Offset>
                  </Offsets>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>51</ID>
          <Description>"[SCRIPTS]"</Description>
          <Options moHideChildren="1"/>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>72</ID>
              <Description>"No Decreased Items"</Description>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : Dead Space.exe
  Version: 
  Date   : 2023-02-13
  Author : Administrator

  Decrease item
}

[ENABLE]

aobscanmodule(iDecreaseItem,Dead Space.exe,2B C6 48 8B CF 8B D0 41) // should be unique
registersymbol(iDecreaseItem)

iDecreaseItem:
  db 90 90

[DISABLE]

iDecreaseItem:
  db 2B C6

unregistersymbol(iDecreaseItem)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Dead Space.exe+1C1BA61

Dead Space.exe+1C1BA40: FF 10                 - call qword ptr [rax]
Dead Space.exe+1C1BA42: 4C 8D 05 07 55 98 03  - lea r8,["Dead Space.exe"+55A0F50]
Dead Space.exe+1C1BA49: 48 8B D3              - mov rdx,rbx
Dead Space.exe+1C1BA4C: 48 8B C8              - mov rcx,rax
Dead Space.exe+1C1BA4F: E8 9C 0B 55 00        - call "Dead Space.exe"+216C5F0
Dead Space.exe+1C1BA54: 48 8B C8              - mov rcx,rax
Dead Space.exe+1C1BA57: EB 02                 - jmp "Dead Space.exe"+1C1BA5B
Dead Space.exe+1C1BA59: 33 C9                 - xor ecx,ecx
Dead Space.exe+1C1BA5B: 48 8B 01              - mov rax,[rcx]
Dead Space.exe+1C1BA5E: FF 50 18              - call qword ptr [rax+18]
// ---------- INJECTING HERE ----------
Dead Space.exe+1C1BA61: 2B C6                 - sub eax,esi
// ---------- DONE INJECTING  ----------
Dead Space.exe+1C1BA63: 48 8B CF              - mov rcx,rdi
Dead Space.exe+1C1BA66: 8B D0                 - mov edx,eax
Dead Space.exe+1C1BA68: 41 FF D6              - call r14
Dead Space.exe+1C1BA6B: 48 8B 4D 77           - mov rcx,[rbp+77]
Dead Space.exe+1C1BA6F: 48 8D 55 8F           - lea rdx,[rbp-71]
Dead Space.exe+1C1BA73: 48 8B 01              - mov rax,[rcx]
Dead Space.exe+1C1BA76: FF 50 30              - call qword ptr [rax+30]
Dead Space.exe+1C1BA79: E9 38 01 00 00        - jmp "Dead Space.exe"+1C1BBB6
Dead Space.exe+1C1BA7E: 48 85 DB              - test rbx,rbx
Dead Space.exe+1C1BA81: 74 1F                 - je "Dead Space.exe"+1C1BAA2
}
</AssemblerScript>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>23</ID>
          <Description>"[DEBUG]"</Description>
          <Options moHideChildren="1"/>
          <Color>0000FF</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>41</ID>
              <Description>"Fetch Base Addresses"</Description>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{$lua}
if syntaxcheck then return end
[ENABLE]
  print(string.format("Fetching Base Addresses..."))

  local aobList = {
  "48 8B 05 ?? ?? ?? ?? 48 8B 88 A8 00 00 00 48 8B 99 A8 00 00 00 4C 8B B1 B0 00 00 00 49 3B DE",
  "48 8B 05 ?? ?? ?? ?? 8B 50 24"
  }
  local aobNames = {
  "DS_Player",
  "DS_Difficulty"
  }
  local xbase = readInteger(process)and GetAddress(process)
  print(string.format("Base: %X",xbase))
  for i = 1, #aobList do
        local aob = AOBScan(aobList[i],"+X*C*W")
        local instruct = getAddressSafe(aob[0])
        local distance = getAddressSafe(instruct)+3
        distance = readInteger(distance)

        local instructSize = getInstructionSize(instruct)

        local address = (instruct + distance + instructSize) - xbase
        print(string.format("%s: %s+%X",aobNames[i],process,address))
  end
[DISABLE]
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>48</ID>
              <Description>"Get Max Ammo"</Description>
              <Options moHideChildren="1"/>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : Dead Space.exe
  Version: 
  Date   : 2023-01-31
  Author : Administrator

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(getMaxAmmo,Dead Space.exe,45 8B 8E 98 00 00 00) // should be unique
alloc(newmem,$64,getMaxAmmo)

label(code)
label(return)

label(gMaxAmmo)
registersymbol(gMaxAmmo)

newmem:

code:
  mov [gMaxAmmo],r14
  mov r9d,[r14+00000098]
  jmp return

gMaxAmmo:
  dq 0

getMaxAmmo:
  jmp newmem
  nop 2
return:
registersymbol(getMaxAmmo)

[DISABLE]

getMaxAmmo:
  db 45 8B 8E 98 00 00 00

unregistersymbol(getMaxAmmo)
dealloc(newmem)
unregistersymbol(gMaxAmmo)

{
// ORIGINAL CODE - INJECTION POINT: Dead Space.exe+D6B14B

Dead Space.exe+D6B126: 5B                    - pop rbx
Dead Space.exe+D6B127: C3                    - ret 
Dead Space.exe+D6B128: 49 8B 4D 50           - mov rcx,[r13+50]
Dead Space.exe+D6B12C: 48 8D 54 24 28        - lea rdx,[rsp+28]
Dead Space.exe+D6B131: 4D 8B C7              - mov r8,r15
Dead Space.exe+D6B134: E8 87 1A EE 00        - call "Dead Space.exe"+1C4CBC0
Dead Space.exe+D6B139: 48 8B 4C 24 28        - mov rcx,[rsp+28]
Dead Space.exe+D6B13E: 4C 8D 43 38           - lea r8,[rbx+38]
Dead Space.exe+D6B142: 49 8D 56 48           - lea rdx,[r14+48]
Dead Space.exe+D6B146: E8 A5 45 ED 00        - call "Dead Space.exe"+1C3F6F0
// ---------- INJECTING HERE ----------
Dead Space.exe+D6B14B: 45 8B 8E 98 00 00 00  - mov r9d,[r14+00000098]
// ---------- DONE INJECTING  ----------
Dead Space.exe+D6B152: 44 8B C0              - mov r8d,eax
Dead Space.exe+D6B155: 85 C0                 - test eax,eax
Dead Space.exe+D6B157: 74 0E                 - je "Dead Space.exe"+D6B167
Dead Space.exe+D6B159: 33 D2                 - xor edx,edx
Dead Space.exe+D6B15B: 41 F7 F1              - div r9d
Dead Space.exe+D6B15E: 41 0F AF C1           - imul eax,r9d
Dead Space.exe+D6B162: 44 2B C0              - sub r8d,eax
Dead Space.exe+D6B165: EB 03                 - jmp "Dead Space.exe"+D6B16A
Dead Space.exe+D6B167: 45 8B C1              - mov r8d,r9d
Dead Space.exe+D6B16A: 48 8B 7C 24 28        - mov rdi,[rsp+28]
}
</AssemblerScript>
              <CheatEntries>
                <CheatEntry>
                  <ID>49</ID>
                  <Description>"No description"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <VariableType>4 Bytes</VariableType>
                  <Address>gMaxAmmo</Address>
                  <Offsets>
                    <Offset>98</Offset>
                  </Offsets>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>53</ID>
              <Description>"Auto Assemble script"</Description>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : Dead Space.exe
  Version: 
  Date   : 2023-02-01
  Author : Administrator

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(INJECT,Dead Space.exe,8B 81 98 01 00 00 C3 CC 48) // should be unique
alloc(newmem,$64,INJECT)

label(code)
label(return)

newmem:

code:
  mov eax,[rcx+00000198]
  jmp return

INJECT:
  jmp newmem
  nop
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
  db 8B 81 98 01 00 00

unregistersymbol(INJECT)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Dead Space.exe+B90660

Dead Space.exe+B90647: 48 8B 5C 24 30        - mov rbx,[rsp+30]
Dead Space.exe+B9064C: 48 8B 6C 24 38        - mov rbp,[rsp+38]
Dead Space.exe+B90651: 48 8B 74 24 40        - mov rsi,[rsp+40]
Dead Space.exe+B90656: 48 83 C4 20           - add rsp,20
Dead Space.exe+B9065A: 5F                    - pop rdi
Dead Space.exe+B9065B: C3                    - ret 
Dead Space.exe+B9065C: CC                    - int 3 
Dead Space.exe+B9065D: CC                    - int 3 
Dead Space.exe+B9065E: CC                    - int 3 
Dead Space.exe+B9065F: CC                    - int 3 
// ---------- INJECTING HERE ----------
Dead Space.exe+B90660: 8B 81 98 01 00 00     - mov eax,[rcx+00000198]
// ---------- DONE INJECTING  ----------
Dead Space.exe+B90666: C3                    - ret 
Dead Space.exe+B90667: CC                    - int 3 
Dead Space.exe+B90668: 48 81 E9 78 01 00 00  - sub rcx,00000178
Dead Space.exe+B9066F: E9 EC FF FF FF        - jmp "Dead Space.exe"+B90660
Dead Space.exe+B90674: CC                    - int 3 
Dead Space.exe+B90675: CC                    - int 3 
Dead Space.exe+B90676: CC                    - int 3 
Dead Space.exe+B90677: CC                    - int 3 
Dead Space.exe+B90678: CC                    - int 3 
Dead Space.exe+B90679: CC                    - int 3 
}
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>54</ID>
              <Description>"Auto Assemble script"</Description>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>{ Game   : Dead Space.exe
  Version: 
  Date   : 2023-02-01
  Author : Administrator

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(INJECT,Dead Space.exe,44 8B 7F 58 48 8B 58 78) // should be unique
alloc(newmem,$1000,INJECT)

label(code)
label(return)

newmem:

code:
  mov r15d,[rdi+58]
  mov rbx,[rax+78]
  jmp return

INJECT:
  jmp newmem
  nop 3
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
  db 44 8B 7F 58 48 8B 58 78

unregistersymbol(INJECT)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Dead Space.exe+A07124

Dead Space.exe+A070F3: 48 8D 54 24 70           - lea rdx,[rsp+70]
Dead Space.exe+A070F8: 48 89 9C 24 A0 01 00 00  - mov [rsp+000001A0],rbx
Dead Space.exe+A07100: 4D 8B C6                 - mov r8,r14
Dead Space.exe+A07103: 4C 89 BC 24 60 01 00 00  - mov [rsp+00000160],r15
Dead Space.exe+A0710B: 48 8B 48 70              - mov rcx,[rax+70]
Dead Space.exe+A0710F: 44 8B 49 48              - mov r9d,[rcx+48]
Dead Space.exe+A07113: 48 8B CE                 - mov rcx,rsi
Dead Space.exe+A07116: E8 75 3C 36 00           - call "Dead Space.exe"+D6AD90
Dead Space.exe+A0711B: 48 8B 47 08              - mov rax,[rdi+08]
Dead Space.exe+A0711F: 48 8B 4C 24 70           - mov rcx,[rsp+70]
// ---------- INJECTING HERE ----------
Dead Space.exe+A07124: 44 8B 7F 58              - mov r15d,[rdi+58]
// ---------- DONE INJECTING  ----------
Dead Space.exe+A07128: 48 8B 58 78              - mov rbx,[rax+78]
Dead Space.exe+A0712C: 48 8B 01                 - mov rax,[rcx]
Dead Space.exe+A0712F: FF 50 10                 - call qword ptr [rax+10]
Dead Space.exe+A07132: 4C 8B C3                 - mov r8,rbx
Dead Space.exe+A07135: 49 8B D6                 - mov rdx,r14
Dead Space.exe+A07138: 4C 8B C8                 - mov r9,rax
Dead Space.exe+A0713B: 48 8B CE                 - mov rcx,rsi
Dead Space.exe+A0713E: E8 CD 3E 36 00           - call "Dead Space.exe"+D6B010
Dead Space.exe+A07143: 41 3B C7                 - cmp eax,r15d
Dead Space.exe+A07146: 44 0F 42 F8              - cmovb r15d,eax
}
</AssemblerScript>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <CheatCodes>
    <CodeEntry>
      <Description>Code :mov edx,[rbx+0C]</Description>
      <AddressString>Dead Space.exe+931A22</AddressString>
      <Before>
        <Byte>08</Byte>
        <Byte>3B</Byte>
        <Byte>FD</Byte>
        <Byte>75</Byte>
        <Byte>EE</Byte>
      </Before>
      <Actual>
        <Byte>8B</Byte>
        <Byte>53</Byte>
        <Byte>0C</Byte>
      </Actual>
      <After>
        <Byte>3B</Byte>
        <Byte>53</Byte>
        <Byte>08</Byte>
        <Byte>74</Byte>
        <Byte>18</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols/>
  <Comments>1.2
- Update for Feb 27 2023
</Comments>
</CheatTable>
