//
// sub_10060684C from 0x10060684c to 0x100606a08 (444 bytes)
//
// 1 xrefs:
// > sub_100606A08 @ 0x100606b78
//
// 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_10060684C(__int64 result, unsigned int *a2, int a3, int a4)
{
__int64 v7; // x20
int v8; // w21
__int64 v9; // x0
__int64 v10; // x1
const char *v11; // x8
__int64 v12; // x0
__int64 v13; // x0
__int64 v14; // x1
const char *v15; // x8
v7 = result;
if ( a2 )
{
if ( !a4 || !(unsigned int)sub_1005DEA4C(a2) )
{
sub_1005DCA40(v7, "%*s", a3, "");
if ( !(unsigned int)sub_1005DEA4C(a2) )
sub_1005DA834(v7, (__int64)"\n");
}
result = sub_1005DEA4C(a2);
if ( (int)result >= 1 )
{
v8 = 0;
if ( a4 )
{
while ( 1 )
{
sub_1005DCA40(v7, "%*s", a3, "");
v9 = sub_1005DEA60((__int64)a2, v8);
v10 = *(_QWORD *)(v9 + 8);
v11 = *(const char **)(v9 + 16);
if ( !v10 )
break;
if ( !v11 )
{
v12 = v7;
goto LABEL_13;
}
sub_1005DCA40(v7, "%s:%s", *(const char **)(v9 + 8), v11);
LABEL_14:
sub_1005DA834(v7, (__int64)"\n");
++v8;
result = sub_1005DEA4C(a2);
if ( v8 >= (int)result )
return result;
}
v12 = v7;
v10 = (__int64)v11;
LABEL_13:
sub_1005DA834(v12, v10);
goto LABEL_14;
}
do
{
if ( v8 >= 1 )
sub_1005DCA40(v7, ", ");
v13 = sub_1005DEA60((__int64)a2, v8);
v14 = *(_QWORD *)(v13 + 8);
v15 = *(const char **)(v13 + 16);
if ( v14 )
{
if ( v15 )
sub_1005DCA40(v7, "%s:%s", *(const char **)(v13 + 8), v15);
else
sub_1005DA834(v7, v14);
}
else
{
sub_1005DA834(v7, (__int64)v15);
}
++v8;
result = sub_1005DEA4C(a2);
}
while ( v8 < (int)result );
}
}
return result;
}