//
// sub_100479FAC from 0x100479fac to 0x10047a220 (628 bytes)
//
// 1 xrefs:
// > sub_100479798 @ 0x1004799ac
//
// 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_100479FAC(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x4
char *v4; // x3
__int64 v5; // x0
const char *v6; // x2
__int64 v7; // x5
int v8; // w8
int v9; // [xsp+8h] [xbp-268h] BYREF
int v10; // [xsp+Ch] [xbp-264h] BYREF
char v11[512]; // [xsp+10h] [xbp-260h] BYREF
result = sub_1004AA8B8(*(_QWORD *)(a1 + 368), 0, 0);
if ( !(_DWORD)result )
{
if ( (unsigned int)sub_10047AE14(a1, v11, 512, 0) || (unsigned int)sub_1004C705C(v11, "[playlist]", 10) )
return 19;
if ( (unsigned int)sub_10047AE14(a1, v11, 512, 0) )
return 0;
while ( (unsigned int)sub_1004C705C("File", v11, 4) )
{
if ( !(unsigned int)sub_1004C705C("Title", v11, 5) )
{
if ( (unsigned int)sub_10047AE14(a1, v11, 512, &v10) )
return 0;
v3 = (unsigned int)(v10 + 1);
v4 = v11;
v5 = a1;
v6 = "TITLE";
LABEL_11:
v7 = 3;
LABEL_12:
sub_10045FEFC(v5, 8, (__int64)v6, (__int64)v4, v3, v7, 0);
goto LABEL_13;
}
if ( !(unsigned int)sub_1004C705C("Length", v11, 6) )
{
v9 = 0;
if ( (unsigned int)sub_10047AE14(a1, v11, 512, &v10) )
return 0;
v11[v10] = 0;
v9 = atoi(v11);
v4 = (char *)&v9;
v5 = a1;
v6 = "LENGTH";
v3 = 4;
v7 = 1;
goto LABEL_12;
}
if ( (!(unsigned int)sub_1004C705C("NumberOfEntries", v11, 15) || !(unsigned int)sub_1004C705C("Version", v11, 7))
&& (unsigned int)sub_10047AE14(a1, v11, 512, 0) )
{
return 0;
}
LABEL_13:
v8 = sub_10047AE14(a1, v11, 512, 0);
result = 0;
if ( v8 )
return result;
}
if ( (unsigned int)sub_10047AE14(a1, v11, 512, &v10) )
return 0;
v3 = (unsigned int)(v10 + 1);
v4 = v11;
v5 = a1;
v6 = "FILE";
goto LABEL_11;
}
return result;
}