//
// sub_71EB4 from 0x71eb4 to 0x71ff2 (318 bytes)
//
// 1 xrefs:
// > sub_71524 @ 0x71524
//
// 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_71EB4(_DWORD *a1, int a2, _DWORD *a3)
{
int v4; // r1
int v6; // r3
__int64 v7; // kr00_8
int v8; // r0
unsigned int v9; // r5
unsigned int *v10; // r10
unsigned int v11; // t1
unsigned int *v12; // r3
int v13; // r10
unsigned int *v14; // r4
unsigned int *v15; // r5
int v16; // r0
int *v17; // r6
unsigned int v18; // r5
int v19; // t1
int v20; // r0
int v21; // r0
int v22; // r1
int v25; // [sp+14h] [bp-2Ch]
unsigned int v26; // [sp+18h] [bp-28h]
unsigned int v27; // [sp+1Ch] [bp-24h]
unsigned int v28; // [sp+20h] [bp-20h]
v4 = a1[57];
v6 = a2;
if ( v4 )
v6 = *(_DWORD *)(v4 + 4 * a2);
v7 = *(_QWORD *)(a1[56] + 48);
v8 = *(_DWORD *)(v7 + 4 * v6);
v10 = (unsigned int *)(HIDWORD(v7) + v8 + 8);
v9 = *(unsigned __int8 *)(HIDWORD(v7) + v8);
while ( 1 )
{
if ( !(v9 << 31) )
return 0;
v11 = *v10++;
v9 = v11;
v27 = (v11 >> 1) & 0xFFFFFF;
if ( v11 >> 25 == 5 )
{
v17 = (int *)v10;
v26 = v9;
v18 = v27 >> 2;
v28 = v27 >> 2;
while ( v18 )
{
v19 = *v17++;
v16 = (*(int (__fastcall **)(_DWORD *, int, int, _DWORD, _DWORD, int, _DWORD))(*a3 + 132))(
a3,
v19,
2,
0,
0,
a2,
0);
--v18;
if ( v16 )
return v16;
}
}
else
{
if ( v9 >> 25 != 4 )
goto LABEL_23;
v26 = v9;
v12 = v10;
v13 = -1;
v14 = v12;
v28 = v27 / 0x104;
while ( ++v13 < v28 )
{
v15 = v12 + 65;
v16 = (*(int (__fastcall **)(_DWORD *, unsigned int, int, unsigned int *, _DWORD, int, _DWORD))(*a3 + 132))(
a3,
*v12,
2,
v12 + 1,
0,
a2,
0);
v12 = v15;
if ( v16 )
return v16;
}
v10 = v14;
}
v9 = v26;
if ( !v28 )
{
LABEL_23:
v22 = 0;
v10 = (unsigned int *)((char *)v10 + v27);
goto LABEL_24;
}
if ( a3[31] )
break;
LABEL_21:
v21 = sub_56690((int)a3);
if ( !v21 )
goto LABEL_23;
v22 = 1;
v25 = v21;
LABEL_24:
if ( v22 )
return v25;
}
v20 = a3[42];
if ( v20
|| (v20 = sub_BD580(
*(int *)((char *)&dword_14C + (_DWORD)off_E8000),
4 * a1[3],
"../../src/fmod_codec_fsb5.cpp",
908,
0),
(a3[42] = v20) != 0) )
{
*(_DWORD *)(v20 + 4 * a2) = v28;
goto LABEL_21;
}
return 38;
}