//
// sub_C05C00 from 0xc05c00 to 0xc05cb8 (184 bytes)
//
// 1 xrefs:
// > sub_C04E90 @ 0xc05218
//
// 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_C05C00(__int64 a1, _WORD **a2)
{
__int64 v3; // x22
int v4; // w2
_BYTE *v5; // x22
_WORD **v6; // x20
int v7; // w23
int i; // w19
_WORD **v10; // [xsp+48h] [xbp+48h]
v3 = *(_QWORD *)(a1 + 624);
if ( *(_DWORD *)(a1 + 372) )
{
v4 = *(_DWORD *)(v3 + 76);
if ( !v4 )
{
v10 = a2;
sub_C052A4(a1);
v4 = *(_DWORD *)(v3 + 76);
a2 = v10;
}
*(_DWORD *)(v3 + 76) = v4 - 1;
}
v5 = (_BYTE *)(v3 + 336);
v6 = a2;
v7 = 1 << *(_DWORD *)(a1 + 552);
for ( i = 0; *(_DWORD *)(a1 + 496) > i; ++v6 )
{
++i;
if ( (unsigned int)sub_C053BC((void (__fastcall ***)(_QWORD))a1, v5) )
**v6 |= v7;
}
return 1;
}