//
// sub_10060E5D4 from 0x10060e5d4 to 0x10060e7ac (472 bytes)
//
// 1 xrefs:
// > ??> @ 0x100841be0
//
// 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_10060E5D4(__int64 a1, int a2, unsigned int *a3)
{
__int64 v6; // x19
int v7; // w23
__int64 v8; // x27
__int64 v9; // x28
__int64 v10; // x8
void ***v11; // x28
_QWORD *v12; // x0
__int64 v13; // x27
void **v14; // x0
_BYTE v16[8]; // [xsp+8h] [xbp-68h] BYREF
__int64 v17; // [xsp+10h] [xbp-60h]
__int64 v18; // [xsp+18h] [xbp-58h]
v6 = sub_1005F55E0((__int64)&unk_100841B60);
if ( v6 )
{
if ( (int)sub_1005DEA4C(a3) < 1 )
return v6;
v7 = 0;
while ( 1 )
{
v8 = sub_1005DEA60((__int64)a3, v7);
v9 = *(_QWORD *)(v8 + 8);
if ( !strncmp((const char *)v9, "permitted", 9u) && *(_BYTE *)(v9 + 9) )
{
v10 = v9 + 10;
v11 = (void ***)v6;
}
else
{
if ( strncmp((const char *)v9, "excluded", 8u) || !*(_BYTE *)(v9 + 8) )
{
sub_1005E0E48(34, 147, 143, (__int64)"v3_ncons.c", 130);
v13 = 0;
goto LABEL_21;
}
v10 = v9 + 9;
v11 = (void ***)(v6 + 8);
}
v17 = v10;
v18 = *(_QWORD *)(v8 + 16);
v12 = (_QWORD *)sub_1005F55E0((__int64)&unk_100841C78);
v13 = (__int64)v12;
if ( !v12 )
break;
if ( !sub_1006099FC(*v12, a1, a2, (__int64)v16) )
goto LABEL_21;
v14 = *v11;
if ( !*v11 )
{
v14 = (void **)sub_1005DE4A4();
*v11 = v14;
if ( !v14 )
goto LABEL_20;
}
if ( !(unsigned int)sub_1005DE80C(v14, v13) )
goto LABEL_20;
if ( ++v7 >= (int)sub_1005DEA4C(a3) )
return v6;
}
v13 = 0;
}
else
{
v13 = 0;
}
LABEL_20:
sub_1005E0E48(34, 147, 65, (__int64)"v3_ncons.c", 149);
LABEL_21:
if ( v6 )
sub_1005F5B94(v6, (__int64)&unk_100841B60);
if ( v13 )
sub_1005F5B94(v13, (__int64)&unk_100841C78);
return 0;
}