//
// sub_1800D7430 from 0x1800d7430 to 0x1800d75ac (380 bytes)
//
// 6 xrefs:
// > sub_1800D4C40 @ 0x1800d4c5c
// > sub_1800D76D0 @ 0x1800d7727
// > sub_1800D8740 @ 0x1800d8a8e
// > ??> @ 0x180142dd4
// > ??> @ 0x180142de4
// > ??> @ 0x1801ba9d4
//
// 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
//
int __fastcall sub_1800D7430(__int64 a1, LONG a2, LONG a3)
{
__int64 v3; // rax
int v5; // eax
__int64 v6; // rcx
DWORD v7; // esi
unsigned int v8; // ebx
int v9; // eax
DWORD v10; // ebx
struct tagRECT Rect; // [rsp+40h] [rbp-38h] BYREF
v3 = *(_QWORD *)(a1 + 72);
if ( v3 )
{
if ( *(_QWORD *)(v3 + 144) == a1 )
{
sub_1800D7750(a1);
LODWORD(v3) = sub_1800D8050(a1);
}
}
else
{
*(_QWORD *)&Rect.left = 0;
Rect.right = a2;
Rect.bottom = a3;
v5 = sub_1800D9CB0(14393);
v6 = *(_QWORD *)(a1 + 72);
v7 = 0x40000;
if ( v5 )
{
if ( (v6 || *(_DWORD *)(a1 + 20)) && (v7 = 262152, v6) )
{
v8 = -2046820352;
}
else if ( *(_DWORD *)(a1 + 12) )
{
v8 = 114229248;
if ( !*(_DWORD *)(a1 + 8) )
v8 = 113901568;
}
else
{
v8 = -2046164992;
}
v9 = qword_1801AC060(*(_QWORD *)(a1 + 880));
qword_1801AC068(&Rect, v8, 0, v7, v9);
}
else
{
if ( (v6 || *(_DWORD *)(a1 + 20)) && (v7 = 262152, v6) )
{
v10 = -2046820352;
}
else if ( *(_DWORD *)(a1 + 12) )
{
v10 = 114229248;
if ( !*(_DWORD *)(a1 + 8) )
v10 = 113901568;
}
else
{
v10 = -2046164992;
}
AdjustWindowRectEx(&Rect, v10, 0, v7);
}
LODWORD(v3) = SetWindowPos(
*(HWND *)(a1 + 880),
nullptr,
0,
0,
Rect.right - Rect.left,
Rect.bottom - Rect.top,
0x216u);
}
return v3;
}