//
// sub_18009E070 from 0x18009e070 to 0x18009e0ad (61 bytes)
//
// 2 xrefs:
// > cocos2d::CCArray::reduceMemoryFootprint @ 0x1800071d4
// > ??> @ 0x1801b7518
//
// 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
//
void *__fastcall sub_18009E070(unsigned int *a1)
{
unsigned int v2; // ecx
void *result; // rax
void *v4; // rcx
v2 = a1[1];
result = (void *)*a1;
if ( v2 > (unsigned int)result )
{
if ( !(_DWORD)result )
{
if ( v2 == 1 )
return result;
LODWORD(result) = 1;
}
v4 = *((void **)a1 + 2);
a1[1] = (unsigned int)result;
result = realloc(v4, 8LL * (unsigned int)result);
*((_QWORD *)a1 + 2) = result;
}
return result;
}