//
// sub_B3DF4 from 0xb3df4 to 0xb3e4e (90 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_B3DF4(int a1, void *a2, int a3, int *a4, _DWORD *a5)
{
int result; // r0
int *v8; // r6
int v9; // r0
int v10; // r5
int *v11; // [sp+4h] [bp-14h] BYREF
v11 = nullptr;
result = (*(int (__fastcall **)(int, int **))(*(_DWORD *)(a1 + 24) + 44))(a1, &v11);
if ( !result )
{
v8 = v11;
v9 = v11[4];
if ( v9 )
{
v10 = *a4 * *a5;
qmemcpy(a2, (const void *)(v11[14] + v9), 4 * v10);
v8[14] += 4 * v10;
}
else
{
result = sub_6717C(v11[2], (int)a2, *a4);
if ( result )
return result;
}
return 0;
}
return result;
}