{"type": "func", "start": 6442816608, "end": 6442817001, "name": "cocos2d::CCMenu::initWithArray", "pseudocode": "// \n// cocos2d::CCMenu::initWithArray from 0x180059460 to 0x1800595e9 (393 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCMenu::createWithArray @ 0x1800592fb\n// > cocos2d::CCMenu::init @ 0x180059452\n// > <???> @ 0x18013892c\n// > <???> @ 0x180138984\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2afc\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\nchar __fastcall cocos2d::CCMenu::initWithArray(cocos2d::CCMenu *this, struct cocos2d::CCArray *a2)\n{\n  __int64 v4; // rdx\n  cocos2d::CCDirector *v5; // rax\n  __int64 v6; // rdx\n  cocos2d::CCMenu_vtbl *v7; // rbx\n  float *v8; // rax\n  cocos2d::CCMenu_vtbl *v9; // rbx\n  float *v10; // rax\n  cocos2d::CCObject *v11; // rdx\n  cocos2d::ccArray *data; // rbx\n  unsigned int v13; // esi\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rbx\n  cocos2d::CCObject **i; // rbp\n  cocos2d::CCRGBAProtocol_vtbl *v17; // rax\n  __int64 v18; // rdx\n  float v20; // [rsp+60h] [rbp+18h] BYREF\n  float v21; // [rsp+64h] [rbp+1Ch]\n  float v22; // [rsp+68h] [rbp+20h] BYREF\n\n  if ( !cocos2d::CCLayer::init(this) )\n    return 0;\n  ((void (__fastcall *)(cocos2d::CCMenu *, __int64))this->setTouchPriority)(this, 4294967168LL);\n  ((void (__fastcall *)(cocos2d::CCMenu *, __int64))this->setTouchMode)(this, 1);\n  LOBYTE(v4) = 1;\n  ((void (__fastcall *)(cocos2d::CCMenu *, __int64))this->setTouchEnabled)(this, v4);\n  this->m_bEnabled = 1;\n  v5 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v5);\n  LOBYTE(v6) = 1;\n  ((void (__fastcall *)(cocos2d::CCMenu *, __int64))this->ignoreAnchorPointForPosition)(this, v6);\n  v7 = this->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v8 = kmVec2Fill(&v22, 0.5, 0.5);\n  ((void (__fastcall *)(cocos2d::CCMenu *, float *))v7->setAnchorPoint)(this, v8);\n  ((void (__fastcall *)(cocos2d::CCMenu *, float *))this->setContentSize)(this, &v20);\n  v9 = this->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v10 = kmVec2Fill(&v22, v20 * 0.5, v21 * 0.5);\n  ((void (__fastcall *)(cocos2d::CCMenu *, float *))v9->setPosition_0)(this, v10);\n  if ( a2 )\n  {\n    data = a2->data;\n    v13 = 0;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      for ( i = &arr[num - 1]; arr <= i; ++arr )\n      {\n        v11 = *arr;\n        if ( !*arr )\n          break;\n        ((void (__fastcall *)(cocos2d::CCMenu *, cocos2d::CCObject *, _QWORD))this->addChild_0)(this, v11, v13++);\n      }\n    }\n  }\n  v17 = this->cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable;\n  LOBYTE(v11) = 1;\n  this->m_pSelectedItem = nullptr;\n  this->m_eState = kCCMenuStateWaiting;\n  ((void (__fastcall *)(cocos2d::CCRGBAProtocol *, cocos2d::CCObject *))v17->setCascadeColorEnabled)(\n    &this->cocos2d::CCRGBAProtocol,\n    v11);\n  LOBYTE(v18) = 1;\n  ((void (__fastcall *)(cocos2d::CCRGBAProtocol *, __int64))this->setCascadeOpacityEnabled)(\n    &this->cocos2d::CCRGBAProtocol,\n    v18);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCMenu::initWithArray from 0x180059460 to 0x1800595e9 (393 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCMenu::createWithArray @ 0x1800592fb\n; > cocos2d::CCMenu::init @ 0x180059452\n; > <???> @ 0x18013892c\n; > <???> @ 0x180138984\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2afc\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\npush    rbp                                                            ; +0x0, 0x180059460\npush    rdi                                                            ; +0x2, 0x180059462\nsub     rsp, 38h                                                       ; +0x3, 0x180059463\nmov     rbp, rdx                                                       ; +0x7, 0x180059467\nmov     rdi, rcx                                                       ; +0xa, 0x18005946a\ncall    ?init@CCLayer@cocos2d@@UEAA_NXZ; cocos2d::CCLayer::init(void)  ; +0xd, 0x18005946d\ntest    al, al                                                         ; +0x12, 0x180059472\njz      loc_1800595E0                                                  ; +0x14, 0x180059474\nmov     rax, [rdi]                                                     ; +0x1a, 0x18005947a\nmov     edx, 0FFFFFF80h                                                ; +0x1d, 0x18005947d\nmov     [rsp+48h+arg_0], rbx                                           ; +0x22, 0x180059482\nmov     rcx, rdi                                                       ; +0x27, 0x180059487\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0x2a, 0x18005948a\ncall    qword ptr [rax+3A0h]                                           ; +0x2f, 0x18005948f\nmov     rax, [rdi]                                                     ; +0x35, 0x180059495\nmov     edx, 1                                                         ; +0x38, 0x180059498\nmov     rcx, rdi                                                       ; +0x3d, 0x18005949d\ncall    qword ptr [rax+390h]                                           ; +0x40, 0x1800594a0\nmov     rax, [rdi]                                                     ; +0x46, 0x1800594a6\nmov     dl, 1                                                          ; +0x49, 0x1800594a9\nmov     rcx, rdi                                                       ; +0x4b, 0x1800594ab\ncall    qword ptr [rax+388h]                                           ; +0x4e, 0x1800594ae\nmov     byte ptr [rdi+1B0h], 1                                         ; +0x54, 0x1800594b4\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x5b, 0x1800594bb\nmov     rcx, rax                                                       ; +0x60, 0x1800594c0\nlea     rdx, [rsp+48h+arg_10]                                          ; +0x63, 0x1800594c3\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x68, 0x1800594c8\nmov     rax, [rdi]                                                     ; +0x6d, 0x1800594cd\nmov     dl, 1                                                          ; +0x70, 0x1800594d0\nmov     rcx, rdi                                                       ; +0x72, 0x1800594d2\ncall    qword ptr [rax+1A0h]                                           ; +0x75, 0x1800594d5\nmovss   xmm6, cs:dword_1800E6308                                       ; +0x7b, 0x1800594db\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x83, 0x1800594e3\nmov     rbx, [rdi]                                                     ; +0x88, 0x1800594e8\nmovaps  xmm2, xmm6                                                     ; +0x8b, 0x1800594eb\nmovaps  xmm1, xmm6                                                     ; +0x8e, 0x1800594ee\ncall    kmVec2Fill                                                     ; +0x91, 0x1800594f1\nmov     rdx, rax                                                       ; +0x96, 0x1800594f6\nmov     rcx, rdi                                                       ; +0x99, 0x1800594f9\ncall    qword ptr [rbx+110h]                                           ; +0x9c, 0x1800594fc\nmov     rax, [rdi]                                                     ; +0xa2, 0x180059502\nlea     rdx, [rsp+48h+arg_10]                                          ; +0xa5, 0x180059505\nmov     rcx, rdi                                                       ; +0xaa, 0x18005950a\ncall    qword ptr [rax+128h]                                           ; +0xad, 0x18005950d\nmovss   xmm2, [rsp+48h+arg_14]                                         ; +0xb3, 0x180059513\nlea     rcx, [rsp+48h+arg_18]                                          ; +0xb9, 0x180059519\nmovss   xmm1, [rsp+48h+arg_10]                                         ; +0xbe, 0x18005951e\nmov     rbx, [rdi]                                                     ; +0xc4, 0x180059524\nmulss   xmm2, xmm6                                                     ; +0xc7, 0x180059527\nmulss   xmm1, xmm6                                                     ; +0xcb, 0x18005952b\ncall    kmVec2Fill                                                     ; +0xcf, 0x18005952f\nmov     rdx, rax                                                       ; +0xd4, 0x180059534\nmov     rcx, rdi                                                       ; +0xd7, 0x180059537\ncall    qword ptr [rbx+0B8h]                                           ; +0xda, 0x18005953a\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0xe0, 0x180059540\ntest    rbp, rbp                                                       ; +0xe5, 0x180059545\njz      short loc_180059597                                            ; +0xe8, 0x180059548\nmov     rbx, [rbp+38h]                                                 ; +0xea, 0x18005954a\nmov     [rsp+48h+var_18], rsi                                          ; +0xee, 0x18005954e\nxor     esi, esi                                                       ; +0xf3, 0x180059553\nmov     eax, [rbx]                                                     ; +0xf5, 0x180059555\ntest    eax, eax                                                       ; +0xf7, 0x180059557\njz      short loc_180059592                                            ; +0xf9, 0x180059559\nmov     rbx, [rbx+10h]                                                 ; +0xfb, 0x18005955b\nlea     rbp, [rax-1]                                                   ; +0xff, 0x18005955f\nlea     rbp, [rbx+rbp*8]                                               ; +0x103, 0x180059563\ncmp     rbx, rbp                                                       ; +0x107, 0x180059567\nja      short loc_180059592                                            ; +0x10a, 0x18005956a\nnop     dword ptr [rax+00h]                                            ; +0x10c, 0x18005956c\nmov     rdx, [rbx]                                                     ; +0x110, 0x180059570\ntest    rdx, rdx                                                       ; +0x113, 0x180059573\njz      short loc_180059592                                            ; +0x116, 0x180059576\nmov     rax, [rdi]                                                     ; +0x118, 0x180059578\nmov     r8d, esi                                                       ; +0x11b, 0x18005957b\nmov     rcx, rdi                                                       ; +0x11e, 0x18005957e\ncall    qword ptr [rax+1B8h]                                           ; +0x121, 0x180059581\ninc     esi                                                            ; +0x127, 0x180059587\nadd     rbx, 8                                                         ; +0x129, 0x180059589\ncmp     rbx, rbp                                                       ; +0x12d, 0x18005958d\njbe     short loc_180059570                                            ; +0x130, 0x180059590\nmov     rsi, [rsp+48h+var_18]                                          ; +0x132, 0x180059592\nmov     rax, [rdi+198h]                                                ; +0x137, 0x180059597\nlea     rcx, [rdi+198h]                                                ; +0x13e, 0x18005959e\nmov     dl, 1                                                          ; +0x145, 0x1800595a5\nmov     qword ptr [rdi+1B8h], 0                                        ; +0x147, 0x1800595a7\nmov     dword ptr [rdi+1B4h], 0                                        ; +0x152, 0x1800595b2\ncall    qword ptr [rax+48h]                                            ; +0x15c, 0x1800595bc\nmov     rax, [rdi+198h]                                                ; +0x15f, 0x1800595bf\nlea     rcx, [rdi+198h]                                                ; +0x166, 0x1800595c6\nmov     dl, 1                                                          ; +0x16d, 0x1800595cd\ncall    qword ptr [rax+60h]                                            ; +0x16f, 0x1800595cf\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x172, 0x1800595d2\nmov     al, 1                                                          ; +0x177, 0x1800595d7\nadd     rsp, 38h                                                       ; +0x179, 0x1800595d9\npop     rdi                                                            ; +0x17d, 0x1800595dd\npop     rbp                                                            ; +0x17e, 0x1800595de\nretn                                                                   ; +0x17f, 0x1800595df\nxor     al, al                                                         ; +0x180, 0x1800595e0\nadd     rsp, 38h                                                       ; +0x182, 0x1800595e2\npop     rdi                                                            ; +0x186, 0x1800595e6\npop     rbp                                                            ; +0x187, 0x1800595e7\nretn                                                                   ; +0x188, 0x1800595e8", "xrefs": ["cocos2d::CCMenu::createWithArray @ 0x1800592fb", "cocos2d::CCMenu::init @ 0x180059452", "<???> @ 0x18013892c", "<???> @ 0x180138984", "<???> @ 0x1801438a8", "<???> @ 0x1801b2afc"], "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"}