Table of Contents

About

The following analysis and cheat script makes it possible to grant and revoke infinite ammo to the player using a LUA script that patches the game memory during runtime.

Analysis

By using a pistol and shooting rounds while searching for the overall ammo for the gun (the remaining clip), the game seems to contain three memory locations that seem to hold the current value of the remaining clips.

During a run, the addresses have been reduced to:

25402FE83D8
25428FD0A60
25430696C60

all of them holding the value of the current ammo clip.

By inspecting the last address and looking at what operations access the last address 25430696C60 while firing the pistol, one single entry seems to pop up. By disassembling the program memory around the address 25430696C60, the following function is found that seems to be responsible with changing the amount of ammo that the player has:

SaintsRow.exe+8FB300 - 4C 8B DC              - mov r11,rsp
SaintsRow.exe+8FB303 - 53                    - push rbx
SaintsRow.exe+8FB304 - 56                    - push rsi
SaintsRow.exe+8FB305 - 57                    - push rdi
SaintsRow.exe+8FB306 - 41 56                 - push r14
SaintsRow.exe+8FB308 - 48 83 EC 68           - sub rsp,68 { 104 }
SaintsRow.exe+8FB30C - 48 63 F2              - movsxd  rsi,edx
SaintsRow.exe+8FB30F - 41 8B F9              - mov edi,r9d
SaintsRow.exe+8FB312 - 41 8B D8              - mov ebx,r8d
SaintsRow.exe+8FB315 - 4C 8B F1              - mov r14,rcx
SaintsRow.exe+8FB318 - 83 FE 0E              - cmp esi,0E { 14 }
SaintsRow.exe+8FB31B - 0F84 92020000         - je SaintsRow.exe+8FB5B3
SaintsRow.exe+8FB321 - 49 89 6B 08           - mov [r11+08],rbp
SaintsRow.exe+8FB325 - 4D 8D 4B 10           - lea r9,[r11+10]
SaintsRow.exe+8FB329 - 48 8B AC 24 B8000000  - mov rbp,[rsp+000000B8]
SaintsRow.exe+8FB331 - 4D 8D 43 B8           - lea r8,[r11-48]
SaintsRow.exe+8FB335 - 4D 89 63 18           - mov [r11+18],r12
SaintsRow.exe+8FB339 - 8B D6                 - mov edx,esi
SaintsRow.exe+8FB33B - 4D 89 7B D8           - mov [r11-28],r15
SaintsRow.exe+8FB33F - 8B 45 00              - mov eax,[rbp+00]
SaintsRow.exe+8FB342 - 41 89 43 10           - mov [r11+10],eax
SaintsRow.exe+8FB346 - E8 05040000           - call SaintsRow.exe+8FB750
SaintsRow.exe+8FB34B - 4C 8D 4C 24 44        - lea r9,[rsp+44]
SaintsRow.exe+8FB350 - C6 44 24 38 00        - mov byte ptr [rsp+38],00 { 0 }
SaintsRow.exe+8FB355 - 4C 8D 84 24 98000000  - lea r8,[rsp+00000098]
SaintsRow.exe+8FB35D - 89 74 24 20           - mov [rsp+20],esi
SaintsRow.exe+8FB361 - 48 8D 94 24 98000000  - lea rdx,[rsp+00000098]
SaintsRow.exe+8FB369 - 49 8B CE              - mov rcx,r14
SaintsRow.exe+8FB36C - E8 1FFCFFFF           - call SaintsRow.exe+8FAF90
SaintsRow.exe+8FB371 - 44 8B 64 24 40        - mov r12d,[rsp+40]
SaintsRow.exe+8FB376 - 44 8B 7C 24 44        - mov r15d,[rsp+44]
SaintsRow.exe+8FB37B - 83 FE 08              - cmp esi,08 { 8 }
SaintsRow.exe+8FB37E - 74 26                 - je SaintsRow.exe+8FB3A6
SaintsRow.exe+8FB380 - 83 FB FF              - cmp ebx,-01 { 255 }
SaintsRow.exe+8FB383 - 7D 07                 - jnl SaintsRow.exe+8FB38C
SaintsRow.exe+8FB385 - BB FFFFFFFF           - mov ebx,FFFFFFFF { -1 }
SaintsRow.exe+8FB38A - EB 07                 - jmp SaintsRow.exe+8FB393
SaintsRow.exe+8FB38C - 41 3B DF              - cmp ebx,r15d
SaintsRow.exe+8FB38F - 41 0F4F DF            - cmovg ebx,r15d
SaintsRow.exe+8FB393 - 83 FF FF              - cmp edi,-01 { 255 }
SaintsRow.exe+8FB396 - 7D 07                 - jnl SaintsRow.exe+8FB39F
SaintsRow.exe+8FB398 - BF FFFFFFFF           - mov edi,FFFFFFFF { -1 }
SaintsRow.exe+8FB39D - EB 07                 - jmp SaintsRow.exe+8FB3A6
SaintsRow.exe+8FB39F - 41 3B FC              - cmp edi,r12d
SaintsRow.exe+8FB3A2 - 41 0F4F FC            - cmovg edi,r12d
SaintsRow.exe+8FB3A6 - 80 BC 24 B0000000 00  - cmp byte ptr [rsp+000000B0],00 { 0 }
SaintsRow.exe+8FB3AE - 0F85 BD000000         - jne SaintsRow.exe+8FB471
SaintsRow.exe+8FB3B4 - 8D 46 F7              - lea eax,[rsi-09]
SaintsRow.exe+8FB3B7 - 83 F8 03              - cmp eax,03 { 3 }
SaintsRow.exe+8FB3BA - 77 09                 - ja SaintsRow.exe+8FB3C5
SaintsRow.exe+8FB3BC - 41 8B 86 7C050000     - mov eax,[r14+0000057C]
SaintsRow.exe+8FB3C3 - EB 07                 - jmp SaintsRow.exe+8FB3CC
SaintsRow.exe+8FB3C5 - 41 8B 86 78050000     - mov eax,[r14+00000578]
SaintsRow.exe+8FB3CC - 3B F0                 - cmp esi,eax
SaintsRow.exe+8FB3CE - 0F85 9D000000         - jne SaintsRow.exe+8FB471
SaintsRow.exe+8FB3D4 - 4C 8B 05 ED86C104     - mov r8,[SaintsRow.exe+5513AC8] { (253DA0F6240) }
SaintsRow.exe+8FB3DB - 49 8B C6              - mov rax,r14
SaintsRow.exe+8FB3DE - 49 81 C0 C0710000     - add r8,000071C0 { 29120 }
SaintsRow.exe+8FB3E5 - 4C 89 44 24 50        - mov [rsp+50],r8
SaintsRow.exe+8FB3EA - 49 2B 40 28           - sub rax,[r8+28]
SaintsRow.exe+8FB3EE - 41 8B 88 B4000000     - mov ecx,[r8+000000B4]
SaintsRow.exe+8FB3F5 - 48 99                 - cqo 
SaintsRow.exe+8FB3F7 - 48 F7 F9              - idiv rcx
SaintsRow.exe+8FB3FA - 89 44 24 58           - mov [rsp+58],eax
SaintsRow.exe+8FB3FE - 0F28 44 24 50         - movaps xmm0,[rsp+50]
SaintsRow.exe+8FB403 - 8B C8                 - mov ecx,eax
SaintsRow.exe+8FB405 - 66 0F7F 44 24 50      - movdqa [rsp+50],xmm0
SaintsRow.exe+8FB40B - 49 8B 40 78           - mov rax,[r8+78]
SaintsRow.exe+8FB40F - 8B 14 88              - mov edx,[rax+rcx*4]
SaintsRow.exe+8FB412 - 89 94 24 98000000     - mov [rsp+00000098],edx
SaintsRow.exe+8FB419 - 81 E2 FFFFFF3F        - and edx,3FFFFFFF { 2.00 }
SaintsRow.exe+8FB41F - 48 8D 0C D2           - lea rcx,[rdx+rdx*8]
SaintsRow.exe+8FB423 - 48 C1 E1 04           - shl rcx,04 { 4 }
SaintsRow.exe+8FB427 - 48 03 0D 1AE55403     - add rcx,[SaintsRow.exe+3E49948] { (2542B7B0000) }
SaintsRow.exe+8FB42E - E8 AD8BB5FF           - call SaintsRow.AK::ReadBytesSkip::Count+56A0
SaintsRow.exe+8FB433 - 48 85 C0              - test rax,rax
SaintsRow.exe+8FB436 - 0F84 62010000         - je SaintsRow.exe+8FB59E
SaintsRow.exe+8FB43C - 49 8B 0E              - mov rcx,[r14]
SaintsRow.exe+8FB43F - 48 8D 14 76           - lea rdx,[rsi+rsi*2]
SaintsRow.exe+8FB443 - 48 03 D2              - add rdx,rdx
SaintsRow.exe+8FB446 - 8B 54 D1 2C           - mov edx,[rcx+rdx*8+2C]
SaintsRow.exe+8FB44A - 83 FA 08              - cmp edx,08 { 8 }
SaintsRow.exe+8FB44D - 0F84 4B010000         - je SaintsRow.exe+8FB59E
SaintsRow.exe+8FB453 - 0FB6 8C 24 C0000000   - movzx ecx,byte ptr [rsp+000000C0]
SaintsRow.exe+8FB45B - 44 8B CB              - mov r9d,ebx
SaintsRow.exe+8FB45E - 89 4C 24 30           - mov [rsp+30],ecx
SaintsRow.exe+8FB462 - 45 33 C0              - xor r8d,r8d
SaintsRow.exe+8FB465 - 48 8B C8              - mov rcx,rax
SaintsRow.exe+8FB468 - 89 7C 24 20           - mov [rsp+20],edi
SaintsRow.exe+8FB46C - E8 6F231E01           - call SaintsRow.exe+1ADD7E0
SaintsRow.exe+8FB471 - 8B 05 6D32DA02        - mov eax,[SaintsRow.exe+369E6E4] { (0) }
SaintsRow.exe+8FB477 - 39 45 00              - cmp [rbp+00],eax
SaintsRow.exe+8FB47A - 75 0C                 - jne SaintsRow.exe+8FB488
SaintsRow.exe+8FB47C - 8B D6                 - mov edx,esi
SaintsRow.exe+8FB47E - 49 8B CE              - mov rcx,r14
SaintsRow.exe+8FB481 - E8 AA030000           - call SaintsRow.exe+8FB830
SaintsRow.exe+8FB486 - EB 08                 - jmp SaintsRow.exe+8FB490
SaintsRow.exe+8FB488 - 48 8B CD              - mov rcx,rbp
SaintsRow.exe+8FB48B - E8 603AB8FF           - call SaintsRow.exe+47EEF0
SaintsRow.exe+8FB490 - 48 8B E8              - mov rbp,rax
SaintsRow.exe+8FB493 - 48 85 C0              - test rax,rax
SaintsRow.exe+8FB496 - 0F84 02010000         - je SaintsRow.exe+8FB59E
SaintsRow.exe+8FB49C - 8B CE                 - mov ecx,esi
SaintsRow.exe+8FB49E - E8 ADA3FFFF           - call SaintsRow.exe+8F5850
SaintsRow.exe+8FB4A3 - 48 85 C0              - test rax,rax
SaintsRow.exe+8FB4A6 - 0F84 F2000000         - je SaintsRow.exe+8FB59E
SaintsRow.exe+8FB4AC - 44 8B 85 8C000000     - mov r8d,[rbp+0000008C]
SaintsRow.exe+8FB4B3 - 48 8B C8              - mov rcx,rax
SaintsRow.exe+8FB4B6 - 8B 95 88000000        - mov edx,[rbp+00000088]
SaintsRow.exe+8FB4BC - E8 4FA2FFFF           - call SaintsRow.exe+8F5710
SaintsRow.exe+8FB4C1 - 48 85 C0              - test rax,rax
SaintsRow.exe+8FB4C4 - 0F84 D4000000         - je SaintsRow.exe+8FB59E
SaintsRow.exe+8FB4CA - 80 BC 24 C0000000 00  - cmp byte ptr [rsp+000000C0],00 { 0 }
SaintsRow.exe+8FB4D2 - 0F85 82000000         - jne SaintsRow.exe+8FB55A
SaintsRow.exe+8FB4D8 - 80 3D 9576B404 00     - cmp byte ptr [SaintsRow.exe+5442B74],00 { (0),0 }
SaintsRow.exe+8FB4DF - 89 58 38              - mov [rax+38],ebx
SaintsRow.exe+8FB4E2 - 89 78 40              - mov [rax+40],edi
SaintsRow.exe+8FB4E5 - 0F85 B3000000         - jne SaintsRow.exe+8FB59E
SaintsRow.exe+8FB4EB - 83 BD 88000000 00     - cmp dword ptr [rbp+00000088],00 { 0 }
SaintsRow.exe+8FB4F2 - 75 05                 - jne SaintsRow.exe+8FB4F9
SaintsRow.exe+8FB4F4 - 0F57 C9               - xorps xmm1,xmm1
SaintsRow.exe+8FB4F7 - EB 22                 - jmp SaintsRow.exe+8FB51B
SaintsRow.exe+8FB4F9 - 83 FB FF              - cmp ebx,-01 { 255 }
SaintsRow.exe+8FB4FC - 75 0A                 - jne SaintsRow.exe+8FB508
SaintsRow.exe+8FB4FE - F3 0F10 0D 4224D801   - movss xmm1,[SaintsRow.exe+267D948] { (-1.00) }
SaintsRow.exe+8FB506 - EB 13                 - jmp SaintsRow.exe+8FB51B
SaintsRow.exe+8FB508 - 66 0F6E CB            - movd xmm1,ebx
SaintsRow.exe+8FB50C - 66 41 0F6E C7         - movd xmm0,r15d
SaintsRow.exe+8FB511 - 0F5B C9               - cvtdq2ps xmm1,xmm1
SaintsRow.exe+8FB514 - 0F5B C0               - cvtdq2ps xmm0,xmm0
SaintsRow.exe+8FB517 - F3 0F5E C8            - divss xmm1,xmm0
SaintsRow.exe+8FB51B - F3 0F11 48 3C         - movss [rax+3C],xmm1
SaintsRow.exe+8FB520 - 83 BD 8C000000 00     - cmp dword ptr [rbp+0000008C],00 { 0 }
SaintsRow.exe+8FB527 - 75 09                 - jne SaintsRow.exe+8FB532
SaintsRow.exe+8FB529 - C7 40 44 00000000     - mov [rax+44],00000000 { 0 }
SaintsRow.exe+8FB530 - EB 6C                 - jmp SaintsRow.exe+8FB59E
SaintsRow.exe+8FB532 - 83 FF FF              - cmp edi,-01 { 255 }
SaintsRow.exe+8FB535 - 75 09                 - jne SaintsRow.exe+8FB540
SaintsRow.exe+8FB537 - C7 40 44 000080BF     - mov [rax+44],BF800000 { -1.00 }
SaintsRow.exe+8FB53E - EB 5E                 - jmp SaintsRow.exe+8FB59E
SaintsRow.exe+8FB540 - 66 0F6E CF            - movd xmm1,edi
SaintsRow.exe+8FB544 - 66 41 0F6E C4         - movd xmm0,r12d
SaintsRow.exe+8FB549 - 0F5B C9               - cvtdq2ps xmm1,xmm1
SaintsRow.exe+8FB54C - 0F5B C0               - cvtdq2ps xmm0,xmm0
SaintsRow.exe+8FB54F - F3 0F5E C8            - divss xmm1,xmm0
SaintsRow.exe+8FB553 - F3 0F11 48 44         - movss [rax+44],xmm1
SaintsRow.exe+8FB558 - EB 44                 - jmp SaintsRow.exe+8FB59E
SaintsRow.exe+8FB55A - 80 3D 1376B404 00     - cmp byte ptr [SaintsRow.exe+5442B74],00 { (0),0 }
SaintsRow.exe+8FB561 - 89 58 48              - mov [rax+48],ebx
SaintsRow.exe+8FB564 - 75 38                 - jne SaintsRow.exe+8FB59E
SaintsRow.exe+8FB566 - 83 BD 88000000 00     - cmp dword ptr [rbp+00000088],00 { 0 }
SaintsRow.exe+8FB56D - 75 09                 - jne SaintsRow.exe+8FB578
SaintsRow.exe+8FB56F - C7 40 4C 00000000     - mov [rax+4C],00000000 { 0 }
SaintsRow.exe+8FB576 - EB 26                 - jmp SaintsRow.exe+8FB59E
SaintsRow.exe+8FB578 - 83 FB FF              - cmp ebx,-01 { 255 }
SaintsRow.exe+8FB57B - 75 09                 - jne SaintsRow.exe+8FB586
SaintsRow.exe+8FB57D - C7 40 4C 000080BF     - mov [rax+4C],BF800000 { -1.00 }
SaintsRow.exe+8FB584 - EB 18                 - jmp SaintsRow.exe+8FB59E
SaintsRow.exe+8FB586 - 66 0F6E CB            - movd xmm1,ebx
SaintsRow.exe+8FB58A - 66 41 0F6E C7         - movd xmm0,r15d
SaintsRow.exe+8FB58F - 0F5B C9               - cvtdq2ps xmm1,xmm1
SaintsRow.exe+8FB592 - 0F5B C0               - cvtdq2ps xmm0,xmm0
SaintsRow.exe+8FB595 - F3 0F5E C8            - divss xmm1,xmm0
SaintsRow.exe+8FB599 - F3 0F11 48 4C         - movss [rax+4C],xmm1
SaintsRow.exe+8FB59E - 4C 8B A4 24 A0000000  - mov r12,[rsp+000000A0]
SaintsRow.exe+8FB5A6 - 48 8B AC 24 90000000  - mov rbp,[rsp+00000090]
SaintsRow.exe+8FB5AE - 4C 8B 7C 24 60        - mov r15,[rsp+60]
SaintsRow.exe+8FB5B3 - 48 83 C4 68           - add rsp,68 { 104 }
SaintsRow.exe+8FB5B7 - 41 5E                 - pop r14
SaintsRow.exe+8FB5B9 - 5F                    - pop rdi
SaintsRow.exe+8FB5BA - 5E                    - pop rsi
SaintsRow.exe+8FB5BB - 5B                    - pop rbx
SaintsRow.exe+8FB5BC - C3                    - ret

Using the breakpoint feature of Cheat Engine, it can be observed that when the player fires the pistol, the execution proceeds up to the following code block that seems interesting:

SaintsRow.exe+8FB380 - 83 FB FF              - cmp ebx,-01 { 255 }
SaintsRow.exe+8FB383 - 7D 07                 - jnl SaintsRow.exe+8FB38C
SaintsRow.exe+8FB385 - BB FFFFFFFF           - mov ebx,FFFFFFFF { -1 }
SaintsRow.exe+8FB38A - EB 07                 - jmp SaintsRow.exe+8FB393
SaintsRow.exe+8FB38C - 41 3B DF              - cmp ebx,r15d
SaintsRow.exe+8FB38F - 41 0F4F DF            - cmovg ebx,r15d
SaintsRow.exe+8FB393 - 83 FF FF              - cmp edi,-01 { 255 }
SaintsRow.exe+8FB396 - 7D 07                 - jnl SaintsRow.exe+8FB39F
SaintsRow.exe+8FB398 - BF FFFFFFFF           - mov edi,FFFFFFFF { -1 }
SaintsRow.exe+8FB39D - EB 07                 - jmp SaintsRow.exe+8FB3A6

Due to comparing the contents cmp of the register ebx with the value -1 (a byte) and, in case the value is not less jnl, execution flows over a memory write operation mov that sets the value of the register ebx to -1.

Removing the jump jnl by inserting no-operations nop right after the comparison cmp, and padding with nop to match the size, the following code is obtained:

SaintsRow.exe+8FB380 - 83 FB FF              - cmp ebx,-01 { 255 }
SaintsRow.exe+8FB383 - 90                    - nop 
SaintsRow.exe+8FB384 - 90                    - nop 
SaintsRow.exe+8FB385 - BB FFFFFFFF           - mov ebx,FFFFFFFF { -1 }
SaintsRow.exe+8FB38A - EB 07                 - jmp SaintsRow.exe+8FB393
SaintsRow.exe+8FB38C - 41 3B DF              - cmp ebx,r15d
SaintsRow.exe+8FB38F - 41 0F4F DF            - cmovg ebx,r15d
SaintsRow.exe+8FB393 - 83 FF FF              - cmp edi,-01 { 255 }
SaintsRow.exe+8FB396 - 7D 07                 - jnl SaintsRow.exe+8FB39F
SaintsRow.exe+8FB398 - BF FFFFFFFF           - mov edi,FFFFFFFF { -1 }
SaintsRow.exe+8FB39D - EB 07                 - jmp SaintsRow.exe+8FB3A6

Now, by switching to a different weapon in-game using the loadout wheel it is observed that the current ammo counter displays the symbol for inifnity. The infinity symbol is due to other weapons in the game having an infinite ammo clip; for example, the melee weapons on the weapon wheel always display the infinity symbol.

As it turns out, setting the value of the register ebx to the value -1 or FFFFFFFF will have the effect of making the current loaded clip have an infinite size. This is mostly typical for programming, generally speaking, where an invariant is held throughout the code such as the ammo contained within the currently loaded ammo clip is a positive value and then a negative value such as -1 is used as a marker for infinite ammo. By eliminating the jnl an nop sledge is built from the compare instruction cmp, thereby not caring about the result of the comparison, through to the memory move operation mov that sets the contents of the register ebx to -1 and then jumps unconditionally via jmp to the relative address SaintsRow.exe+8FB393.

It is interesting, but the follow-up sequence in the disassembled memory region, proceeds identically (compares to -1, sets the value FFFFFFFF) and as it turns out, that code sequence is reponsible for altering the amount of ammo clips available. However, making the currently loaded clip have an infinite size, is sufficient to obtain the infinite ammo effect such that the patch will be minimized and will only modify the first sequence that changes the size of the currently loaded ammo clip.

One problem is that if the player would save the game at this time, the -1 value representing the size of the current ammo clip, meaning an infinite size, is stored within the save game file making the change permanent. In good tradition, since Cheat Engine is supposed to create trainers, it should be possible to reverse the effects such that the player would be able to switch between infinite ammo and limited ammo in order to train and get better at the game.

First, to generate the LUA script that will patch the game during runtime, the "Auto Assemble" feature is used and then a "Full Injection" template is generated using the Cheat Engine menu. The section marked ENABLE that is meant to activate the trainer is as one would expect it to be:

[ENABLE]
 
assert(address,bytes)
alloc(newmem,$1000,"SaintsRow.exe"+8FB380)
 
label(code)
label(return)
 
newmem:
  mov ebx,FFFFFFFF
  jmp return
 
code:
  //cmp ebx,-01
  //jnl SaintsRow.exe+8FB38C
  //jmp return
 
address:
  cmp ebx,-01
  nop
  nop
  jmp newmem
return:

That is, the code sequence within the code: block will be replaced with:

address:
  cmp ebx,-01
  nop
  nop
  jmp newmem

with the intended effect of preserving the comparison cmp, then sliding using two no operations nop in order to remove the following jnl and then jumping jmp to the newmem code block that is to be injected. The newmem code block will contain:

newmem:
  mov ebx,FFFFFFFF
  jmp return

That is, load up the ebx register with the value FFFFFFFF or -1 and then return back to one operation after jmp newmem in the address code block.

Conversely, the LUA script conveniently also has a DISABLE section where some code can be run whenever the cheat is deactivated:

[DISABLE]
 
label(return)
 
address:
  cmp ebx,-01
  nop
  nop
  jmp newmem
 
newmem:
  mov ebx,00000001
  jmp return
return:
 
// patch remains resident and cannot be uninstalled
//dealloc(newmem)

The DISABLE code block remains the same as the ENABLE code block with the only difference that the newmem code block is now changed to load up the ebx register with the value 1.

It shall be noticed that the original code is not restored. However, that is alright because all the disassembled code corresponds to the currently active memory such that this code will not be a permanent change. When the player saves the game, the current value of the ammo clip is stored to the save game file but the runtime code is obviously discarded.

The benefit is now that the player just needs to activate the cheat in order to make the current ammo clip infinite and then just deactivate the cheat to restore the normal limited ammo clip while the changes are not permanent until the player saves the game (or the game is auto-saved).

Script

{ Game   : SaintsRow.exe
  Version: 1.0
  Date   : 2023-03-02
  Author : Wizardry and Steamworks (wizardry.steamworks@outlook.com)
 
  This script can be toggled to switch between infinite ammo and limited ammo.
}
 
define(address,"SaintsRow.exe"+8FB380)
 
[ENABLE]
 
assert(address,bytes)
alloc(newmem,$1000,"SaintsRow.exe"+8FB380)
 
label(code)
label(return)
 
newmem:
  mov ebx,FFFFFFFF
  jmp return
 
code:
  //cmp ebx,-01
  //jnl SaintsRow.exe+8FB38C
  //jmp return
 
address:
  cmp ebx,-01
  nop
  nop
  jmp newmem
return:
 
[DISABLE]
 
label(return)
 
address:
  cmp ebx,-01
  nop
  nop
  jmp newmem
 
newmem:
  mov ebx,00000001
  jmp return
return:
 
// patch remains resident and cannot be uninstalled
//dealloc(newmem)
 
{
// ORIGINAL CODE - INJECTION POINT: SaintsRow.exe+8FB380
 
SaintsRow.exe+8FB350: C6 44 24 38 00           - mov byte ptr [rsp+38],00
SaintsRow.exe+8FB355: 4C 8D 84 24 98 00 00 00  - lea r8,[rsp+00000098]
SaintsRow.exe+8FB35D: 89 74 24 20              - mov [rsp+20],esi
SaintsRow.exe+8FB361: 48 8D 94 24 98 00 00 00  - lea rdx,[rsp+00000098]
SaintsRow.exe+8FB369: 49 8B CE                 - mov rcx,r14
SaintsRow.exe+8FB36C: E8 1F FC FF FF           - call SaintsRow.exe+8FAF90
SaintsRow.exe+8FB371: 44 8B 64 24 40           - mov r12d,[rsp+40]
SaintsRow.exe+8FB376: 44 8B 7C 24 44           - mov r15d,[rsp+44]
SaintsRow.exe+8FB37B: 83 FE 08                 - cmp esi,08
SaintsRow.exe+8FB37E: 74 26                    - je SaintsRow.exe+8FB3A6
// ---------- INJECTING HERE ----------
SaintsRow.exe+8FB380: 83 FB FF                 - cmp ebx,-01
// ---------- DONE INJECTING  ----------
SaintsRow.exe+8FB383: 7D 07                    - jnl SaintsRow.exe+8FB38C
SaintsRow.exe+8FB385: BB FF FF FF FF           - mov ebx,FFFFFFFF
SaintsRow.exe+8FB38A: EB 07                    - jmp SaintsRow.exe+8FB393
SaintsRow.exe+8FB38C: 41 3B DF                 - cmp ebx,r15d
SaintsRow.exe+8FB38F: 41 0F 4F DF              - cmovg ebx,r15d
SaintsRow.exe+8FB393: 83 FF FF                 - cmp edi,-01
SaintsRow.exe+8FB396: 7D 07                    - jnl SaintsRow.exe+8FB39F
SaintsRow.exe+8FB398: BF FF FF FF FF           - mov edi,FFFFFFFF
SaintsRow.exe+8FB39D: EB 07                    - jmp SaintsRow.exe+8FB3A6
SaintsRow.exe+8FB39F: 41 3B FC                 - cmp edi,r12d
}

cheat_engine/saints_row_2022/infinite_ammo_analysis_and_cheat_script.txt ยท Last modified: 2023/03/02 11:52 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.