//
// sub_1800DA8C0 from 0x1800da8c0 to 0x1800dabf2 (818 bytes)
//
// 4 xrefs:
// > sub_1800D9E40 @ 0x1800d9e91
// > ??> @ 0x1801430b4
// > ??> @ 0x1801430c4
// > ??> @ 0x1801bac08
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 sub_1800DA8C0()
{
HMODULE LibraryA; // rax
HMODULE v2; // rax
__int64 v3; // rbx
const CHAR *v4; // rax
HMODULE v5; // rax
HMODULE v6; // rax
HMODULE v7; // rax
HMODULE v8; // rax
_QWORD v9[5]; // [rsp+28h] [rbp-40h]
if ( GetModuleHandleExW(6u, &ModuleName, &phModule) )
{
LibraryA = LoadLibraryA("user32.dll");
hModule = LibraryA;
if ( LibraryA )
{
SetProcessDPIAware = (BOOL (__stdcall *)())GetProcAddress(LibraryA, "SetProcessDPIAware");
ChangeWindowMessageFilterEx = (BOOL (__stdcall *)(HWND, UINT, DWORD, PCHANGEFILTERSTRUCT))GetProcAddress(
hModule,
"ChangeWindowMessageFilterEx");
EnableNonClientDpiScaling = (__int64 (__fastcall *)(_QWORD))GetProcAddress(hModule, "EnableNonClientDpiScaling");
SetProcessDpiAwarenessContext = (__int64 (__fastcall *)(_QWORD))GetProcAddress(
hModule,
"SetProcessDpiAwarenessContext");
GetDpiForWindow = (__int64 (__fastcall *)(_QWORD))GetProcAddress(hModule, "GetDpiForWindow");
AdjustWindowRectExForDpi = (__int64 (__fastcall *)(_QWORD, _QWORD, _QWORD, _QWORD, _DWORD))GetProcAddress(
hModule,
"AdjustWindowRectExForDpi");
GetSystemMetricsForDpi = (__int64)GetProcAddress(hModule, "GetSystemMetricsForDpi");
v2 = LoadLibraryA("dinput8.dll");
qword_1801AC008 = v2;
if ( v2 )
DirectInput8Create = (HRESULT (__stdcall *)(HINSTANCE, DWORD, const IID *const, LPVOID *, LPUNKNOWN))GetProcAddress(v2, "DirectInput8Create");
v3 = 0;
v9[0] = "xinput1_3.dll";
v4 = "xinput1_4.dll";
v9[1] = "xinput9_1_0.dll";
v9[2] = "xinput1_2.dll";
v9[3] = "xinput1_1.dll";
v9[4] = 0;
while ( 1 )
{
v5 = LoadLibraryA(v4);
hLibModule = v5;
if ( v5 )
break;
v4 = (const CHAR *)v9[v3++];
if ( !v4 )
goto LABEL_12;
}
XInputGetCapabilities = (DWORD (__stdcall *)(DWORD, DWORD, XINPUT_CAPABILITIES *))GetProcAddress(
v5,
"XInputGetCapabilities");
XInputGetState = (DWORD (__stdcall *)(DWORD, XINPUT_STATE *))GetProcAddress(hLibModule, "XInputGetState");
LABEL_12:
v6 = LoadLibraryA("dwmapi.dll");
qword_1801AC078 = v6;
if ( v6 )
{
DwmIsCompositionEnabled = (HRESULT (__stdcall *)(BOOL *))GetProcAddress(v6, "DwmIsCompositionEnabled");
DwmFlush = (HRESULT (__stdcall *)())GetProcAddress(qword_1801AC078, "DwmFlush");
DwmEnableBlurBehindWindow = (HRESULT (__stdcall *)(HWND, const DWM_BLURBEHIND *))GetProcAddress(
qword_1801AC078,
"DwmEnableBlurBehindWindow");
DwmGetColorizationColor = (HRESULT (__stdcall *)(DWORD *, BOOL *))GetProcAddress(
qword_1801AC078,
"DwmGetColorizationColor");
}
v7 = LoadLibraryA("shcore.dll");
qword_1801AC0A0 = v7;
if ( v7 )
{
SetProcessDpiAwareness = (__int64 (__fastcall *)(_QWORD))GetProcAddress(v7, "SetProcessDpiAwareness");
GetDpiForMonitor = (__int64)GetProcAddress(qword_1801AC0A0, "GetDpiForMonitor");
}
v8 = LoadLibraryA("ntdll.dll");
qword_1801AC0B8 = (__int64)v8;
if ( v8 )
RtlVerifyVersionInfo = (__int64 (__fastcall *)(_QWORD, _QWORD, _QWORD))GetProcAddress(
v8,
"RtlVerifyVersionInfo");
return 1;
}
else
{
sub_1800D9BA0(0x10008u, "Win32: Failed to load user32.dll");
return 0;
}
}
else
{
sub_1800D9BA0(0x10008u, "Win32: Failed to retrieve own module handle");
return 0;
}
}