//
// sub_77BDE8 from 0x77bde8 to 0x77be24 (60 bytes)
//
// 9 xrefs:
// > sub_77C350 @ 0x77c3f6
// > sub_77D87C @ 0x77da60
// > sub_77D87C @ 0x77dd78
// > sub_77EC0C @ 0x77edda
// > sub_77EC0C @ 0x77ef6c
// > sub_77EFB0 @ 0x77f146
// > sub_77F3FC @ 0x77f45c
// > sub_7855B0 @ 0x78568e
// > sub_7855B0 @ 0x78588c
//
// 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
//
_DWORD *__fastcall sub_77BDE8(_DWORD *a1, int a2, int a3)
{
int v3; // r4
_DWORD *v4; // r3
v3 = a1[5];
if ( v3 >= a1[6] )
return nullptr;
v4 = (_DWORD *)(12 * v3 + a1[4]);
a1[5] = v3 + 1;
if ( a2 == 0 || v4 == nullptr || !a3 )
return nullptr;
*v4 = a3 == 0;
v4[1] = a2;
v4[2] = a3;
return v4;
}