//
// sub_1005C0174 from 0x1005c0174 to 0x1005c023c (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x100839da0
//
// 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
//
bool __fastcall sub_1005C0174(__int64 a1, __int64 *a2)
{
__int64 *v2; // x19
void **v4; // x20
_QWORD *v5; // x0
_QWORD *v6; // x22
_BOOL8 v7; // x21
v2 = a2;
if ( a2 )
{
v4 = nullptr;
}
else
{
v2 = (__int64 *)sub_1005ABAC8();
v4 = (void **)v2;
if ( !v2 )
{
sub_1005E0E48(16, 159, 65, "ec2_smpl.c", 300);
return 0;
}
}
sub_1005ABC90((__int64)v2);
v5 = sub_1005ABDFC(v2);
v6 = v5;
if ( v5 )
{
if ( (unsigned int)sub_1005B4454((__int64)v5, (__int64 *)(a1 + 176), (int *)(a1 + 128)) )
v7 = *((_DWORD *)v6 + 2) != 0;
else
v7 = 0;
}
else
{
v7 = 0;
}
sub_1005ABD78((__int64)v2);
if ( v4 )
sub_1005ABB2C(v4);
return v7;
}