//
// sub_71738 from 0x71738 to 0x7180a (210 bytes)
//
// 1 xrefs:
// > sub_71880 @ 0x719ae
//
// 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_71738(int a1, int a2, int *a3, int *a4)
{
int v7; // r0
int v8; // r8
int result; // r0
int v10; // r0
int v11; // r12
unsigned __int8 *v12; // r2
int v13; // r3
int v14; // t1
unsigned __int8 *v15; // r5
unsigned int v16; // r6
unsigned int *v17; // r2
unsigned int i; // r4
v7 = sub_BD410(
*(int *)((char *)&dword_14C + (_DWORD)off_E8000),
*(_DWORD *)(a2 + 12),
"../../src/fmod_codec_fsb5.cpp",
362);
if ( !v7 )
return 38;
v8 = v7;
result = sub_BB750(a1, v7, 1, *(_DWORD *)(a2 + 12), 0);
if ( result )
return result;
v10 = sub_BD410(
*(int *)((char *)&dword_14C + (_DWORD)off_E8000),
4 * *(_DWORD *)(a2 + 8),
"../../src/fmod_codec_fsb5.cpp",
371);
if ( !v10 )
return 38;
v11 = 0;
v12 = (unsigned __int8 *)v8;
while ( v11 < *(_DWORD *)(a2 + 8) )
{
*(_DWORD *)(v10 + 4 * v11) = &v12[-v8];
v14 = *v12;
v12 += 8;
v13 = v14;
while ( v13 << 31 )
{
v15 = v12 + 4;
v13 = *(_DWORD *)v12;
v16 = (*(_DWORD *)v12 >> 1) & 0xFFFFFF;
if ( (*(_DWORD *)v12 & 0xFE000000) == 0xC000000 )
{
v17 = (unsigned int *)(v12 + 4);
for ( i = v16 >> 2; i; --i )
{
*v17 = bswap32(*v17);
++v17;
}
}
v12 = &v15[v16];
}
++v11;
}
*a3 = v8;
*a4 = v10;
return 0;
}