{"type": "func", "start": 5728788, "end": 5729048, "name": "CCMenuItemToggler::create", "pseudocode": "// \n// CCMenuItemToggler::create from 0x576a14 to 0x576b18 (260 bytes)\n// \n// 40 xrefs:\n// > GameToolbox::createToggleButton @ 0x580034\n// > LevelCell::loadFromLevel @ 0x612778\n// > GJRequestCell::loadFromScore @ 0x61c660\n// > GJMessageCell::loadFromMessage @ 0x61d398\n// > EditorUI::setupCreateMenu @ 0x6b34a8\n// > PauseLayer::createToggleButton @ 0x6c6d74\n// > MoreSearchLayer::createToggleButton @ 0x6d394c\n// > ShareLevelSettingsLayer::init @ 0x6e5f3c\n// > ShareLevelSettingsLayer::init @ 0x6e6180\n// > LevelBrowserLayer::init @ 0x6ebc5c\n// > ColorSelectPopup::init @ 0x73f0e0\n// > GJGarageLayer::setupIconSelect @ 0x7983dc\n// > GJGarageLayer::setupIconSelect @ 0x798454\n// > GJGarageLayer::setupIconSelect @ 0x7984c8\n// > GJGarageLayer::setupIconSelect @ 0x79853c\n// > GJGarageLayer::setupIconSelect @ 0x7985b0\n// > GJGarageLayer::setupIconSelect @ 0x798624\n// > GJGarageLayer::setupIconSelect @ 0x798698\n// > GJGarageLayer::setupIconSelect @ 0x79870c\n// > GJGarageLayer::setupIconSelect @ 0x798780\n// > GJGarageLayer::setupIconSelect @ 0x7987f4\n// > GJGarageLayer::setupIconSelect @ 0x79886c\n// > OptionsLayer::createToggleButton @ 0x7c9678\n// > VideoOptionsLayer::createToggleButton @ 0x7cca00\n// > SupportLayer::createToggleButton @ 0x7dd0c4\n// > ShareCommentLayer::init @ 0x7e736c\n// > LeaderboardsLayer::setupTabs @ 0x81de0c\n// > LeaderboardsLayer::setupTabs @ 0x81deb8\n// > LeaderboardsLayer::setupTabs @ 0x81df5c\n// > LeaderboardsLayer::setupTabs @ 0x81e000\n// > CustomizeObjectLayer::createToggleButton @ 0x8404fc\n// > AccountLayer::createToggleButton @ 0x84afec\n// > GJAccountSettingsLayer::createToggleButton @ 0x8c9fb8\n// > MessagesProfilePage::init @ 0x8f3690\n// > FRequestProfilePage::init @ 0x8f5eec\n// > CollisionBlockPopup::createToggleButton @ 0x90932c\n// > ColorSelectLiveOverlay::createToggleButton @ 0x90a99c\n// > CharacterColorPage::init @ 0xa25e84\n// > LevelSettingsLayer::createToggleButton @ 0xa35398\n// > <???> @ 0x73cf8\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 *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 *); // x20\n  size_t adj; // x21\n  __int64 v9; // x19\n  cocos2d::SEL_MenuHandler v11; // 0:x4.16\n\n  ptr = a4.ptr;\n  adj = a4.adj;\n  v9 = operator new(0x190u);\n  cocos2d::CCNodeRGBA::CCNodeRGBA((cocos2d::CCNodeRGBA *)v9);\n  *(_BYTE *)(v9 + 338) = 0;\n  *(_BYTE *)(v9 + 339) = 0;\n  *(_QWORD *)(v9 + 344) = 0;\n  *(_QWORD *)(v9 + 352) = 0;\n  *(_QWORD *)(v9 + 360) = 0;\n  v11.ptr = ptr;\n  *(_DWORD *)(v9 + 368) = 0;\n  v11.adj = adj;\n  *(_DWORD *)(v9 + 372) = 0;\n  *(_QWORD *)(v9 + 376) = 0;\n  *(_QWORD *)(v9 + 384) = 0;\n  *(_QWORD *)v9 = &off_1138E90;\n  *(_QWORD *)(v9 + 320) = &off_11392C0;\n  *(_BYTE *)(v9 + 392) = 0;\n  *(_BYTE *)(v9 + 393) = 0;\n  if ( CCMenuItemToggler::init((CCMenuItemToggler *)v9, a1, a2, a3, v11) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v9);\n    return (CCMenuItemToggler *)v9;\n  }\n  else\n  {\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 16LL))(v9);\n    return nullptr;\n  }\n}", "assembly": "; \n; CCMenuItemToggler::create from 0x576a14 to 0x576b18 (260 bytes)\n; \n; 40 xrefs:\n; > GameToolbox::createToggleButton @ 0x580034\n; > LevelCell::loadFromLevel @ 0x612778\n; > GJRequestCell::loadFromScore @ 0x61c660\n; > GJMessageCell::loadFromMessage @ 0x61d398\n; > EditorUI::setupCreateMenu @ 0x6b34a8\n; > PauseLayer::createToggleButton @ 0x6c6d74\n; > MoreSearchLayer::createToggleButton @ 0x6d394c\n; > ShareLevelSettingsLayer::init @ 0x6e5f3c\n; > ShareLevelSettingsLayer::init @ 0x6e6180\n; > LevelBrowserLayer::init @ 0x6ebc5c\n; > ColorSelectPopup::init @ 0x73f0e0\n; > GJGarageLayer::setupIconSelect @ 0x7983dc\n; > GJGarageLayer::setupIconSelect @ 0x798454\n; > GJGarageLayer::setupIconSelect @ 0x7984c8\n; > GJGarageLayer::setupIconSelect @ 0x79853c\n; > GJGarageLayer::setupIconSelect @ 0x7985b0\n; > GJGarageLayer::setupIconSelect @ 0x798624\n; > GJGarageLayer::setupIconSelect @ 0x798698\n; > GJGarageLayer::setupIconSelect @ 0x79870c\n; > GJGarageLayer::setupIconSelect @ 0x798780\n; > GJGarageLayer::setupIconSelect @ 0x7987f4\n; > GJGarageLayer::setupIconSelect @ 0x79886c\n; > OptionsLayer::createToggleButton @ 0x7c9678\n; > VideoOptionsLayer::createToggleButton @ 0x7cca00\n; > SupportLayer::createToggleButton @ 0x7dd0c4\n; > ShareCommentLayer::init @ 0x7e736c\n; > LeaderboardsLayer::setupTabs @ 0x81de0c\n; > LeaderboardsLayer::setupTabs @ 0x81deb8\n; > LeaderboardsLayer::setupTabs @ 0x81df5c\n; > LeaderboardsLayer::setupTabs @ 0x81e000\n; > CustomizeObjectLayer::createToggleButton @ 0x8404fc\n; > AccountLayer::createToggleButton @ 0x84afec\n; > GJAccountSettingsLayer::createToggleButton @ 0x8c9fb8\n; > MessagesProfilePage::init @ 0x8f3690\n; > FRequestProfilePage::init @ 0x8f5eec\n; > CollisionBlockPopup::createToggleButton @ 0x90932c\n; > ColorSelectLiveOverlay::createToggleButton @ 0x90a99c\n; > CharacterColorPage::init @ 0xa25e84\n; > LevelSettingsLayer::createToggleButton @ 0xa35398\n; > <???> @ 0x73cf8\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\nSTP             X29, X30, [SP,#-0x40+var_s0]!                          ; +0x0, 0x576a14\nMOV             X29, SP                                                ; +0x4, 0x576a18\nSTP             X23, X24, [SP,#var_s30]                                ; +0x8, 0x576a1c\nMOV             X24, X0                                                ; +0xc, 0x576a20\nMOV             X0, #0x190; unsigned __int64                           ; +0x10, 0x576a24\nSTP             X19, X20, [SP,#var_s10]                                ; +0x14, 0x576a28\nSTP             X21, X22, [SP,#var_s20]                                ; +0x18, 0x576a2c\nMOV             X23, X1                                                ; +0x1c, 0x576a30\nMOV             X22, X2                                                ; +0x20, 0x576a34\nMOV             X20, X3                                                ; +0x24, 0x576a38\nMOV             X21, X4                                                ; +0x28, 0x576a3c\nBL              _Znwm; operator new(ulong)                             ; +0x2c, 0x576a40\nMOV             X19, X0                                                ; +0x30, 0x576a44\nBL              _ZN7cocos2d10CCNodeRGBAC2Ev; cocos2d::CCNodeRGBA::CCNodeRGBA(void) ; +0x34, 0x576a48\nFMOV            S0, WZR                                                ; +0x38, 0x576a4c\nADRP            X6, #_ZTV17CCMenuItemToggler_ptr@PAGE                  ; +0x3c, 0x576a50\nSTRB            WZR, [X19,#0x152]                                      ; +0x40, 0x576a54\nMOV             X0, X19                                                ; +0x44, 0x576a58\nSTRB            WZR, [X19,#0x153]                                      ; +0x48, 0x576a5c\nMOV             X1, X24                                                ; +0x4c, 0x576a60\nSTR             XZR, [X19,#0x158]                                      ; +0x50, 0x576a64\nMOV             X2, X23                                                ; +0x54, 0x576a68\nSTR             XZR, [X19,#0x160]                                      ; +0x58, 0x576a6c\nMOV             X3, X22                                                ; +0x5c, 0x576a70\nSTR             XZR, [X19,#0x168]                                      ; +0x60, 0x576a74\nMOV             X4, X20                                                ; +0x64, 0x576a78\nSTR             WZR, [X19,#0x170]                                      ; +0x68, 0x576a7c\nMOV             X5, X21                                                ; +0x6c, 0x576a80\nSTR             S0, [X19,#0x174]                                       ; +0x70, 0x576a84\nLDR             X6, [X6,#_ZTV17CCMenuItemToggler_ptr@PAGEOFF]; `vtable for'CCMenuItemToggler ... ; +0x74, 0x576a88\nSTR             XZR, [X19,#0x178]                                      ; +0x78, 0x576a8c\nADD             X7, X6, #0x10                                          ; +0x7c, 0x576a90\nSTR             XZR, [X19,#0x180]                                      ; +0x80, 0x576a94\nADD             X6, X6, #0x440                                         ; +0x84, 0x576a98\nSTR             X7, [X19]                                              ; +0x88, 0x576a9c\nSTR             X6, [X19,#0x140]                                       ; +0x8c, 0x576aa0\nSTRB            WZR, [X19,#0x188]                                      ; +0x90, 0x576aa4\nSTRB            WZR, [X19,#0x189]                                      ; +0x94, 0x576aa8\nBL              _ZN17CCMenuItemToggler4initEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemToggler::init(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x98, 0x576aac\nUXTB            W0, W0                                                 ; +0x9c, 0x576ab0\nCBZ             W0, loc_576AD8                                         ; +0xa0, 0x576ab4\nMOV             X0, X19; this                                          ; +0xa4, 0x576ab8\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0xa8, 0x576abc\nMOV             X0, X19                                                ; +0xac, 0x576ac0\nLDP             X19, X20, [SP,#var_s10]                                ; +0xb0, 0x576ac4\nLDP             X21, X22, [SP,#var_s20]                                ; +0xb4, 0x576ac8\nLDP             X23, X24, [SP,#var_s30]                                ; +0xb8, 0x576acc\nLDP             X29, X30, [SP+var_s0],#0x40                            ; +0xbc, 0x576ad0\nRET                                                                    ; +0xc0, 0x576ad4\nLDR             X1, [X19]                                              ; +0xc4, 0x576ad8\nMOV             X0, X19                                                ; +0xc8, 0x576adc\nMOV             X19, #0                                                ; +0xcc, 0x576ae0\nLDR             X1, [X1,#0x10]                                         ; +0xd0, 0x576ae4\nBLR             X1                                                     ; +0xd4, 0x576ae8\nMOV             X0, X19                                                ; +0xd8, 0x576aec\nLDP             X19, X20, [SP,#var_s10]                                ; +0xdc, 0x576af0\nLDP             X21, X22, [SP,#var_s20]                                ; +0xe0, 0x576af4\nLDP             X23, X24, [SP,#var_s30]                                ; +0xe4, 0x576af8\nLDP             X29, X30, [SP+var_s0],#0x40                            ; +0xe8, 0x576afc\nRET                                                                    ; +0xec, 0x576b00\nMOV             X20, X0                                                ; +0xf0, 0x576b04\nMOV             X0, X19; p                                             ; +0xf4, 0x576b08\nBL              _ZdlPv; operator delete(void *)                        ; +0xf8, 0x576b0c\nMOV             X0, X20                                                ; +0xfc, 0x576b10\nBL              _Unwind_Resume                                         ; +0x100, 0x576b14", "xrefs": ["GameToolbox::createToggleButton @ 0x580034", "LevelCell::loadFromLevel @ 0x612778", "GJRequestCell::loadFromScore @ 0x61c660", "GJMessageCell::loadFromMessage @ 0x61d398", "EditorUI::setupCreateMenu @ 0x6b34a8", "PauseLayer::createToggleButton @ 0x6c6d74", "MoreSearchLayer::createToggleButton @ 0x6d394c", "ShareLevelSettingsLayer::init @ 0x6e5f3c", "ShareLevelSettingsLayer::init @ 0x6e6180", "LevelBrowserLayer::init @ 0x6ebc5c", "ColorSelectPopup::init @ 0x73f0e0", "GJGarageLayer::setupIconSelect @ 0x7983dc", "GJGarageLayer::setupIconSelect @ 0x798454", "GJGarageLayer::setupIconSelect @ 0x7984c8", "GJGarageLayer::setupIconSelect @ 0x79853c", "GJGarageLayer::setupIconSelect @ 0x7985b0", "GJGarageLayer::setupIconSelect @ 0x798624", "GJGarageLayer::setupIconSelect @ 0x798698", "GJGarageLayer::setupIconSelect @ 0x79870c", "GJGarageLayer::setupIconSelect @ 0x798780", "GJGarageLayer::setupIconSelect @ 0x7987f4", "GJGarageLayer::setupIconSelect @ 0x79886c", "OptionsLayer::createToggleButton @ 0x7c9678", "VideoOptionsLayer::createToggleButton @ 0x7cca00", "SupportLayer::createToggleButton @ 0x7dd0c4", "ShareCommentLayer::init @ 0x7e736c", "LeaderboardsLayer::setupTabs @ 0x81de0c", "LeaderboardsLayer::setupTabs @ 0x81deb8", "LeaderboardsLayer::setupTabs @ 0x81df5c", "LeaderboardsLayer::setupTabs @ 0x81e000", "CustomizeObjectLayer::createToggleButton @ 0x8404fc", "AccountLayer::createToggleButton @ 0x84afec", "GJAccountSettingsLayer::createToggleButton @ 0x8c9fb8", "MessagesProfilePage::init @ 0x8f3690", "FRequestProfilePage::init @ 0x8f5eec", "CollisionBlockPopup::createToggleButton @ 0x90932c", "ColorSelectLiveOverlay::createToggleButton @ 0x90a99c", "CharacterColorPage::init @ 0xa25e84", "LevelSettingsLayer::createToggleButton @ 0xa35398", "<???> @ 0x73cf8"], "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"}