//
// sub_621154 from 0x621154 to 0x6211d2 (126 bytes)
//
// 2 xrefs:
// > sub_62160C @ 0x622dac
// > sub_62E754 @ 0x62e8cc
//
// 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_621154(int a1)
{
int v1; // r4
int result; // r0
int v3; // r8
int v4; // r7
_DWORD *v5; // r4
int v6; // r5
int v7; // r0
__time_t v8[2]; // [sp+4h] [bp-18h] BYREF
_BYTE v9[16]; // [sp+Ch] [bp-10h] BYREF
v1 = *(_DWORD *)(a1 + 1640);
sub_60F990(v8);
sub_62E694(v1, v9);
result = sub_62E6A0(v9);
if ( result )
{
v3 = 0;
v4 = -1;
do
{
v5 = **(_DWORD ***)(*(_DWORD *)result + 8);
while ( v5 )
{
while ( 1 )
{
v6 = *v5;
if ( !*(_BYTE *)(*v5 + 64) )
break;
v5 = (_DWORD *)v5[2];
if ( !v5 )
goto LABEL_10;
}
v7 = sub_60F9D8(v8[0], v8[1], *(_DWORD *)(v6 + 400), *(_DWORD *)(v6 + 404));
v5 = (_DWORD *)v5[2];
if ( v7 > v4 )
{
v3 = v6;
v4 = v7;
}
}
LABEL_10:
result = sub_62E6A0(v9);
}
while ( result );
return v3;
}
return result;
}