{"type": "func", "start": 4295333792, "end": 4295333976, "name": "CCMenuItemToggler::create", "pseudocode": "// \n// CCMenuItemToggler::create from 0x1000597a0 to 0x100059858 (184 bytes)\n// \n// 39 xrefs:\n// > EditorUI::setupCreateMenu @ 0x10002a149\n// > AccountLayer::createToggleButton @ 0x1000ccfc2\n// > CustomizeObjectLayer::createToggleButton @ 0x1001f8ee2\n// > MessagesProfilePage::init @ 0x10022dfba\n// > LevelCell::loadFromLevel @ 0x100244875\n// > GJRequestCell::loadFromScore @ 0x10024c82f\n// > GJMessageCell::loadFromMessage @ 0x10024d14e\n// > LevelSettingsLayer::createToggleButton @ 0x10026e451\n// > ShareLevelSettingsLayer::init @ 0x100282a23\n// > ShareLevelSettingsLayer::init @ 0x100282c9f\n// > CollisionBlockPopup::createToggleButton @ 0x100286e51\n// > GJAccountSettingsLayer::createToggleButton @ 0x1002a12ab\n// > GJGarageLayer::setupIconSelect @ 0x10036b61e\n// > GJGarageLayer::setupIconSelect @ 0x10036b689\n// > GJGarageLayer::setupIconSelect @ 0x10036b6f7\n// > GJGarageLayer::setupIconSelect @ 0x10036b765\n// > GJGarageLayer::setupIconSelect @ 0x10036b7d3\n// > GJGarageLayer::setupIconSelect @ 0x10036b841\n// > GJGarageLayer::setupIconSelect @ 0x10036b8af\n// > GJGarageLayer::setupIconSelect @ 0x10036b91d\n// > GJGarageLayer::setupIconSelect @ 0x10036b98b\n// > GJGarageLayer::setupIconSelect @ 0x10036b9f9\n// > GJGarageLayer::setupIconSelect @ 0x10036ba67\n// > SupportLayer::createToggleButton @ 0x10039a352\n// > PauseLayer::createToggleButton @ 0x1003d7681\n// > LevelBrowserLayer::init @ 0x10048bd4f\n// > GameToolbox::createToggleButton @ 0x1004eee73\n// > LeaderboardsLayer::setupTabs @ 0x100512f45\n// > LeaderboardsLayer::setupTabs @ 0x100513001\n// > LeaderboardsLayer::setupTabs @ 0x1005130bd\n// > LeaderboardsLayer::setupTabs @ 0x100513174\n// > ColorSelectLiveOverlay::createToggleButton @ 0x10056a221\n// > ShareCommentLayer::init @ 0x1005e0036\n// > MoreSearchLayer::createToggleButton @ 0x10062e532\n// > CharacterColorPage::init @ 0x10065d5cf\n// > ColorSelectPopup::init @ 0x100725fb0\n// > FRequestProfilePage::init @ 0x1007903f7\n// > OptionsLayer::createToggleButton @ 0x10079ad32\n// > VideoOptionsLayer::createToggleButton @ 0x10079ffd5\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\nCCMenuItemToggler *__fastcall CCMenuItemToggler::create(\n        cocos2d::CCNode *a1,\n        cocos2d::CCNode *a2,\n        cocos2d::CCObject *a3,\n        cocos2d::SEL_MenuHandler a4)\n{\n  void (__cdecl *ptr)(cocos2d::CCObject *); // r15\n  char *v6; // rbx\n  cocos2d::SEL_MenuHandler v7; // r8\n  size_t adj; // [rsp+0h] [rbp-30h]\n\n  adj = a4.adj;\n  ptr = a4.ptr;\n  v6 = (char *)operator new(0x190u);\n  cocos2d::CCNodeRGBA::CCNodeRGBA(v6);\n  *((_WORD *)v6 + 169) = 0;\n  *(_OWORD *)(v6 + 344) = 0;\n  *(_OWORD *)(v6 + 360) = 0;\n  *(_QWORD *)v6 = off_1008B2FE8;\n  *((_QWORD *)v6 + 40) = off_1008B3418;\n  *(_OWORD *)(v6 + 376) = 0;\n  *((_WORD *)v6 + 196) = 0;\n  v7.ptr = ptr;\n  v7.adj = adj;\n  if ( CCMenuItemToggler::init((CCMenuItemToggler *)v6, a1, a2, a3, v7) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v6);\n  }\n  else\n  {\n    (*(void (__fastcall **)(char *))(*(_QWORD *)v6 + 16LL))(v6);\n    return nullptr;\n  }\n  return (CCMenuItemToggler *)v6;\n}", "assembly": "; \n; CCMenuItemToggler::create from 0x1000597a0 to 0x100059858 (184 bytes)\n; \n; 39 xrefs:\n; > EditorUI::setupCreateMenu @ 0x10002a149\n; > AccountLayer::createToggleButton @ 0x1000ccfc2\n; > CustomizeObjectLayer::createToggleButton @ 0x1001f8ee2\n; > MessagesProfilePage::init @ 0x10022dfba\n; > LevelCell::loadFromLevel @ 0x100244875\n; > GJRequestCell::loadFromScore @ 0x10024c82f\n; > GJMessageCell::loadFromMessage @ 0x10024d14e\n; > LevelSettingsLayer::createToggleButton @ 0x10026e451\n; > ShareLevelSettingsLayer::init @ 0x100282a23\n; > ShareLevelSettingsLayer::init @ 0x100282c9f\n; > CollisionBlockPopup::createToggleButton @ 0x100286e51\n; > GJAccountSettingsLayer::createToggleButton @ 0x1002a12ab\n; > GJGarageLayer::setupIconSelect @ 0x10036b61e\n; > GJGarageLayer::setupIconSelect @ 0x10036b689\n; > GJGarageLayer::setupIconSelect @ 0x10036b6f7\n; > GJGarageLayer::setupIconSelect @ 0x10036b765\n; > GJGarageLayer::setupIconSelect @ 0x10036b7d3\n; > GJGarageLayer::setupIconSelect @ 0x10036b841\n; > GJGarageLayer::setupIconSelect @ 0x10036b8af\n; > GJGarageLayer::setupIconSelect @ 0x10036b91d\n; > GJGarageLayer::setupIconSelect @ 0x10036b98b\n; > GJGarageLayer::setupIconSelect @ 0x10036b9f9\n; > GJGarageLayer::setupIconSelect @ 0x10036ba67\n; > SupportLayer::createToggleButton @ 0x10039a352\n; > PauseLayer::createToggleButton @ 0x1003d7681\n; > LevelBrowserLayer::init @ 0x10048bd4f\n; > GameToolbox::createToggleButton @ 0x1004eee73\n; > LeaderboardsLayer::setupTabs @ 0x100512f45\n; > LeaderboardsLayer::setupTabs @ 0x100513001\n; > LeaderboardsLayer::setupTabs @ 0x1005130bd\n; > LeaderboardsLayer::setupTabs @ 0x100513174\n; > ColorSelectLiveOverlay::createToggleButton @ 0x10056a221\n; > ShareCommentLayer::init @ 0x1005e0036\n; > MoreSearchLayer::createToggleButton @ 0x10062e532\n; > CharacterColorPage::init @ 0x10065d5cf\n; > ColorSelectPopup::init @ 0x100725fb0\n; > FRequestProfilePage::init @ 0x1007903f7\n; > OptionsLayer::createToggleButton @ 0x10079ad32\n; > VideoOptionsLayer::createToggleButton @ 0x10079ffd5\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, 0x1000597a0\nmov     rbp, rsp                                                       ; +0x1, 0x1000597a1\npush    r15                                                            ; +0x4, 0x1000597a4\npush    r14                                                            ; +0x6, 0x1000597a6\npush    r13                                                            ; +0x8, 0x1000597a8\npush    r12                                                            ; +0xa, 0x1000597aa\npush    rbx                                                            ; +0xc, 0x1000597ac\npush    rax                                                            ; +0xd, 0x1000597ad\nmov     [rbp+var_30], r8                                               ; +0xe, 0x1000597ae\nmov     r15, rcx                                                       ; +0x12, 0x1000597b2\nmov     r12, rdx                                                       ; +0x15, 0x1000597b5\nmov     r13, rsi                                                       ; +0x18, 0x1000597b8\nmov     r14, rdi                                                       ; +0x1b, 0x1000597bb\nmov     edi, 190h; __sz                                                ; +0x1e, 0x1000597be\ncall    __Znwm; operator new(ulong)                                    ; +0x23, 0x1000597c3\nmov     rbx, rax                                                       ; +0x28, 0x1000597c8\nmov     rdi, rax                                                       ; +0x2b, 0x1000597cb\ncall    cocos2d__CCNodeRGBA__CCNodeRGBA                                ; +0x2e, 0x1000597ce\nmov     word ptr [rbx+152h], 0                                         ; +0x33, 0x1000597d3\nxorps   xmm0, xmm0                                                     ; +0x3c, 0x1000597dc\nmovups  xmmword ptr [rbx+158h], xmm0                                   ; +0x3f, 0x1000597df\nmovups  xmmword ptr [rbx+168h], xmm0                                   ; +0x46, 0x1000597e6\nlea     rax, off_1008B2FE8                                             ; +0x4d, 0x1000597ed\nmov     [rbx], rax                                                     ; +0x54, 0x1000597f4\nlea     rax, off_1008B3418                                             ; +0x57, 0x1000597f7\nmov     [rbx+140h], rax                                                ; +0x5e, 0x1000597fe\nmovups  xmmword ptr [rbx+178h], xmm0                                   ; +0x65, 0x100059805\nmov     word ptr [rbx+188h], 0                                         ; +0x6c, 0x10005980c\nmov     rdi, rbx                                                       ; +0x75, 0x100059815\nmov     rsi, r14                                                       ; +0x78, 0x100059818\nmov     rdx, r13                                                       ; +0x7b, 0x10005981b\nmov     rcx, r12                                                       ; +0x7e, 0x10005981e\nmov     r8, r15                                                        ; +0x81, 0x100059821\nmov     r9, [rbp+var_30]                                               ; +0x84, 0x100059824\ncall    CCMenuItemToggler__init                                        ; +0x88, 0x100059828\ntest    al, al                                                         ; +0x8d, 0x10005982d\njz      short loc_10005983B                                            ; +0x8f, 0x10005982f\nmov     rdi, rbx                                                       ; +0x91, 0x100059831\ncall    cocos2d__CCObject__autorelease                                 ; +0x94, 0x100059834\njmp     short loc_100059846                                            ; +0x99, 0x100059839\nmov     rax, [rbx]                                                     ; +0x9b, 0x10005983b\nmov     rdi, rbx                                                       ; +0x9e, 0x10005983e\ncall    qword ptr [rax+10h]                                            ; +0xa1, 0x100059841\nxor     ebx, ebx                                                       ; +0xa4, 0x100059844\nmov     rax, rbx                                                       ; +0xa6, 0x100059846\nadd     rsp, 8                                                         ; +0xa9, 0x100059849\npop     rbx                                                            ; +0xad, 0x10005984d\npop     r12                                                            ; +0xae, 0x10005984e\npop     r13                                                            ; +0xb0, 0x100059850\npop     r14                                                            ; +0xb2, 0x100059852\npop     r15                                                            ; +0xb4, 0x100059854\npop     rbp                                                            ; +0xb6, 0x100059856\nretn                                                                   ; +0xb7, 0x100059857", "xrefs": ["EditorUI::setupCreateMenu @ 0x10002a149", "AccountLayer::createToggleButton @ 0x1000ccfc2", "CustomizeObjectLayer::createToggleButton @ 0x1001f8ee2", "MessagesProfilePage::init @ 0x10022dfba", "LevelCell::loadFromLevel @ 0x100244875", "GJRequestCell::loadFromScore @ 0x10024c82f", "GJMessageCell::loadFromMessage @ 0x10024d14e", "LevelSettingsLayer::createToggleButton @ 0x10026e451", "ShareLevelSettingsLayer::init @ 0x100282a23", "ShareLevelSettingsLayer::init @ 0x100282c9f", "CollisionBlockPopup::createToggleButton @ 0x100286e51", "GJAccountSettingsLayer::createToggleButton @ 0x1002a12ab", "GJGarageLayer::setupIconSelect @ 0x10036b61e", "GJGarageLayer::setupIconSelect @ 0x10036b689", "GJGarageLayer::setupIconSelect @ 0x10036b6f7", "GJGarageLayer::setupIconSelect @ 0x10036b765", "GJGarageLayer::setupIconSelect @ 0x10036b7d3", "GJGarageLayer::setupIconSelect @ 0x10036b841", "GJGarageLayer::setupIconSelect @ 0x10036b8af", "GJGarageLayer::setupIconSelect @ 0x10036b91d", "GJGarageLayer::setupIconSelect @ 0x10036b98b", "GJGarageLayer::setupIconSelect @ 0x10036b9f9", "GJGarageLayer::setupIconSelect @ 0x10036ba67", "SupportLayer::createToggleButton @ 0x10039a352", "PauseLayer::createToggleButton @ 0x1003d7681", "LevelBrowserLayer::init @ 0x10048bd4f", "GameToolbox::createToggleButton @ 0x1004eee73", "LeaderboardsLayer::setupTabs @ 0x100512f45", "LeaderboardsLayer::setupTabs @ 0x100513001", "LeaderboardsLayer::setupTabs @ 0x1005130bd", "LeaderboardsLayer::setupTabs @ 0x100513174", "ColorSelectLiveOverlay::createToggleButton @ 0x10056a221", "ShareCommentLayer::init @ 0x1005e0036", "MoreSearchLayer::createToggleButton @ 0x10062e532", "CharacterColorPage::init @ 0x10065d5cf", "ColorSelectPopup::init @ 0x100725fb0", "FRequestProfilePage::init @ 0x1007903f7", "OptionsLayer::createToggleButton @ 0x10079ad32", "VideoOptionsLayer::createToggleButton @ 0x10079ffd5"], "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"}