//
// sub_B0794 from 0xb0794 to 0xb0828 (148 bytes)
//
// 3 xrefs:
// > ??> @ 0xb0792
// > sub_62B54 @ 0x62f6a
// > sub_B0630 @ 0xb077c
//
// 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_B0794(int a1)
{
int result; // r0
int v3; // r2
_DWORD *v4; // r5
_DWORD *v5; // r0
int v6[9]; // [sp+10h] [bp-40h] BYREF
__int16 v7; // [sp+34h] [bp-1Ch]
int v8; // [sp+38h] [bp-18h]
v6[0] = (int)v6;
v6[1] = (int)v6;
memset(&v6[2], 0, 0x1Cu);
result = 0;
v8 = 0;
v7 = 1;
v3 = *(_DWORD *)(a1 + 220);
if ( v3 )
{
result = (*(int (__fastcall **)(_DWORD, int *))(*(_DWORD *)v3 + 8))(*(_DWORD *)(a1 + 220), v6);
if ( !result )
{
v4 = *(_DWORD **)(a1 + 216);
if ( !v4 )
{
v5 = (_DWORD *)sub_BD410(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 44, "../../src/fmod_codec.cpp", 254);
if ( !v5 )
{
*(_DWORD *)(a1 + 216) = 0;
return 38;
}
v4 = v5;
*v5 = v5;
v5[1] = v5;
memset(v5 + 2, 0, 0x1Cu);
v4[10] = 0;
*((_WORD *)v4 + 18) = 1;
*(_DWORD *)(a1 + 216) = v4;
}
return sub_4F0BE(v4, v6);
}
}
return result;
}