MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / PreloadLibs

Function PreloadLibs

src/Setup/winmain.cpp:18–30  ·  view source on GitHub ↗

Some libraries are still loaded from the current directories. If we pre-load them with an absolute path then we are good.

Source from the content-addressed store, hash-verified

16// Some libraries are still loaded from the current directories.
17// If we pre-load them with an absolute path then we are good.
18void PreloadLibs()
19{
20 wchar_t sys32Folder[MAX_PATH];
21 GetSystemDirectory(sys32Folder, MAX_PATH);
22
23 std::wstring version = (std::wstring(sys32Folder) + L"\\version.dll");
24 std::wstring logoncli = (std::wstring(sys32Folder) + L"\\logoncli.dll");
25 std::wstring sspicli = (std::wstring(sys32Folder) + L"\\sspicli.dll");
26
27 LoadLibrary(version.c_str());
28 LoadLibrary(logoncli.c_str());
29 LoadLibrary(sspicli.c_str());
30}
31
32void MitigateDllHijacking()
33{

Callers 1

MitigateDllHijackingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected