//
// cocos2d::CCLayerMultiplex::initWithLayers from 0x180050350 to 0x180050445 (245 bytes)
//
// 5 xrefs:
// > cocos2d::CCLayerMultiplex::create @ 0x18004faf2
// > ??> @ 0x18013847c
// > ??> @ 0x18013848c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b1f8c
//
// 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
//
bool __fastcall cocos2d::CCLayerMultiplex::initWithLayers(
cocos2d::CCLayerMultiplex *this,
struct cocos2d::CCLayer *a2,
char *a3)
{
cocos2d::CCDirector *v6; // rax
cocos2d::CCLayerMultiplex_vtbl *v7; // rdi
struct cocos2d::CCSize WinSize; // rax
struct cocos2d::CCArray *v9; // rax
struct cocos2d::CCObject *v10; // rax
cocos2d::CCArray *v11; // rcx
cocos2d::CCLayerMultiplex_vtbl *v12; // rbx
struct cocos2d::CCString *v13; // rax
v6 = cocos2d::CCDirector::sharedDirector();
if ( v6 )
{
v7 = this->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
WinSize = cocos2d::CCDirector::getWinSize(v6);
((void (__fastcall *)(cocos2d::CCLayerMultiplex *, struct cocos2d::CCSize))v7->setContentSize)(this, WinSize);
*(_WORD *)&this->m_bTouchEnabled = 0;
v9 = cocos2d::CCArray::createWithCapacity(5u);
*((_QWORD *)this + 52) = v9;
cocos2d::CCObject::retain(v9);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 52), a2);
v10 = *(struct cocos2d::CCObject **)a3;
if ( *(_QWORD *)a3 )
{
do
{
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 52), v10);
v10 = *((struct cocos2d::CCObject **)a3 + 1);
a3 += 8;
}
while ( v10 );
}
v11 = *((cocos2d::CCArray **)this + 52);
v12 = this->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
*((_DWORD *)this + 102) = 0;
v13 = cocos2d::CCArray::stringAtIndex(v11, 0);
((void (__fastcall *)(cocos2d::CCLayerMultiplex *, struct cocos2d::CCString *))v12->addChild_1)(this, v13);
LOBYTE(v6) = 1;
}
return (char)v6;
}