//
// cocos2d::CCArray::createWithCapacity from 0x180006b10 to 0x180006ba2 (146 bytes)
//
// 19 xrefs:
// > cocos2d::CCNode::addChild @ 0x180002bff
// > cocos2d::CCNode::childrenAlloc @ 0x180002d5e
// > cocos2d::CCDictionary::allKeys @ 0x180009874
// > cocos2d::CCAnimate::reverse @ 0x180035a29
// > cocos2d::CCLayerMultiplex::initWithArray @ 0x180050032
// > cocos2d::CCLayerMultiplex::initWithLayers @ 0x1800503a5
// > cocos2d::CCAnimationCache::parseVersion1 @ 0x18008a95d
// > cocos2d::CCAnimationCache::parseVersion2 @ 0x18008ace5
// > cocos2d::CCNotificationCenter::CCNotificationCenter @ 0x180092f59
// > cocos2d::CCNotificationCenter::postNotification @ 0x180093611
// > cocos2d::CCNotificationCenter::postNotification @ 0x180093732
// > cocos2d::CCNotificationCenter::sharedNotificationCenter @ 0x180093af6
// > cocos2d::CCTMXMapInfo::internalInit @ 0x1800af93e
// > cocos2d::CCTouchDispatcher::init @ 0x1800b2f42
// > cocos2d::CCTouchDispatcher::init @ 0x1800b2f58
// > cocos2d::CCTouchDispatcher::init @ 0x1800b2f6e
// > cocos2d::CCScheduler::scheduleScriptFunc @ 0x1800c1b4a
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ad93c
//
// 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
//
// Hidden C++ exception states: #wind=2
struct cocos2d::CCArray *__fastcall cocos2d::CCArray::createWithCapacity(size_t Count)
{
unsigned int v1; // esi
cocos2d::CCObject *v2; // rax
cocos2d::CCObject *v3; // rdi
v1 = Count;
v2 = (cocos2d::CCObject *)operator new(0x40u);
v3 = v2;
if ( v2 )
{
cocos2d::CCObject::CCObject(v2);
v3->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCArray::`vftable';
v3[1].__vftable = nullptr;
sub_18009DA50(&v3[1]);
v3[1].__vftable = (cocos2d::CCObject_vtbl *)sub_18009DC90(1u);
}
else
{
v3 = nullptr;
}
if ( v3 )
{
sub_18009DA50(&v3[1]);
v3[1].__vftable = (cocos2d::CCObject_vtbl *)sub_18009DC90(v1);
cocos2d::CCObject::autorelease(v3);
}
return (struct cocos2d::CCArray *)v3;
}