[Bug]: srcds.exe - Entry Point Not Found (RtlPcToFileHeader)
Prerequisites
- [x] I have checked that my issue doesn't exist yet in the issue tracker
Operating System and Version
Windows Server 2008 R2
Game / AppID and Version
CS:S (240) v9540945, TF2 (440) v9543365
SourceMod Version
1.12.0.7179
Metamod:Source Version
1.11.0-git1156
Version Verification
- [x] I have updated SourceMod to the latest version and the issue persists
- [x] I have updated SourceMod to the latest snapshot and the issue persists
- [x] I have updated Metamod:Source to the latest snapshot and the issue persists
Updated SourceMod Version
1.13.0.7202
Updated Metamod:Source Version
1.12.0-git1211
Description
Upon launching the server I get an "Entry Point Not Found"-message with regards to "RtlPcToFileHeader". Both game.cstrike.ext and sdktools.ext fail to load with "The specified procedure could not be found.".
The last working SourceMod version for my setup (before Valve dropped the Feb 18 updates) was 1.11.0.6970. I also tried just updating the gamedata there to no avail.
Steps to Reproduce
No response
Relevant Log Output
This doesn't appear to be a duplicate after all, as the issue persists with 1.12.0.7192. RtlPcToFileHeader exists only in the 64 bit version of Kernel32 on Windows versions prior to Windows 10. I'm running both SrcDS and SourceMod in 32 bit mode on a 64 bit OS.
This regression is related to SafetyHook: https://github.com/alliedmodders/safetyhook/blob/main/src/os.windows.cpp#L111
Just in case anyone else is waiting for a fix, here's a quick and dirty way to get SourceMod going again for the time being:
I've edited the Import Lookup Table in the DLL's that fail to load with a hex editor, replacing RtlPcToFileHeader with Beep from Kernel32.
To be precise, replace the byte sequence
52746C5063546F46696C6548656164657200
by
426565700000000000000000000000000000
in all of the DLL's for which you get the "Entry Point Not Found" message box.
For me these were
game.cstrike.ext.2.css.dll
game.tf2.ext.2.tf2.dll
sdktools.ext.2.css.dll
sdktools.ext.2.tf2.dll
With this, SourceMod now loads fine and all my plugins are back in working order. After checking with a debugger, the function never appears to be called, at least with my setup.