//
// sub_1800D67F0 from 0x1800d67f0 to 0x1800d69a7 (439 bytes)
//
// 7 xrefs:
// > sub_1800D3E80 @ 0x1800d3f87
// > ??> @ 0x180142e20
// > ??> @ 0x180142e3c
// > ??> @ 0x180142e54
// > ??> @ 0x180142e68
// > ??> @ 0x180142e78
// > ??> @ 0x1801ba908
//
// 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_1800D67F0(__int64 a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5)
{
LONG bottom; // r13d
int v10; // eax
__int64 v11; // rcx
DWORD v12; // edi
unsigned int v13; // ebx
int v14; // eax
int result; // eax
DWORD v16; // ebx
struct tagRECT rc; // [rsp+30h] [rbp-78h] BYREF
struct tagRECT yBottom; // [rsp+40h] [rbp-68h] BYREF
GetClientRect(*(HWND *)(a1 + 880), &yBottom);
bottom = yBottom.bottom;
SetRect(&rc, 0, 0, yBottom.right, yBottom.bottom);
v10 = sub_1800D9CB0(14393);
v11 = *(_QWORD *)(a1 + 72);
v12 = 0x40000;
if ( v10 )
{
if ( v11 || *(_DWORD *)(a1 + 20) )
v12 = 262152;
if ( v11 )
{
v13 = -2046820352;
}
else if ( *(_DWORD *)(a1 + 12) )
{
v13 = 114229248;
if ( !*(_DWORD *)(a1 + 8) )
v13 = 113901568;
}
else
{
v13 = -2046164992;
}
v14 = qword_1801AC060(*(_QWORD *)(a1 + 880));
result = qword_1801AC068(&rc, v13, 0, v12, v14);
}
else
{
if ( v11 || *(_DWORD *)(a1 + 20) )
v12 = 262152;
if ( v11 )
{
v16 = -2046820352;
}
else if ( *(_DWORD *)(a1 + 12) )
{
v16 = 114229248;
if ( !*(_DWORD *)(a1 + 8) )
v16 = 113901568;
}
else
{
v16 = -2046164992;
}
result = AdjustWindowRectEx(&rc, v16, 0, v12);
}
if ( a2 )
{
result = -rc.left;
*a2 = -rc.left;
}
if ( a3 )
{
result = -rc.top;
*a3 = -rc.top;
}
if ( a4 )
{
result = rc.right - yBottom.right;
*a4 = rc.right - yBottom.right;
}
if ( a5 )
{
result = rc.bottom - bottom;
*a5 = rc.bottom - bottom;
}
return result;
}