KF2-Ranked-Patch/README.md
2024-04-25 12:16:14 +03:00

52 lines
9.8 KiB
Markdown

# KF2-Ranked-Patch
Makes kf2 server ranked
## Legal
Use of this patch violates the [KF2 EULA](https://store.steampowered.com/eula/232090_eula_0) provisions that prohibit disassembling or modifying game files.
If this is a problem for you, use [SafeMutLoader](https://github.com/GenZmeY/KF2-SafeMutLoader/), which is completely legal.
## Linux
### Dependencies
- any GNU/Linux OS;
- dd, readelf, hexdump;
- Killing Floor 2 server.
### Usage
1. install dependencies (dd, readelf, hexdump) using your OS's package manager;
2. copy [kf2-ranked-patch](kf2-ranked-patch) to your server;
3. make it executable: `chmod +x kf2-ranked-patch`;
4. run it like this: `./kf2-ranked-patch <path_to_KFGameSteamServer.bin.x86_64>`.
## Windows
### Dependencies
- OS Windows
- Killing Floor 2 server;
- Hex editor (for example this one: [HxD](https://mh-nexus.de/en/hxd/)).
### Usage
1. Open `<kf2_server_dir>\Binaries\Win64\KFServer.exe` in a Hex editor;
2. [Patch1] Find and replace the following sequence (in hex mode):
Find:
```hex
48 83 ec 28 81 89 e0 04 00 00 00 00 00 08 48 8b 0d 9b 17 9f 00 48 8d 15 d4 e0 72 00 e8 3f a3 4b ff 48 8b 0d 90 84 cc 00 e8 e3 40 57 ff 48 85 c0 74 0c 48 8b c8 48 83 c4 28 e9 02 27 e3 ff 48 83 c4 28 c3
```
Replace:
```hex
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 c3
```
3. [Patch2] Find and replace the following sequence (in hex mode):
Find:
```hex
48 8b c4 55 41 56 41 57 48 8d 68 a1 48 81 ec 90 00 00 00 48 c7 45 d7 fe ff ff ff 48 89 58 08 48 89 70 10 48 89 78 18 4c 89 60 20 4d 8b f9 4d 8b f0 48 8b da 48 8d 15 51 d5 70 00 48 8d 4d ff e8 9c e0 3f ff 90 48 8d 15 24 35 71 00 48 8d 4d ef e8 8b e0 3f ff 90 48 8b cb e8 72 9a 4b ff 48 8b c8 48 8d 55 1f e8 06 e3 40 ff 90 48 8d 55 0f 48 8b c8 e8 29 33 42 ff 90 45 33 e4 4c 89 65 27 48 8b 4d 1f 48 85 c9 74 09 e8 63 d3 43 ff 4c 89 65 1f 8b 45 07 85 c0 74 28 7f 20 4c 8d 0d ff 0f 37 00 41 b8 45 02 00 00 48 8d 15 5a 19 37 00 48 8d 0d 93 19 37 00 e8 e6 9b 4a ff 48 8b 5d ff eb 07 48 8d 1d d9 0f 37 00 8b 45 17 85 c0 74 28 7f 20 4c 8d 0d c9 0f 37 00 41 b8 45 02 00 00 48 8d 15 24 19 37 00 48 8d 0d 5d 19 37 00 e8 b0 9b 4a ff 48 8b 4d 0f eb 07 48 8d 0d a3 0f 37 00 48 8b d3 ff 15 ba e8 35 00 85 c0 74 7d 8b 45 f7 85 c0 74 28 7f 20 4c 8d 0d 86 0f 37 00 41 b8 45 02 00 00 48 8d 15 e1 18 37 00 48 8d 0d 1a 19 37 00 e8 6d 9b 4a ff 48 8b 5d ef eb 07 48 8d 1d 60 0f 37 00 8b 45 17 85 c0 74 28 7f 20 4c 8d 0d 50 0f 37 00 41 b8 45 02 00 00 48 8d 15 ab 18 37 00 48 8d 0d e4 18 37 00 e8 37 9b 4a ff 48 8b 4d 0f eb 07 48 8d 0d 2a 0f 37 00 48 8b d3 ff 15 41 e8 35 00 85 c0 0f 85 56 03 00 00 41 8b f4 41 8b 46 08 49 8b fc 85 c0 0f 8e 98 01 00 00 0f 1f 80 00 00 00 00 48 85 ff 78 0d 3b f0 7c 29 48 85 ff 75 04 85 c0 74 20 4c 8d 0d e7 0e 37 00 41 b8 52 02 00 00 48 8d 15 42 18 37 00 48 8d 0d 7b 18 37 00 e8 ce 9a 4a ff 49 8b 0e 48 8b 0c f9 e8 f2 98 4b ff 48 8b c8 48 8d 55 2f e8 86 e1 40 ff 90 48 8d 55 df 48 8b c8 e8 a9 31 42 ff 90 4c 89 65 37 48 8b 4d 2f 48 85 c9 74 09 e8 e6 d1 43 ff 4c 89 65 2f 8b 45 07 85 c0 74 28 7f 20 4c 8d 0d 82 0e 37 00 41 b8 45 02 00 00 48 8d 15 dd 17 37 00 48 8d 0d 16 18 37 00 e8 69 9a 4a ff 48 8b 5d ff eb 07 48 8d 1d 5c 0e 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d 4c 0e 37 00 41 b8 45 02 00 00 48 8d 15 a7 17 37 00 48 8d 0d e0 17 37 00 e8 33 9a 4a ff 48 8b 4d df eb 07 48 8d 0d 26 0e 37 00 48 8b d3 ff 15 3d e7 35 00 85 c0 74 79 8b 45 f7 85 c0 74 28 7f 20 4c 8d 0d 09 0e 37 00 41 b8 45 02 00 00 48 8d 15 64 17 37 00 48 8d 0d 9d 17 37 00 e8 f0 99 4a ff 48 8b 5d ef eb 07 48 8d 1d e3 0d 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d d3 0d 37 00 41 b8 45 02 00 00 48 8d 15 2e 17 37 00 48 8d 0d 67 17 37 00 e8 ba 99 4a ff 48 8b 4d df eb 07 48 8d 0d ad 0d 37 00 48 8b d3 ff 15 c4 e6 35 00 85 c0 75 28 4c 89 65 e7 48 8b 4d df 48 85 c9 74 09 e8 de d0 43 ff 4c 89 65 df ff c6 48 ff c7 41 8b 46 08 3b f0 7d 0e e9 78 fe ff ff 4c 89 65 e7 e9 9e 01 00 00 41 8b f4 41 8b 47 08 49 8b fc 85 c0 0f 8e 9f 01 00 00 48 85 ff 78 0d 3b f0 7c 29 48 85 ff 75 04 85 c0 74 20 4c 8d 0d 44 0d 37 00 41 b8 52 02 00 00 48 8d 15 9f 16 37 00 48 8d 0d d8 16 37 00 e8 2b 99 4a ff 49 8b 0f 48 8b 0c f9 e8 4f 97 4b ff 48 8b c8 48 8d 55 2f e8 e3 df 40 ff 90 48 8d 55 df 48 8b c8 e8 06 30 42 ff 90 4c 89 65 37 48 8b 4d 2f 48 85 c9 74 09 e8 43 d0 43 ff 4c 89 65 2f 8b 45 07 85 c0 74 28 7f 20 4c 8d 0d df 0c 37 00 41 b8 45 02 00 00 48 8d 15 3a 16 37 00 48 8d 0d 73 16 37 00 e8 c6 98 4a ff 48 8b 5d ff eb 07 48 8d 1d b9 0c 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d a9 0c 37 00 41 b8 45 02 00 00 48 8d 15 04 16 37 00 48 8d 0d 3d 16 37 00 e8 90 98 4a ff 48 8b 4d df eb 07 48 8d 0d 83 0c 37 00 48 8b d3 ff 15 9a e5 35 00 85 c0 74 79 8b 45 f7 85 c0 74 28 7f 20 4c 8d 0d 66 0c 37 00 41 b8 45 02 00 00 48 8d 15 c1 15 37 00 48 8d 0d fa 15 37 00 e8 4d 98 4a ff 48 8b 5d ef eb 07 48 8d 1d 40 0c 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d 30 0c 37 00 41 b8 45 02 00 00 48 8d 15 8b 15 37 00 48 8d 0d c4 15 37 00 e8 17 98 4a ff 48 8b 4d df eb 07 48 8d 0d 0a 0c 37 00 48 8b d3 ff 15 21 e5 35 00 85 c0 75 28 4c 89 65 e7 48 8b 4d df 48 85 c9 74 09 e8 3b cf 43 ff 4c 89 65 df ff c6 48 ff c7 41 8b 47 08 3b f0 7d 1c e9 78 fe ff ff 4c 89 65 e7 48 8b 4d df 48 85 c9 74 05 e8 13 cf 43 ff 41 8b dc eb 05 bb 01 00 00 00 4c 89 65 17 48 8b 4d 0f 48 85 c9 74 09 e8 f7 ce 43 ff 4c 89 65 0f 4c 89 65 f7 48 8b 4d ef 48 85 c9 74 09 e8 e1 ce 43 ff 4c 89 65 ef 4c 89 65 07 48 8b 4d ff 48 85 c9 74 05 e8 cb ce 43 ff 8b c3 4c 8d 9c 24 90 00 00 00 49 8b 5b 20 49 8b 73 28 49 8b 7b 30 4d 8b 63 38 49 8b e3 41 5f 41 5e 5d c3
```
Replace:
```hex
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 48 31 C0 B8 01 00 00 00 C3
```
## Notes
- Game updates and integrity checks replace the executable file (`KFGameSteamServer.bin.x86_64` / `KFServer.exe`) with original one, so after these events the patch must be applied again.
## License
[![license](https://img.shields.io/github/license/GenZmeY/KF2-Ranked-Patch)](LICENSE)