{"type": "func", "start": 6442779472, "end": 6442779717, "name": "cocos2d::CCLayerMultiplex::initWithLayers", "pseudocode": "// \n// cocos2d::CCLayerMultiplex::initWithLayers from 0x180050350 to 0x180050445 (245 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCLayerMultiplex::create @ 0x18004faf2\n// > <???> @ 0x18013847c\n// > <???> @ 0x18013848c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1f8c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nbool __fastcall cocos2d::CCLayerMultiplex::initWithLayers(\n        cocos2d::CCLayerMultiplex *this,\n        struct cocos2d::CCLayer *a2,\n        char *a3)\n{\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCLayerMultiplex_vtbl *v7; // rdi\n  struct cocos2d::CCSize WinSize; // rax\n  struct cocos2d::CCArray *v9; // rax\n  struct cocos2d::CCObject *v10; // rax\n  cocos2d::CCArray *v11; // rcx\n  cocos2d::CCLayerMultiplex_vtbl *v12; // rbx\n  struct cocos2d::CCString *v13; // rax\n\n  v6 = cocos2d::CCDirector::sharedDirector();\n  if ( v6 )\n  {\n    v7 = this->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    WinSize = cocos2d::CCDirector::getWinSize(v6);\n    ((void (__fastcall *)(cocos2d::CCLayerMultiplex *, struct cocos2d::CCSize))v7->setContentSize)(this, WinSize);\n    *(_WORD *)&this->m_bTouchEnabled = 0;\n    v9 = cocos2d::CCArray::createWithCapacity(5u);\n    *((_QWORD *)this + 52) = v9;\n    cocos2d::CCObject::retain(v9);\n    cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 52), a2);\n    v10 = *(struct cocos2d::CCObject **)a3;\n    if ( *(_QWORD *)a3 )\n    {\n      do\n      {\n        cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 52), v10);\n        v10 = *((struct cocos2d::CCObject **)a3 + 1);\n        a3 += 8;\n      }\n      while ( v10 );\n    }\n    v11 = *((cocos2d::CCArray **)this + 52);\n    v12 = this->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    *((_DWORD *)this + 102) = 0;\n    v13 = cocos2d::CCArray::stringAtIndex(v11, 0);\n    ((void (__fastcall *)(cocos2d::CCLayerMultiplex *, struct cocos2d::CCString *))v12->addChild_1)(this, v13);\n    LOBYTE(v6) = 1;\n  }\n  return (char)v6;\n}", "assembly": "; \n; cocos2d::CCLayerMultiplex::initWithLayers from 0x180050350 to 0x180050445 (245 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCLayerMultiplex::create @ 0x18004faf2\n; > <???> @ 0x18013847c\n; > <???> @ 0x18013848c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1f8c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180050350\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x180050355\npush    rsi                                                            ; +0xa, 0x18005035a\nsub     rsp, 20h                                                       ; +0xb, 0x18005035b\nmov     rbx, r8                                                        ; +0xf, 0x18005035f\nmov     rbp, rdx                                                       ; +0x12, 0x180050362\nmov     rsi, rcx                                                       ; +0x15, 0x180050365\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x18, 0x180050368\ntest    rax, rax                                                       ; +0x1d, 0x18005036d\njz      loc_180050435                                                  ; +0x20, 0x180050370\nmov     [rsp+28h+arg_0], rdi                                           ; +0x26, 0x180050376\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x2b, 0x18005037b\nmov     rdi, [rsi]                                                     ; +0x30, 0x180050380\nmov     rcx, rax                                                       ; +0x33, 0x180050383\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x36, 0x180050386\nmov     rdx, rax                                                       ; +0x3b, 0x18005038b\nmov     rcx, rsi                                                       ; +0x3e, 0x18005038e\ncall    qword ptr [rdi+128h]                                           ; +0x41, 0x180050391\nmov     ecx, 5; Count                                                  ; +0x47, 0x180050397\nmov     word ptr [rsi+168h], 0                                         ; +0x4c, 0x18005039c\ncall    ?createWithCapacity@CCArray@cocos2d@@SAPEAV12@I@Z; cocos2d::CCArray::createWithCapacity(uint) ; +0x55, 0x1800503a5\nmov     rcx, rax; this                                                 ; +0x5a, 0x1800503aa\nmov     [rsi+1A0h], rax                                                ; +0x5d, 0x1800503ad\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x64, 0x1800503b4\nmov     rcx, [rsi+1A0h]; this                                          ; +0x69, 0x1800503b9\nmov     rdx, rbp; struct cocos2d::CCObject *                           ; +0x70, 0x1800503c0\ncall    ?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x73, 0x1800503c3\nmov     rax, [rbx]                                                     ; +0x78, 0x1800503c8\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x7b, 0x1800503cb\ntest    rax, rax                                                       ; +0x80, 0x1800503d0\njz      short loc_1800503FC                                            ; +0x83, 0x1800503d3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x85, 0x1800503d5\nmov     rcx, [rsi+1A0h]; this                                          ; +0x90, 0x1800503e0\nmov     rdx, rax; struct cocos2d::CCObject *                           ; +0x97, 0x1800503e7\ncall    ?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x9a, 0x1800503ea\nmov     rax, [rbx+8]                                                   ; +0x9f, 0x1800503ef\nlea     rbx, [rbx+8]                                                   ; +0xa3, 0x1800503f3\ntest    rax, rax                                                       ; +0xa7, 0x1800503f7\njnz     short loc_1800503E0                                            ; +0xaa, 0x1800503fa\nmov     rcx, [rsi+1A0h]; this                                          ; +0xac, 0x1800503fc\nxor     edx, edx; unsigned int                                         ; +0xb3, 0x180050403\nmov     rbx, [rsi]                                                     ; +0xb5, 0x180050405\nmov     dword ptr [rsi+198h], 0                                        ; +0xb8, 0x180050408\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0xc2, 0x180050412\nmov     rdx, rax                                                       ; +0xc7, 0x180050417\nmov     rcx, rsi                                                       ; +0xca, 0x18005041a\ncall    qword ptr [rbx+1C0h]                                           ; +0xcd, 0x18005041d\nmov     al, 1                                                          ; +0xd3, 0x180050423\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xd5, 0x180050425\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xda, 0x18005042a\nadd     rsp, 20h                                                       ; +0xdf, 0x18005042f\npop     rsi                                                            ; +0xe3, 0x180050433\nretn                                                                   ; +0xe4, 0x180050434\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xe5, 0x180050435\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xea, 0x18005043a\nadd     rsp, 20h                                                       ; +0xef, 0x18005043f\npop     rsi                                                            ; +0xf3, 0x180050443\nretn                                                                   ; +0xf4, 0x180050444", "xrefs": ["cocos2d::CCLayerMultiplex::create @ 0x18004faf2", "<???> @ 0x18013847c", "<???> @ 0x18013848c", "<???> @ 0x1801438a8", "<???> @ 0x1801b1f8c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}