<?xml version="1.0" encoding="utf-8"?>
<CheatTable AutoAttach="bloodrayne.exe" CheatEngineTableVersion="52">
  <CheatEntries>
    <CheatEntry>
      <ID>37</ID>
      <Description>"Activate First"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
AOBScanModule(Score, $process, 49 89 7B ** 48 8B D9 8B 90)
assert(Score, 49 89 7B ** 48 8B D9 8B 90)

alloc(newmem, 512, Score)
alloc(ScoreBytes, 7)
alloc(pScore, 8)
alloc(pRayne, 8)

registerSymbol(Score)
registerSymbol(ScoreBytes)
registerSymbol(pScore)
registerSymbol(pRayne)

ScoreBytes:
 readmem(Score, 7)

label(ScoreExit)
label(originalcode)
label(exit)

newmem:
 mov [pScore], rax
 mov rbx, [rcx+290]
 mov [pRayne], rbx

originalcode:
 readmem(Score, 7)

exit:
 jmp ScoreExit

Score:
 jmp newmem
 nop
 nop
 ScoreExit:

[DISABLE]
Score:
 readmem(ScoreBytes, 7)

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>38</ID>
          <Description>"Score"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>pScore</Address>
          <Offsets>
            <Offset>0804</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>34</ID>
          <Description>"Health"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
AOBScanModule(Health, $process, F3 0F 5C C1 F3 0F 11 81 ** ** ** ** 0F 28 C8)
assert(Health, F3 0F 5C C1 F3 0F 11 81 ** ** ** ** 0F 28 C8)

alloc(newmem, 512, Health)
alloc(HealthBytes, 12)

registerSymbol(Health)
registerSymbol(HealthBytes)

HealthBytes:
 readmem(Health, 12)

reflectDamage:
 db 1

label(healPlayer)
label(HealthExit)
label(originalcode)
label(exit)

newmem:

healPlayer:
 movss xmm0, [rcx+284]
 movss [rcx+280], xmm0

 jmp HealthExit

originalcode:
 // Skip readmem(Health, 12)

exit:
 jmp HealthExit

Health:
 jmp newmem
 nop
 nop
 nop
 nop
 nop
 nop
 nop
 HealthExit:

[DISABLE]
Health:
 readmem(HealthBytes, 12)

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>41</ID>
          <Description>"Invulnerability"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
assert($process+12310, B0 01 C3)

$process+12310:
 db B0 00 C3

[DISABLE]
$process+12310:
 db B0 01 C3

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>52</ID>
          <Description>"Hit Kill"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
AOBScanModule(TakeHit, $process, F3 0F 10 47 ** 0F 2F C1 72 2C)
assert(TakeHit, F3 0F 10 47 ** 0F 2F C1 72 2C)

alloc(newmem, 512, TakeHit)
alloc(TakeHitBytes, 5)

registerSymbol(TakeHit)
registerSymbol(TakeHitBytes)

TakeHitBytes:
 readmem(TakeHit, 5)

label(TakeHitExit)
label(originalcode)
label(exit)

newmem:
 cmp rcx, [pRayne]
 je originalcode

 mov [rdi+04], (float)1000.0

originalcode:
 readmem(TakeHit, 5)

exit:
 jmp TakeHitExit

TakeHit:
 jmp newmem
 TakeHitExit:

[DISABLE]
TakeHit:
 readmem(TakeHitBytes, 5)

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>35</ID>
          <Description>"Ammo"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
AOBScanModule(Ammo, $process, FE 8E ** ** ** ** 48 8B CE E8 ** ** ** ** F3)
assert(Ammo, FE 8E ** ** ** ** 48 8B CE E8 ** ** ** ** F3)

alloc(newmem, 512, Ammo)
alloc(AmmoBytes, 6)
alloc(maxAmmo, 1)

registerSymbol(Ammo)
registerSymbol(AmmoBytes)

AmmoBytes:
 readmem(Ammo, 6)

maxAmmo:
 db 5

label(AmmoExit)
label(originalcode)
label(exit)

newmem:
 mov rcx, [maxAmmo]
 cmp [rsi+D10], rcx
 ja @f

 mov rcx, [rsi+D10]
 mov [maxAmmo], rcx

 @@:
 mov [rsi+D10], rcx
 jmp AmmoExit

originalcode:
 // Skip readmem(Ammo, 6)

exit:
 jmp AmmoExit

Ammo:
 jmp newmem
 nop
 AmmoExit:

[DISABLE]
Ammo:
 readmem(AmmoBytes, 6)

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>36</ID>
          <Description>"Moon Jump"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$LUA}
if syntaxcheck then return end

local function getHotkeyFromMemoryRecord()
  local memoryRecord = AddressList.getMemoryRecord("Moon Jump Hotkey")

  if not memoryRecord then
    return VK_SPACE
  end

  return tonumber(memoryRecord.Value)
end

local timer = createTimer(nil)
timer.Interval = 50

timer.OnTimer = function(timer)
  if memrec.Active == false then
    timer.destroy()
    timer = nil
    return
  end

  local hotkey = getHotkeyFromMemoryRecord()
  local moonJumpEnable = getAddressSafe("moonJumpEnable")
  if not moonJumpEnable then return end

  if isKeyPressed(hotkey) then
    writeBytes(moonJumpEnable, 1)
  else
    writeBytes(moonJumpEnable, 0)
  end
end
{$ASM}
AOBScanModule(Gravity, $process, F3 0F 11 69 ** F3 0F 58 61 **)
assert(Gravity, F3 0F 11 69 ** F3 0F 58 61 **)

alloc(newmem, 512, Gravity)
alloc(GravityBytes, 5)
alloc(moonJumpEnable, 1)
alloc(minimumSpeed, 4)
alloc(moonJumpHotkey, 1)

registerSymbol(Gravity)
registerSymbol(GravityBytes)
registerSymbol(moonJumpEnable)
registerSymbol(minimumSpeed)
registerSymbol(moonJumpHotkey)

GravityBytes:
 readmem(Gravity, 5)

moonJumpEnable:
 db 0

minimumSpeed:
 dd (float)25.0

moonJumpHotkey:
 db VK_SPACE

label(GravityExit)
label(originalcode)
label(exit)

newmem:
 cmp byte ptr [moonJumpEnable], 0
 je originalcode

 push rax
 mov rax, [rcx+08]
 cmp qword ptr [pRayne], rax
 pop rax
 jne originalcode

 comiss xmm5, [minimumSpeed]
 ja originalcode

 movss xmm5, [minimumSpeed]

originalcode:
 readmem(Gravity, 5)

exit:
 jmp GravityExit

Gravity:
 jmp newmem
 GravityExit:

[DISABLE]
Gravity:
 readmem(GravityBytes, 5)

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>40</ID>
              <Description>"Moon Jump Hotkey"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">1:VK_LBUTTON
2:VK_RBUTTON
3:VK_CANCEL
4:VK_MBUTTON
5:VK_XBUTTON1
6:VK_XBUTTON2
8:VK_BACK
9:VK_TAB
12:VK_CLEAR
13:VK_RETURN
16:VK_SHIFT
17:VK_CONTROL
18:VK_MENU
19:VK_PAUSE
20:VK_CAPITAL
27:VK_ESCAPE
32:VK_SPACE
33:VK_PRIOR
34:VK_NEXT
35:VK_END
36:VK_HOME
37:VK_LEFT
38:VK_UP
39:VK_RIGHT
40:VK_DOWN
41:VK_SELECT
42:VK_PRINT
43:VK_EXECUTE
44:VK_SNAPSHOT
45:VK_INSERT
46:VK_DELETE
47:VK_HELP
48:VK_0
49:VK_1
50:VK_2
51:VK_3
52:VK_4
53:VK_5
54:VK_6
55:VK_7
56:VK_8
57:VK_9
65:VK_A
66:VK_B
67:VK_C
68:VK_D
69:VK_E
70:VK_F
71:VK_G
72:VK_H
73:VK_I
74:VK_J
75:VK_K
76:VK_L
77:VK_M
78:VK_N
79:VK_O
80:VK_P
81:VK_Q
82:VK_R
83:VK_S
84:VK_T
85:VK_U
86:VK_V
87:VK_W
88:VK_X
89:VK_Y
90:VK_Z
91:VK_LWIN
92:VK_RWIN
93:VK_APPS
96:VK_NUMPAD0
97:VK_NUMPAD1
98:VK_NUMPAD2
99:VK_NUMPAD3
100:VK_NUMPAD4
101:VK_NUMPAD5
102:VK_NUMPAD6
103:VK_NUMPAD7
104:VK_NUMPAD8
105:VK_NUMPAD9
106:VK_MULTIPLY
107:VK_ADD
108:VK_SEPARATOR
109:VK_SUBTRACT
110:VK_DECIMAL
111:VK_DIVIDE
112:VK_F1
113:VK_F2
114:VK_F3
115:VK_F4
116:VK_F5
117:VK_F6
118:VK_F7
119:VK_F8
120:VK_F9
121:VK_F10
122:VK_F11
123:VK_F12
124:VK_F13
125:VK_F14
126:VK_F15
127:VK_F16
128:VK_F17
129:VK_F18
130:VK_F19
131:VK_F20
132:VK_F21
133:VK_F22
134:VK_F23
135:VK_F24
144:VK_NUMLOCK
145:VK_SCROLL
160:VK_LSHIFT
162:VK_LCONTROL
164:VK_LMENU
161:VK_RSHIFT
163:VK_RCONTROL
165:VK_RMENU
0xBA:VK_OEM1
0xBF:VK_OEM2
0xc0:VK_OEM3
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Byte</VariableType>
              <Address>moonJumpHotkey</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>39</ID>
              <Description>"Minimum Upwards Speed"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Float</VariableType>
              <Address>minimumSpeed</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>49</ID>
          <Description>"Running Speed"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
AOBScanModule(moveSpeed, $process, F3 0F 11 71 ** F3 0F 59 E0 F3 0F 11 69 **)
assert(moveSpeed, F3 0F 11 71 ** F3 0F 59 E0 F3 0F 11 69 **)

alloc(newmem, 512, moveSpeed)
alloc(moveSpeedBytes, 5)
alloc(moveSpeedMultiplier, 4)

registerSymbol(moveSpeed)
registerSymbol(moveSpeedBytes)
registerSymbol(moveSpeedMultiplier)

moveSpeedMultiplier:
 dd (float)2.0

moveSpeedBytes:
 readmem(moveSpeed, 5)

label(moveSpeedExit)
label(originalcode)
label(exit)

newmem:
 push rax
 mov rax, [rcx+08]
 cmp qword ptr [pRayne], rax
 pop rax
 jne originalcode

 mulss xmm6, [moveSpeedMultiplier]

originalcode:
 readmem(moveSpeed, 5)

exit:
 jmp moveSpeedExit

moveSpeed:
 jmp newmem
 moveSpeedExit:

[DISABLE]
moveSpeed:
 readmem(moveSpeedBytes, 5)

dealloc(*)
unregisterSymbol(*)
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>50</ID>
              <Description>"Multiplier"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">1:Normal Speed
1.25:A bit faster
1.5:Faster
1.75:A lot faster
2:Double Speed
3:Triple Speed
10:Light Speed
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Float</VariableType>
              <Address>moveSpeedMultiplier</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>42</ID>
      <Description>"Table Making Tools"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>48</ID>
          <Description>"Create Table"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{$LUA}
if syntaxcheck then return end

[ENABLE]
local myScriptTemplate = [[
[START]
AOBScanModule(name, $process, AOBString)
assert(name, AOBString)

alloc(newmem, 512, name)
alloc(nameBytes, numberOfBytes)

registerSymbol(name)
registerSymbol(nameBytes)

nameBytes:
 readmem(name, numberOfBytes)

label(nameExit)
label(originalcode)
label(exit)

newmem:

originalcode:
 readmem(name, numberOfBytes)

exit:
 jmp nameExit

name:
 jmp newmemleftOver
 nameExit:

[FINISH]
name:
 readmem(nameBytes, numberOfBytes)

dealloc(*)
unregisterSymbol(*)
]]

local function calculateBytes(AOBString)
    local address = AOBScanModuleUnique(process, AOBString)
    if not address then
        error("AOBScan failed.")
    end

    local bytes = getInstructionSize(address)
    local stillNeededBytes = 5 - bytes

    while stillNeededBytes &gt; 0 do
        local moreBytes = getInstructionSize(address + bytes)

        bytes = bytes + moreBytes
        stillNeededBytes = stillNeededBytes - moreBytes
    end

    return bytes, - stillNeededBytes
end

local function getNops(number)
    local nops = ""

    while number &gt; 0 do
        nops = nops .. "\n nop"
        number = number - 1
    end

    return nops
end

local function createScript(name, AOBString)
 local memoryRecord = AddressList.getMemoryRecordByDescription(name)
 if memoryRecord then
   print(string.format("A script with name '%s' already exists!", name))
   return
 end

 local numberOfBytes, leftOverBytes = calculateBytes(AOBString)
 local leftOverNops = getNops(leftOverBytes)

 memoryRecord = AddressList.createMemoryRecord()
 memoryRecord.Description = name
 memoryRecord.Type = vtAutoAssembler

 local myScript = myScriptTemplate:gsub("name", name)
                                  :gsub("AOBString", AOBString)
                                  :gsub("numberOfBytes", numberOfBytes)
                                  :gsub("leftOver", leftOverNops)
                                  :gsub("START", "ENABLE")
                                  :gsub("FINISH", "DISABLE")

 memoryRecord.Script = myScript
end


-- createScript(name, AOB)
-- bloodrayne.RayneHealthHud::UpdateScore
createScript(Score, "49 89 7B ** 48 8B D9 8B 90")
-- bloodrayne.Rayne::SubtractHealth
createScript(Health, "F3 0F 5C C1 F3 0F 11 81 ** ** ** ** 0F 28 C8")
-- bloodrayne.frCombatEntity::TakeHit
createScript(TakeHit, "F3 0F 10 47 ** 0F 2F C1 72 2C")
-- bloodrayne.Rayne::UpdateState
createScript(Ammo, "FE 8E ** ** ** ** 48 8B CE E8 ** ** ** ** F3")
-- bloodrayne.wfControllerManager::Update
createScript(Gravity, "F3 0F 11 69 ** F3 0F 58 61 **")
-- bloodrayne.wfControllerManager::Update
createScript(moveSpeed, "F3 0F 10 61 ** 89 41 **")

createThread(function()
 memrec.Active = false
end)
[DISABLE]

</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>32</ID>
          <Description>"Create Single Script"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{$LUA}
if syntaxcheck then return end

[ENABLE]
local myScriptTemplate = [[
[START]
AOBScanModule(name, $process, AOBString)
assert(name, AOBString)

alloc(newmem, 512, name)
alloc(nameBytes, numberOfBytes)

registerSymbol(name)
registerSymbol(nameBytes)

nameBytes:
 readmem(name, numberOfBytes)

label(nameExit)
label(originalcode)
label(exit)

newmem:

originalcode:
 readmem(name, numberOfBytes)

exit:
 jmp nameExit

name:
 jmp newmemleftOver
 nameExit:

[FINISH]
name:
 readmem(nameBytes, numberOfBytes)

dealloc(*)
unregisterSymbol(*)
]]

local function calculateBytes(AOBString)
    local address = AOBScanModuleUnique(process, AOBString)
    if not address then
        error("AOBScan failed.")
    end

    local bytes = getInstructionSize(address)
    local stillNeededBytes = 5 - bytes

    while stillNeededBytes &gt; 0 do
        local moreBytes = getInstructionSize(address + bytes)

        bytes = bytes + moreBytes
        stillNeededBytes = stillNeededBytes - moreBytes
    end

    return bytes, - stillNeededBytes
end

local function getNops(number)
    local nops = ""

    while number &gt; 0 do
        nops = nops .. "\n nop"
        number = number - 1
    end

    return nops
end

local function createScript(name, AOBString)
 local memoryRecord = AddressList.getMemoryRecordByDescription(name)
 if memoryRecord then
   showMessage(string.format("A script with name '%s' already exists!", name))
   return
 end

 local numberOfBytes, leftOverBytes = calculateBytes(AOBString)
 local leftOverNops = getNops(leftOverBytes)

 memoryRecord = AddressList.createMemoryRecord()
 memoryRecord.Description = name
 memoryRecord.Type = vtAutoAssembler

 local myScript = myScriptTemplate:gsub("name", name)
                                  :gsub("AOBString", AOBString)
                                  :gsub("numberOfBytes", numberOfBytes)
                                  :gsub("leftOver", leftOverNops)
                                  :gsub("START", "ENABLE")
                                  :gsub("FINISH", "DISABLE")

 memoryRecord.Script = myScript
end


local name = inputQuery("Name", "Name", "")
local AOB = inputQuery("AOB", "AOB String:", "")

if name and AOB then
 createScript(name, AOB)
end

createThread(function()
 memrec.Active = false
end)
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>44</ID>
          <Description>"pRayne"</Description>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>8 Bytes</VariableType>
          <Address>pRayne</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
