//
// sub_1006FF178 from 0x1006ff178 to 0x1006ff248 (208 bytes)
//
// 1 xrefs:
// > sub_1006FF0E4 @ 0x1006ff124
//
// 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:47 +0000
//
__int64 __fastcall sub_1006FF178(__int64 result, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v6; // x21
__int64 v7; // x22
__int64 v8; // x23
__int64 v9; // x25
int v10; // w0
__int64 v11; // [xsp+8h] [xbp-48h] BYREF
v6 = result;
if ( !*(_QWORD *)(a4 + 8) )
{
result = sub_100704BB4(a2);
if ( (int)result >= 1 )
{
v7 = 0;
while ( 1 )
{
v8 = sub_100704BC8(a2, v7);
(*(void (__fastcall **)(__int64, __int64 *, _QWORD, __int64))(v8 + 96))(v8, &v11, 0, v6);
v9 = v11;
v10 = strlen(*(const char **)(v11 + 16));
if ( v10 == *(_DWORD *)(a4 + 24) )
{
result = strncasecmp(*(const char **)(v11 + 16), *(const char **)(a4 + 16), v10);
if ( !(_DWORD)result )
break;
}
v7 = (unsigned int)(v7 + 1);
result = sub_100704BB4(a2);
if ( (int)v7 >= (int)result )
return result;
}
*(_QWORD *)a4 = v8;
*(_QWORD *)(a4 + 8) = v9;
}
}
return result;
}