//
// sub_1006A7954 from 0x1006a7954 to 0x1006a7ab0 (348 bytes)
//
// 2 xrefs:
// > sub_100694E54 @ 0x100695008
// > sub_100695188 @ 0x1006953e4
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:11:43 +0000
//
__int64 __fastcall sub_1006A7954(const char **a1, __int64 **a2)
{
__int64 *v4; // x21
__int64 *v5; // x19
const char *v6; // x0
const char **v7; // x24
char *v8; // x23
_WORD *v9; // x22
char *v10; // x0
const char *v11; // t1
v4 = *a2;
if ( a1 )
{
v5 = sub_100691C0C((__int64)sub_1006A7AB0);
if ( !v5 )
return 3;
v6 = *a1;
if ( *a1 )
{
v7 = a1 + 1;
while ( 1 )
{
v8 = off_1009E5FE8(v6);
if ( !v8 )
break;
v9 = off_1009E5FD0(0x10u);
if ( !v9 )
{
off_1009E5FD8(v8);
break;
}
v10 = strchr(v8, 58);
if ( v10 )
{
*v10 = 0;
v9[4] = strtol(v10 + 1, nullptr, 10);
}
else
{
v9[4] = 80;
}
*(_QWORD *)v9 = v8;
if ( !(unsigned int)sub_100691C50(v5, v5[1], (__int64)v9) )
{
off_1009E5FD8(*(void **)v9);
*(_QWORD *)v9 = 0;
off_1009E5FD8(v9);
break;
}
v11 = *v7++;
v6 = v11;
if ( !v11 )
goto LABEL_14;
}
sub_100691DB4(v5, 0);
return 3;
}
}
else
{
v5 = nullptr;
}
LABEL_14:
if ( v4 )
sub_100691DB4(v4, 0);
*a2 = v5;
return 0;
}