Untitled conversation
- User
{ Game : S.T.A.L.K.E.R.: X-Ray Multiplayer Extension Version: Date : 2024-01-02 Author : Sora
This script does blah blah blah }
define(address,"xrGame.dll"+580961) define(bytes,FF 8E 24 08 00 00)
[ENABLE]
assert(address,bytes) alloc(newmem,$1000)
label(code) label(return)
newmem:
code: dec [esi+00000824] jmp return
address: jmp newmem nop return:
[DISABLE]
address: db bytes // dec [esi+00000824]
dealloc(newmem)
{ // ORIGINAL CODE - INJECTION POINT: xrGame.dll+580961
xrGame.dll+58093B: C7 41 FC 00 00 00 00 - mov [ecx-04],00000000 xrGame.dll+580942: 8B 41 C8 - mov eax,[ecx-38] xrGame.dll+580945: 85 C0 - test eax,eax xrGame.dll+580947: 74 11 - je xrGame.dll+58095A xrGame.dll+580949: FF 08 - dec [eax] xrGame.dll+58094B: 8B 41 C8 - mov eax,[ecx-38] xrGame.dll+58094E: 83 38 00 - cmp dword ptr [eax],00 xrGame.dll+580951: 75 07 - jne xrGame.dll+58095A xrGame.dll+580953: C7 41 C8 00 00 00 00 - mov [ecx-38],00000000 xrGame.dll+58095A: 83 86 6C 08 00 00 C4 - add dword ptr [esi+0000086C],-3C // ---------- INJECTING HERE ---------- xrGame.dll+580961: FF 8E 24 08 00 00 - dec [esi+00000824] // ---------- DONE INJECTING ---------- xrGame.dll+580967: 5F - pop edi xrGame.dll+580968: 5E - pop esi xrGame.dll+580969: 83 C4 18 - add esp,18 xrGame.dll+58096C: C2 08 00 - ret 0008 xrGame.dll+58096F: CC - int 3 xrGame.dll+580970: D9 81 D8 07 00 00 - fld dword ptr [ecx+000007D8] xrGame.dll+580976: C3 - ret xrGame.dll+580977: CC - int 3 xrGame.dll+580978: CC - int 3 xrGame.dll+580979: CC - int 3 }
- Assistant
This script is for the S.T.A.L.K.E.R.: X-Ray Multiplayer Extension game and it modifies a specific function in the xrGame DLL.
The script enables dynamic code injection into the game by finding the memory address of the function xrGame.dll+580961 and replacing the bytes at that address with the specified code.
The code in the script changes the behavior of the game by decrementing the value at the memory address [esi+00000824]. It then redirects the execution flow to the original code.
The [ENABLE] section allocates memory for the new code, labels the original code and the return point, and defines the new code that will be injected at the specified address. It then jumps to the new code and returns back to the original code.
The [DISABLE] section restores the original bytes at the address, deallocates the allocated memory, and returns the game to its original state.
Note that this script is just an example and may not work as intended depending on the game's code structure and version. Some modifications may be required to adapt it to specific game versions.
- User
Нужно заморозить и установить значение на 99
- Assistant
To freeze and set a value to 99, you can modify the provided script as follows:
pascaldefine(address, "xrGame.dll"+580961) define(bytes, "FF 8E 24 08 00 00") define(newValue, 99) [ENABLE] assert(address, bytes) alloc(newmem, $1000) label(code) label(return) newmem: code: mov dword ptr [esi+00000824], newValue ; Stores the new value at the specified address jmp return address: jmp newmem nop return: [DISABLE] address: db bytes // mov dword ptr [esi+00000824], newValue dealloc(newmem)This modified script will set the value at memory address
[esi+00000824]to 99. Make sure to replacenewValuewith the desired value you want to set.Please note that modifying game memory can be against the game's terms of service or considered cheating. Use this script responsibly and ensure you have permission to modify the game.