//
// sub_4BFE4 from 0x4bfe4 to 0x4c08e (170 bytes)
//
// 0 xrefs:
//
// 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_4BFE4(_DWORD *a1, float *a2, int a3)
{
int v4; // r0
int v6; // r1
int v8; // r9
int v9; // r0
int v10; // r0
float v11; // r1
float *v13; // r4
int i; // r0
float v15; // s2
_BYTE v16[4096]; // [sp+8h] [bp-1018h] BYREF
v4 = a1[83];
if ( !v4 || !a1[4] )
return 30;
v6 = *(_DWORD *)(v4 + 20);
if ( v6 )
{
v8 = *(_DWORD *)(v6 + 76);
goto LABEL_7;
}
v9 = *(_DWORD *)(v4 + 24);
if ( !v9 )
return 30;
v8 = *(unsigned __int16 *)(v9 + 192);
LABEL_7:
if ( a3 < 1 )
return 31;
v10 = 0;
while ( a3 != v10 )
{
v11 = a2[v10++];
if ( (LODWORD(v11) & 0x7F800000) == 0x7F800000 )
return 29;
}
v13 = (float *)v16;
memset(v16, 0, sizeof(v16));
for ( i = 0; i < v8; ++i )
{
v15 = 1.0;
if ( i < a3 )
v15 = *a2;
*v13 = v15;
++a2;
v13 += 33;
}
return (*(int (__fastcall **)(_DWORD *, _BYTE *, int, int, int, int))(*a1 + 100))(a1, v16, v8, v8, 32, 1);
}