//
// sub_100707B80 from 0x100707b80 to 0x100707cb8 (312 bytes)
//
// 1 xrefs:
// > sub_100707B58 @ 0x100707b70
//
// 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:12:52 +0000
//
void __fastcall sub_100707B80(int a1, const char **a2)
{
_BYTE *v3; // x0
void *v4; // x19
int v5; // w23
int v6; // w24
int v7; // w25
const char **v8; // x8
char *v9; // x22
_BYTE *v10; // x0
int *v11; // x0
int *v12; // x8
__int64 v13; // x9
int *v14; // x20
void *v15; // x0
_QWORD *v16; // x20
void *v17; // t1
int *v18; // x21
v3 = sub_1006AE878(81, (__int64)"err.c", 1089);
v4 = v3;
if ( v3 )
{
*v3 = 0;
if ( a1 >= 1 )
{
v5 = 0;
v6 = 0;
v7 = 80;
do
{
v8 = a2++;
v9 = (char *)*v8;
if ( *v8 )
{
v6 += strlen(*v8);
if ( v6 > v7 )
{
v10 = sub_1006AEA74(v4, (unsigned int)(v6 + 21), (__int64)"err.c", 1102);
if ( !v10 )
{
sub_1006AEDAC(v4);
return;
}
v7 = v6 + 20;
v4 = v10;
}
sub_100700510((__int64)v4, v9, v7 + 1LL);
}
++v5;
}
while ( v5 < a1 );
}
v11 = (int *)sub_1007070B4();
v12 = v11;
v13 = v11[148];
if ( !(_DWORD)v13 )
v13 = 15;
v14 = &v11[2 * v13];
v17 = *((void **)v14 + 26);
v16 = v14 + 52;
v15 = v17;
v18 = &v12[v13 + 84];
if ( v17 )
{
if ( (*(_BYTE *)v18 & 1) != 0 )
{
sub_1006AEDAC(v15);
*v16 = 0;
}
}
*v16 = v4;
*v18 = 3;
}
}