//
// sub_1800E2810 from 0x1800e2810 to 0x1800e2b42 (818 bytes)
//
// 4 xrefs:
// > sub_1800E1D90 @ 0x1800e1de1
// > ??> @ 0x18014c8e0
// > ??> @ 0x18014c8f0
// > ??> @ 0x1801c528c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:22:37 +0000
//
__int64 sub_1800E2810()
{
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");
qword_1801B60B8 = LibraryA;
if ( LibraryA )
{
SetProcessDPIAware = (BOOL (__stdcall *)())GetProcAddress(LibraryA, "SetProcessDPIAware");
ChangeWindowMessageFilterEx = (BOOL (__stdcall *)(HWND, UINT, DWORD, PCHANGEFILTERSTRUCT))GetProcAddress(
qword_1801B60B8,
"ChangeWindowMessageFilterEx");
EnableNonClientDpiScaling = (__int64 (__fastcall *)(_QWORD))GetProcAddress(
qword_1801B60B8,
"EnableNonClientDpiScaling");
SetProcessDpiAwarenessContext = (__int64 (__fastcall *)(_QWORD))GetProcAddress(
qword_1801B60B8,
"SetProcessDpiAwarenessContext");
GetDpiForWindow = (__int64 (__fastcall *)(_QWORD))GetProcAddress(qword_1801B60B8, "GetDpiForWindow");
AdjustWindowRectExForDpi = (__int64 (__fastcall *)(_QWORD, _QWORD, _QWORD, _QWORD, _DWORD))GetProcAddress(
qword_1801B60B8,
"AdjustWindowRectExForDpi");
GetSystemMetricsForDpi = (__int64)GetProcAddress(qword_1801B60B8, "GetSystemMetricsForDpi");
v2 = LoadLibraryA("dinput8.dll");
qword_1801B6088 = 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);
qword_1801B60A0 = 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(qword_1801B60A0, "XInputGetState");
LABEL_12:
v6 = LoadLibraryA("dwmapi.dll");
qword_1801B60F8 = v6;
if ( v6 )
{
DwmIsCompositionEnabled = (HRESULT (__stdcall *)(BOOL *))GetProcAddress(v6, "DwmIsCompositionEnabled");
DwmFlush = (HRESULT (__stdcall *)())GetProcAddress(qword_1801B60F8, "DwmFlush");
DwmEnableBlurBehindWindow = (HRESULT (__stdcall *)(HWND, const DWM_BLURBEHIND *))GetProcAddress(
qword_1801B60F8,
"DwmEnableBlurBehindWindow");
DwmGetColorizationColor = (HRESULT (__stdcall *)(DWORD *, BOOL *))GetProcAddress(
qword_1801B60F8,
"DwmGetColorizationColor");
}
v7 = LoadLibraryA("shcore.dll");
qword_1801B6120 = v7;
if ( v7 )
{
SetProcessDpiAwareness = (__int64 (__fastcall *)(_QWORD))GetProcAddress(v7, "SetProcessDpiAwareness");
GetDpiForMonitor = (__int64)GetProcAddress(qword_1801B6120, "GetDpiForMonitor");
}
v8 = LoadLibraryA("ntdll.dll");
qword_1801B6138 = (__int64)v8;
if ( v8 )
RtlVerifyVersionInfo = (__int64 (__fastcall *)(_QWORD, _QWORD, _QWORD))GetProcAddress(
v8,
"RtlVerifyVersionInfo");
return 1;
}
else
{
sub_1800E1AF0(0x10008u, "Win32: Failed to load user32.dll");
return 0;
}
}
else
{
sub_1800E1AF0(0x10008u, "Win32: Failed to retrieve own module handle");
return 0;
}
}