//
// sub_100606030 from 0x100606030 to 0x1006061bc (396 bytes)
//
// 2 xrefs:
// > ??> @ 0x10083fd10
// > ??> @ 0x10083fd78
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int *__fastcall sub_100606030(__int64 a1, __int64 a2, unsigned int *a3)
{
int *v5; // x19
int v6; // w22
__int64 v7; // x0
__int64 v8; // x26
const char *v9; // x25
const char *v10; // x24
__int64 v11; // x1
__int64 v12; // x2
__int64 v13; // x3
__int64 v14; // x4
__int64 v15; // x5
__int64 v16; // x6
__int64 v17; // x7
v5 = (int *)sub_1005FBAFC(3);
if ( !v5 )
{
sub_1005E0E48(34, 101, 65, (__int64)"v3_bitst.c", 116);
return nullptr;
}
if ( (int)sub_1005DEA4C(a3) >= 1 )
{
v6 = 0;
while ( 1 )
{
v7 = sub_1005DEA60((__int64)a3, v6);
v8 = *(_QWORD *)(a1 + 96);
v9 = *(const char **)(v8 + 8);
if ( !v9 )
{
LABEL_15:
sub_1005E0E48(34, 101, 111, (__int64)"v3_bitst.c", 135);
sub_1005E19F0(6, v11, v12, v13, v14, v15, v16, v17, (char)"section:");
goto LABEL_16;
}
v10 = *(const char **)(v7 + 8);
while ( strcmp(*(const char **)(v8 + 16), v10) && strcmp(v9, v10) )
{
v9 = *(const char **)(v8 + 32);
v8 += 24;
if ( !v9 )
goto LABEL_15;
}
if ( !(unsigned int)sub_1005EEA6C(v5, *(_DWORD *)v8, 1) )
break;
if ( !*(_QWORD *)(v8 + 8) )
goto LABEL_15;
if ( ++v6 >= (int)sub_1005DEA4C(a3) )
return v5;
}
sub_1005E0E48(34, 101, 65, (__int64)"v3_bitst.c", 126);
LABEL_16:
sub_1005FBA78(v5);
return nullptr;
}
return v5;
}