No description
  • C 97.8%
  • CMake 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-12-26 17:49:53 +02:00
minhook@1e9ad1eb42 init 2025-12-26 17:37:55 +02:00
.gitignore init 2025-12-26 17:37:55 +02:00
.gitmodules init 2025-12-26 17:37:55 +02:00
CMakeLists.txt init 2025-12-26 17:37:55 +02:00
ldrpatch.c init 2025-12-26 17:37:55 +02:00
patcher.c init 2025-12-26 17:37:55 +02:00
README.md fix readme fuckup 2025-12-26 17:49:53 +02:00

The engine dlls in early CS 1.6 builds lack relocation information, and on modern Windows versions the engine's preferred load address is often already occupied by system internals by the time the launcher attempts to load the dll.

This project resolves the conflict by reserving the engine's required address range within the main executable (hl.exe or hlds.exe) and manually mapping the engine dll into that space (This is actually the same technique Valve used for their engine/client dll encryption and manual mapping system).

This repository provides a patcher that adds a reservation section to the executable and makes it load ldrpatch.dll. The dll then hooks the necessary functions to manually map the engine image.

Usage

Warning: The patcher does not check for existing patches. Running it on an already patched executable will break the file.

  1. Build the project or download the binaries from Releases
  2. Run patcher.exe path\to\hl.exe or patcher.exe path\to\hlds.exe to patch the executable
  3. Move ldrpatch.dll into the same folder as the patched executable
  4. Launch the game as normal