Commit graph RynthCore/tools/DatShareSlotTests/Program.cs
Author SHA1 Message Date
BlankenshipG
bd97e41345 fix(engine): DAT share hook covers the 2025 client's private CreateFileW slot
The 2025 ACClient.exe (0.0.11.6096) resolves kernel32!CreateFileW on first use
into a private slot (0x00837374) and opens every DAT through it. Since
2026.10.5.61 the hook only patched import tables, so no DAT open was shared:
the first client held the DATs deny-write and every later client failed with
"Can't open the data files".

- LazyImportSlotScanner finds the Layer-for-Unicode stubs by their full byte
  pattern and returns the slots they fill.
- DatFileShareHooks hooks those slots with the same detours and restores them
  on uninstall; an unresolved slot calls the kernel32 export directly.
- tools/DatShareSlotTests: 20 checks, including the real 2025 client.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-15 21:56:24 -04:00