//
// sub_1005CFF44 from 0x1005cff44 to 0x1005d00b0 (364 bytes)
//
// 1 xrefs:
// > ??> @ 0x10083ae88
//
// 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_1005CFF44(__int64 a1, __int64 a2)
{
__int64 v4; // x8
int *v5; // x19
int v6; // w0
__int64 v7; // x0
void *v8; // x21
__int64 v9; // x22
char **v10; // x0
void *v12; // [xsp+8h] [xbp-28h] BYREF
v12 = nullptr;
v4 = *(_QWORD *)(a2 + 32);
if ( v4 && *(_QWORD *)(v4 + 56) )
{
v5 = (int *)sub_1005FBA1C();
if ( v5 )
{
v6 = sub_1005CEDA4(*(_QWORD *)(a2 + 32), (__int64)(v5 + 2));
*v5 = v6;
if ( v6 <= 0 )
{
sub_1005E0E48(10, 116, 65, "dsa_ameth.c", 305);
}
else
{
v5[1] = 16;
v7 = sub_1005F00A0(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 56LL), 0);
v8 = (void *)v7;
if ( v7 )
{
v9 = sub_1005F8E9C(v7, &v12);
sub_1005FBB5C(v8);
v10 = sub_10058AB9C(0x74u);
if ( (unsigned int)sub_1005FC4BC(a1, v10, 0, 16, v5, v12, v9) )
return 1;
if ( v12 )
sub_100588C44(v12);
}
else
{
sub_1005E0E48(10, 116, 109, "dsa_ameth.c", 314);
}
}
sub_1005FBA78(v5);
}
else
{
sub_1005E0E48(10, 116, 65, "dsa_ameth.c", 299);
}
}
else
{
sub_1005E0E48(10, 116, 101, "dsa_ameth.c", 292);
}
return 0;
}