update to 1150v2

This commit is contained in:
GenZmeY 2024-09-02 09:16:50 +03:00
parent c7095d2ed3
commit 482cec4855
Signed by: GenZmeY
GPG Key ID: 424DA4BC3CB2CF39

View File

@ -5,30 +5,47 @@ Makes kf2 server ranked
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
## Warning
Applying this patch may require you to do things like execute a script, edit a binary file, restore execution rights after replacing a file. For this reason, **I can only recommend using this patch if you have full access to the system**, for example if you are using your own server or renting a VPS (virtual private server).
If you are using a game hosting service, then performing the above actions may be difficult or even impossible, so I would recommend using [SafeMutLoader](https://github.com/GenZmeY/KF2-SafeMutLoader/) in this case.
## Applying the patch (easy way)
Take the patched file from the [releases](https://github.com/GenZmeY/KF2-Ranked-Patch/releases):
For windows: `KFGame.exe`
For linux: `KFGameSteamServer.bin.x86_64`
And place it on your server at this path (replace the existing file):
`<kf2-server>/Binaries/Win64`
In the case of a linux system, make sure that after replacing the file has an execution flag and if it does not - add it using `chmod` like this:
`chmod +x <path_to_KFGameSteamServer.bin.x86_64>`
## Applying the patch (manually)
### Linux
#### Dependencies
- any GNU/Linux OS;
- dd, readelf, hexdump;
- Killing Floor 2 server.
### Usage
#### 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
### Windows
#### Dependencies
- OS Windows
- Killing Floor 2 server;
- Hex editor (for example this one: [HxD](https://mh-nexus.de/en/hxd/)).
### Usage
#### 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
48 83 ec 28 81 89 e0 04 00 00 00 00 00 08 48 8b 0d 23 33 9f 00 48 8d 15 a4 b0 73 00 e8 0f 92 4b ff 48 8b 0d c0 9f cc 00 e8 d3 2f 57 ff 48 85 c0 74 0c 48 8b c8 48 83 c4 28 e9 42 09 e3 ff 48 83 c4 28 c3
```
Replace:
```hex
@ -37,13 +54,20 @@ If this is a problem for you, use [SafeMutLoader](https://github.com/GenZmeY/KF2
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
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 f9 0a 71 00 48 8d 4d ff e8 4c cf 3f ff 90 48 8d 15 0c 09 72 00 48 8d 4d ef e8 3b cf 3f ff 90 48 8b cb e8 52 89 4b ff 48 8b c8 48 8d 55 1f e8 f6 d4 40 ff 90 48 8d 55 0f 48 8b c8 e8 e9 26 42 ff 90 45 33 e4 4c 89 65 27 48 8b 4d 1f 48 85 c9 74 09 e8 43 c7 43 ff 4c 89 65 1f 8b 45 07 85 c0 74 28 7f 20 4c 8d 0d ef 0b 37 00 41 b8 45 02 00 00 48 8d 15 42 15 37 00 48 8d 0d 83 15 37 00 e8 86 8b 4a ff 48 8b 5d ff eb 07 48 8d 1d c9 0b 37 00 8b 45 17 85 c0 74 28 7f 20 4c 8d 0d b9 0b 37 00 41 b8 45 02 00 00 48 8d 15 0c 15 37 00 48 8d 0d 4d 15 37 00 e8 50 8b 4a ff 48 8b 4d 0f eb 07 48 8d 0d 93 0b 37 00 48 8b d3 ff 15 8a e4 35 00 85 c0 74 7d 8b 45 f7 85 c0 74 28 7f 20 4c 8d 0d 76 0b 37 00 41 b8 45 02 00 00 48 8d 15 c9 14 37 00 48 8d 0d 0a 15 37 00 e8 0d 8b 4a ff 48 8b 5d ef eb 07 48 8d 1d 50 0b 37 00 8b 45 17 85 c0 74 28 7f 20 4c 8d 0d 40 0b 37 00 41 b8 45 02 00 00 48 8d 15 93 14 37 00 48 8d 0d d4 14 37 00 e8 d7 8a 4a ff 48 8b 4d 0f eb 07 48 8d 0d 1a 0b 37 00 48 8b d3 ff 15 11 e4 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 d7 0a 37 00 41 b8 52 02 00 00 48 8d 15 2a 14 37 00 48 8d 0d 6b 14 37 00 e8 6e 8a 4a ff 49 8b 0e 48 8b 0c f9 e8 d2 87 4b ff 48 8b c8 48 8d 55 2f e8 76 d3 40 ff 90 48 8d 55 df 48 8b c8 e8 69 25 42 ff 90 4c 89 65 37 48 8b 4d 2f 48 85 c9 74 09 e8 c6 c5 43 ff 4c 89 65 2f 8b 45 07 85 c0 74 28 7f 20 4c 8d 0d 72 0a 37 00 41 b8 45 02 00 00 48 8d 15 c5 13 37 00 48 8d 0d 06 14 37 00 e8 09 8a 4a ff 48 8b 5d ff eb 07 48 8d 1d 4c 0a 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d 3c 0a 37 00 41 b8 45 02 00 00 48 8d 15 8f 13 37 00 48 8d 0d d0 13 37 00 e8 d3 89 4a ff 48 8b 4d df eb 07 48 8d 0d 16 0a 37 00 48 8b d3 ff 15 0d e3 35 00 85 c0 74 79 8b 45 f7 85 c0 74 28 7f 20 4c 8d 0d f9 09 37 00 41 b8 45 02 00 00 48 8d 15 4c 13 37 00 48 8d 0d 8d 13 37 00 e8 90 89 4a ff 48 8b 5d ef eb 07 48 8d 1d d3 09 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d c3 09 37 00 41 b8 45 02 00 00 48 8d 15 16 13 37 00 48 8d 0d 57 13 37 00 e8 5a 89 4a ff 48 8b 4d df eb 07 48 8d 0d 9d 09 37 00 48 8b d3 ff 15 94 e2 35 00 85 c0 75 28 4c 89 65 e7 48 8b 4d df 48 85 c9 74 09 e8 be c4 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 34 09 37 00 41 b8 52 02 00 00 48 8d 15 87 12 37 00 48 8d 0d c8 12 37 00 e8 cb 88 4a ff 49 8b 0f 48 8b 0c f9 e8 2f 86 4b ff 48 8b c8 48 8d 55 2f e8 d3 d1 40 ff 90 48 8d 55 df 48 8b c8 e8 c6 23 42 ff 90 4c 89 65 37 48 8b 4d 2f 48 85 c9 74 09 e8 23 c4 43 ff 4c 89 65 2f 8b 45 07 85 c0 74 28 7f 20 4c 8d 0d cf 08 37 00 41 b8 45 02 00 00 48 8d 15 22 12 37 00 48 8d 0d 63 12 37 00 e8 66 88 4a ff 48 8b 5d ff eb 07 48 8d 1d a9 08 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d 99 08 37 00 41 b8 45 02 00 00 48 8d 15 ec 11 37 00 48 8d 0d 2d 12 37 00 e8 30 88 4a ff 48 8b 4d df eb 07 48 8d 0d 73 08 37 00 48 8b d3 ff 15 6a e1 35 00 85 c0 74 79 8b 45 f7 85 c0 74 28 7f 20 4c 8d 0d 56 08 37 00 41 b8 45 02 00 00 48 8d 15 a9 11 37 00 48 8d 0d ea 11 37 00 e8 ed 87 4a ff 48 8b 5d ef eb 07 48 8d 1d 30 08 37 00 8b 45 e7 85 c0 74 28 7f 20 4c 8d 0d 20 08 37 00 41 b8 45 02 00 00 48 8d 15 73 11 37 00 48 8d 0d b4 11 37 00 e8 b7 87 4a ff 48 8b 4d df eb 07 48 8d 0d fa 07 37 00 48 8b d3 ff 15 f1 e0 35 00 85 c0 75 28 4c 89 65 e7 48 8b 4d df 48 85 c9 74 09 e8 1b c3 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 f3 c2 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 d7 c2 43 ff 4c 89 65 0f 4c 89 65 f7 48 8b 4d ef 48 85 c9 74 09 e8 c1 c2 43 ff 4c 89 65 ef 4c 89 65 07 48 8b 4d ff 48 85 c9 74 05 e8 ab c2 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
```
## How it works
This patch modifies the `KFGameInfo::SetGameUnranked()` function so that it does nothing - this prevents the server from going into an unranked state.
The patch also modifies the `KFGameInfo::ValidateForXP()` function so that it always returns true. `ValidateForXP()` prevents XP from being gained for killing custom zeds and using custom weapons - modifying this function makes it possible to gain XP in these cases.
The patch for Linux is a bash script that searches for and patches these functions in the executable file, works with any version of the KF2 server.
In the case of Windows, there is no automation and the work to find the necessary functions was done manually, so replacing the specified hex sequences is relevant only for a specific version of the KF2 server (currently 1150 and 1150v2).
## 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.