//
// cocos2d::CCArray::create from 0x180006b10 to 0x180006b9c (140 bytes)
//
// 4 xrefs:
// > cocos2d::CCMenu::create @ 0x18005b258
// > cocos2d::CCMenu::createWithItems @ 0x18005b356
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b793c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:18 +0000
//
struct cocos2d::CCArray *cocos2d::CCArray::create(struct cocos2d::CCObject *a1, __int64 a2, ...)
{
struct cocos2d::CCArray *v2; // rax
struct cocos2d::CCArray *v3; // rbx
__int64 v4; // rax
va_list v5; // rdi
va_list va; // [rsp+50h] [rbp+18h] BYREF
va_start(va, a2);
v2 = cocos2d::CCArray::create();
v3 = v2;
if ( !v2 )
return v3;
if ( !a1 )
{
(*(void (__fastcall **)(struct cocos2d::CCArray *, __int64))(*(_QWORD *)v2 + 8LL))(v2, 1);
return nullptr;
}
sub_1800A12A0(*((_QWORD *)v2 + 7), a1);
v4 = a2;
va_copy(v5, va);
if ( !a2 )
return v3;
do
{
sub_1800A12A0(*((_QWORD *)v3 + 7), v4);
v4 = *(_QWORD *)v5;
v5 += 8;
}
while ( v4 );
return v3;
}