//
// sub_1800447A0 from 0x1800447a0 to 0x18004491c (380 bytes)
//
// 7 xrefs:
// > sub_180015F50 @ 0x180015f95
// > ??> @ 0x180180e88
// > ??> @ 0x180180ea0
// > ??> @ 0x180180eb8
// > ??> @ 0x180180ec8
// > ??> @ 0x1801f816c
// > ??> @ 0x1801f8178
//
// 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 __fastcall sub_1800447A0(__int64 a1, __int64 a2, unsigned __int64 a3)
{
__int64 v6; // rax
unsigned __int64 v7; // rdx
__int64 result; // rax
unsigned int v9; // ecx
int v10; // eax
__int64 v11; // rax
unsigned __int64 v12; // rcx
__int64 v13; // [rsp+48h] [rbp+10h] BYREF
if ( **(_DWORD **)a2 > 4u )
return 0;
v6 = *(_QWORD *)(a2 + 8);
if ( !*(_QWORD *)(v6 + 8) )
return 0;
if ( *(_DWORD *)(v6 + 472) )
{
v7 = *(_QWORD *)(v6 + 528);
if ( v7 )
{
if ( a3 >= v7 )
return 0;
}
}
*(_DWORD *)(v6 + 4112) = 1;
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 4104LL) = 0;
if ( (*(unsigned int (__fastcall **)(__int64, __int64 *, _QWORD))(*(_QWORD *)(a2 + 8) + 24LL))(
a2,
&v13,
*(_QWORD *)(*(_QWORD *)(a2 + 8) + 104LL)) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 4112LL) = 0;
return 0;
}
else
{
v9 = **(_DWORD **)a2;
if ( v9 > 1 )
{
LABEL_19:
result = sub_180047910(a1, a2, v13, a3);
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 4112LL) = 0;
}
else
{
while ( 2 )
{
switch ( v9 )
{
case 0u:
v10 = sub_180044980(a1, a2);
goto LABEL_12;
case 1u:
v10 = sub_180045B60(a1, a2);
LABEL_12:
if ( !v10 )
goto LABEL_14;
v9 = **(_DWORD **)a2;
if ( v9 > 7 )
goto LABEL_14;
continue;
case 2u:
case 3u:
case 4u:
case 7u:
v11 = *(_QWORD *)(a2 + 8);
if ( !*(_DWORD *)(v11 + 472) )
goto LABEL_19;
v12 = *(_QWORD *)(v11 + 528);
if ( !v12 || a3 < v12 )
goto LABEL_19;
goto LABEL_15;
default:
LABEL_14:
v11 = *(_QWORD *)(a2 + 8);
LABEL_15:
*(_DWORD *)(v11 + 4112) = 0;
result = 0;
break;
}
break;
}
}
}
return result;
}