//
// sub_1005F8C3C from 0x1005f8c3c to 0x1005f8ce4 (168 bytes)
//
// 1 xrefs:
// > sub_1005F6E94 @ 0x1005f7770
//
// 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_1005F8C3C(__int64 *a1, const void *a2, __int64 a3, __int64 a4)
{
__int64 v6; // x21
__int64 v7; // x8
__int64 v8; // x22
void **v9; // x23
_BYTE *v10; // x0
__int64 v11; // x21
if ( !a1 )
return 1;
v6 = *a1;
if ( !*a1 )
return 1;
v7 = *(_QWORD *)(a4 + 32);
if ( !v7 )
return 1;
if ( (*(_BYTE *)(v7 + 8) & 2) == 0 )
return 1;
v8 = *(int *)(v7 + 32);
v9 = (void **)(v6 + v8);
if ( !(v6 + v8) )
return 1;
if ( *v9 )
sub_100588C44(*v9);
v10 = sub_100588710(a3, (__int64)"tasn_utl.c", 174);
*v9 = v10;
if ( v10 )
{
v11 = v8 + v6;
memcpy(v10, a2, (int)a3);
*(_QWORD *)(v11 + 8) = (int)a3;
*(_DWORD *)(v11 + 16) = 0;
return 1;
}
return 0;
}