<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"SharedCode_Health_O2"</Description>
      <LastState Activated="0"/>
      <Color>80000008</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem_comparisons,2048)
label(returnhere)
label(originalcode)
label(infiniteo2)
label(infinitehealth)
label(cheat)

label(info2enable)
label(infhealthenable)
registersymbol(info2enable)
registersymbol(infhealthenable)

newmem_comparisons: //this is allocated memory, you have read,write,execute access
cmp [esi+64],2
je infiniteo2
cmp [esi+64],1
je infinitehealth
jmp originalcode

infiniteo2:
cmp [info2enable],1
je cheat
jmp originalcode

infinitehealth:
cmp [infhealthenable],1,
je cheat
jmp originalcode

originalcode:
movss [esi+6C],xmm0
jmp returnhere

cheat:
mov eax,[esi+58]
mov [esi+6C],eax
jmp returnhere

info2enable:
dd 0
infhealthenable:
dd 0

"BorderlandsPreSequel.exe"+843E52:
jmp newmem_comparisons
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"BorderlandsPreSequel.exe"+843E52:
movss [esi+6C],xmm0

unregistersymbol(info2enable)
unregistersymbol(infhealthenable)
//Alt: db F3 0F 11 46 6C
</AssemblerScript>
      <Hotkeys>
        <Hotkey>
          <Action>Activate</Action>
          <Keys>
            <Key>16</Key>
            <Key>112</Key>
          </Keys>
          <Description>enable main script</Description>
          <ID>0</ID>
        </Hotkey>
        <Hotkey>
          <Action>Activate</Action>
          <Keys>
            <Key>16</Key>
            <Key>113</Key>
          </Keys>
          <Description>enable main script</Description>
          <ID>1</ID>
        </Hotkey>
      </Hotkeys>
      <CheatEntries>
        <CheatEntry>
          <ID>2</ID>
          <Description>"Infinite Health (  hotkey: SHIFT+F1  )"</Description>
          <LastState Activated="0"/>
          <Color>80000008</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
infhealthenable:
dd 01

[DISABLE]
infhealthenable:
dd 00
</AssemblerScript>
          <Hotkeys>
            <Hotkey>
              <Action>Toggle Activation</Action>
              <Keys>
                <Key>16</Key>
                <Key>112</Key>
              </Keys>
              <Description>toggle Infinite Health</Description>
              <ID>0</ID>
            </Hotkey>
          </Hotkeys>
        </CheatEntry>
        <CheatEntry>
          <ID>1</ID>
          <Description>"Infinite O2 (  hotkey: SHIFT+F2  )"</Description>
          <LastState Activated="0"/>
          <Color>80000008</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
info2enable:
dd 01

[DISABLE]
info2enable:
dd 00
</AssemblerScript>
          <Hotkeys>
            <Hotkey>
              <Action>Toggle Activation</Action>
              <Keys>
                <Key>16</Key>
                <Key>113</Key>
              </Keys>
              <Description>toggle Infinite O2</Description>
              <ID>0</ID>
            </Hotkey>
          </Hotkeys>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
