//
// sub_10069D870 from 0x10069d870 to 0x10069da10 (416 bytes)
//
// 2 xrefs:
// > sub_10069AB84 @ 0x10069b404
// > sub_10069BF28 @ 0x10069c534
//
// 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:38 +0000
//
__int64 __fastcall sub_10069D870(_DWORD *a1)
{
_QWORD *v2; // x9
const char *v3; // x8
const char *v4; // x9
__int64 v5; // x20
const char *v6; // x20
__int64 v7; // x21
__int64 v8; // x22
_BYTE *i; // x8
__int64 v10; // x11
int v11; // w9
size_t v12; // x22
char *v13; // x0
char *v14; // x21
char *j; // x9
int v16; // w10
__int64 v17; // x0
v2 = *(_QWORD **)(*(_QWORD *)a1 + 536LL);
v3 = (const char *)v2[7];
if ( v3 )
{
v4 = (const char *)v2[8];
if ( !v4 )
v4 = "";
v5 = sub_10069D3A4((__int64)a1, "%s%s", v3, v4);
LABEL_28:
if ( !(_DWORD)v5 )
{
v5 = 0;
a1[362] = 7;
}
return v5;
}
v6 = (const char *)v2[1];
if ( !v6 )
{
v17 = ((__int64 (__fastcall *)(const char *))off_1009E5FE8)("");
LABEL_26:
v14 = (char *)v17;
if ( !v17 )
return 27;
LABEL_27:
v5 = sub_10069D3A4((__int64)a1, "LIST \"%s\" *", v14);
off_1009E5FD8(v14);
goto LABEL_28;
}
v7 = 0;
v8 = 0;
for ( i = (_BYTE *)v2[1]; ; ++i )
{
v11 = (unsigned __int8)*i;
if ( !*i )
break;
if ( v11 == 34 )
v10 = v8 + 1;
else
v10 = v8;
if ( v11 == 92 )
++v7;
else
v8 = v10;
}
if ( !(v8 | v7) )
{
v17 = ((__int64 (__fastcall *)(const char *))off_1009E5FE8)(v6);
goto LABEL_26;
}
v12 = v8 + v7 + strlen(v6);
v13 = (char *)off_1009E5FD0(v12 + 1);
v14 = v13;
if ( v13 )
{
for ( j = v13; ; ++j )
{
v16 = *(unsigned __int8 *)v6;
if ( v16 == 34 )
goto LABEL_22;
if ( !*v6 )
{
v13[v12] = 0;
goto LABEL_27;
}
if ( v16 == 92 )
{
LABEL_22:
*j++ = 92;
LOBYTE(v16) = *v6;
}
*j = v16;
++v6;
}
}
return 27;
}