//
// sub_1005877E0 from 0x1005877e0 to 0x100587860 (128 bytes)
//
// 1 xrefs:
// > sub_100566E34 @ 0x100566e58
//
// 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
//
__int64 __fastcall sub_1005877E0(_QWORD *a1, size_t __count)
{
_QWORD *v4; // x21
void *v6; // x8
v4 = a1 + 4398;
if ( a1[4398] )
return 0;
v6 = off_10085DED0(__count, 0xB0u);
if ( !v6 )
return 27;
a1[145] = __count;
*v4 = v6;
a1[4399] = 1;
return 0;
}