//
// sub_100690CCC from 0x100690ccc to 0x100690e30 (356 bytes)
//
// 3 xrefs:
// > sub_100690820 @ 0x1006909e8
// > sub_100690820 @ 0x100690ad0
// > sub_100690820 @ 0x100690b2c
//
// 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:31 +0000
//
__int64 __fastcall sub_100690CCC(__int64 a1, int a2, int a3)
{
__int64 v4; // x8
__int64 v5; // x19
__int64 v6; // x21
__int64 v7; // x24
__int64 v8; // x9
_QWORD *v9; // x24
__int64 v10; // t1
int v11; // w25
__int64 v12; // x22
__int64 v13; // x23
_QWORD *v14; // x26
v4 = a1 + 4LL * a3;
v5 = *(unsigned int *)(v4 + 472);
*(_DWORD *)(v4 + 472) = -1;
if ( a2 )
{
v6 = 7;
goto LABEL_21;
}
v7 = a1 + 8LL * a3;
v10 = *(_QWORD *)(v7 + 104);
v9 = (_QWORD *)(v7 + 104);
v8 = v10;
if ( v10 )
{
v11 = *(_DWORD *)(v8 + 4);
}
else
{
v8 = *(_QWORD *)(a1 + 104);
if ( !v8 )
{
v6 = 7;
goto LABEL_21;
}
if ( *(_DWORD *)(v8 + 4) == 2 )
v11 = 30;
else
v11 = 2;
}
v12 = *(_QWORD *)(v8 + 40);
if ( v12 )
{
v13 = v4 + 472;
v14 = (_QWORD *)(a1 + 8LL * (a3 ^ 1) + 104);
while ( 1 )
{
if ( *v14 )
{
while ( *(_DWORD *)(v12 + 4) != v11 )
{
v12 = *(_QWORD *)(v12 + 40);
if ( !v12 )
{
v6 = 7;
goto LABEL_21;
}
}
}
v6 = sub_100691008(a1, v12, v13);
if ( (_DWORD)v6 != 7 )
break;
v12 = *(_QWORD *)(v12 + 40);
v6 = 7;
if ( !v12 )
goto LABEL_21;
}
*v9 = v12;
}
else
{
v6 = 7;
}
LABEL_21:
if ( (_DWORD)v5 != -1 )
{
if ( a1 )
{
if ( *(_QWORD *)(a1 + 56) )
{
if ( *(_DWORD *)(a1 + 468) != (_DWORD)v5 || !*(_BYTE *)(a1 + 481) )
{
sub_1006950F0(a1, v5);
(*(void (__fastcall **)(_QWORD, __int64))(a1 + 56))(*(_QWORD *)(a1 + 64), v5);
return v6;
}
*(_BYTE *)(a1 + 481) = 0;
}
sub_1006950F0(a1, v5);
}
close(v5);
}
return v6;
}