{"type": "func", "start": 3042492, "end": 3042652, "name": "CCMenuItemToggler::create", "pseudocode": "// \n// CCMenuItemToggler::create from 0x2e6cbc to 0x2e6d5c (160 bytes)\n// \n// 39 xrefs:\n// > GameToolbox::createToggleButton @ 0x2ec010\n// > LevelCell::loadFromLevel @ 0x3337aa\n// > GJRequestCell::loadFromScore @ 0x339574\n// > GJMessageCell::loadFromMessage @ 0x339daa\n// > EditorUI::setupCreateMenu @ 0x39bd86\n// > PauseLayer::createToggleButton @ 0x3a7d0c\n// > MoreSearchLayer::createToggleButton @ 0x3af688\n// > ShareLevelSettingsLayer::init @ 0x3b9d90\n// > ShareLevelSettingsLayer::init @ 0x3b9f94\n// > LevelBrowserLayer::init @ 0x3bc92c\n// > ColorSelectPopup::init @ 0x3db4fc\n// > GJGarageLayer::setupIconSelect @ 0x4067ea\n// > GJGarageLayer::setupIconSelect @ 0x40683a\n// > GJGarageLayer::setupIconSelect @ 0x40688a\n// > GJGarageLayer::setupIconSelect @ 0x4068da\n// > GJGarageLayer::setupIconSelect @ 0x40692a\n// > GJGarageLayer::setupIconSelect @ 0x40697a\n// > GJGarageLayer::setupIconSelect @ 0x4069ca\n// > GJGarageLayer::setupIconSelect @ 0x406a7a\n// > GJGarageLayer::setupIconSelect @ 0x406aca\n// > GJGarageLayer::setupIconSelect @ 0x406b1a\n// > GJGarageLayer::setupIconSelect @ 0x406b6a\n// > OptionsLayer::createToggleButton @ 0x422868\n// > VideoOptionsLayer::createToggleButton @ 0x4248fa\n// > SupportLayer::createToggleButton @ 0x42cce0\n// > ShareCommentLayer::init @ 0x432020\n// > LeaderboardsLayer::setupTabs @ 0x451a0e\n// > LeaderboardsLayer::setupTabs @ 0x451a8c\n// > LeaderboardsLayer::setupTabs @ 0x451b0a\n// > LeaderboardsLayer::setupTabs @ 0x451b88\n// > CustomizeObjectLayer::createToggleButton @ 0x46160a\n// > AccountLayer::createToggleButton @ 0x4667ec\n// > GJAccountSettingsLayer::createToggleButton @ 0x4abc08\n// > MessagesProfilePage::init @ 0x4c16ea\n// > sub_4C275C @ 0x4c2c48\n// > CollisionBlockPopup::createToggleButton @ 0x4cd494\n// > ColorSelectLiveOverlay::createToggleButton @ 0x4ce29c\n// > CharacterColorPage::init @ 0x565d2c\n// > LevelSettingsLayer::createToggleButton @ 0x570248\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  CCMenuItemToggler *v7; // r4\n  CCMenuItemToggler_vtbl *v8; // r3\n  int *v9; // r0\n  unsigned int varg_r3; // [sp+24h] [bp+18h]\n\n  v7 = (CCMenuItemToggler *)operator new(0x138u);\n  cocos2d::CCNodeRGBA::CCNodeRGBA(v7);\n  v7->m_fSizeMult = 0.0;\n  v7->m_bSelected = 0;\n  v7->m_bEnabled = 0;\n  v7->m_pListener = nullptr;\n  v7->m_pfnSelector.ptr = nullptr;\n  v7->m_pfnSelector.adj = 0;\n  v7->m_nScriptTapHandler = 0;\n  v7->m_offButton = nullptr;\n  v7->m_onButton = nullptr;\n  v7->m_toggled = 0;\n  v7->m_notClickable = 0;\n  v7->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCMenuItemToggler_vtbl *)&off_A3D8A8;\n  v7->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&off_A3DAC0;\n  if ( CCMenuItemToggler::init(v7, a1, a2, a3, (cocos2d::SEL_MenuHandler)__PAIR64__(a4.adj, varg_r3)) )\n  {\n    cocos2d::CCObject::autorelease(v7);\n  }\n  else\n  {\n    v8 = v7->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v9 = (int *)v7;\n    v7 = nullptr;\n    v8->~CCMenuItemToggler_0((CCMenuItemToggler *)v9);\n  }\n  return v7;\n}", "assembly": "; \n; CCMenuItemToggler::create from 0x2e6cbc to 0x2e6d5c (160 bytes)\n; \n; 39 xrefs:\n; > GameToolbox::createToggleButton @ 0x2ec010\n; > LevelCell::loadFromLevel @ 0x3337aa\n; > GJRequestCell::loadFromScore @ 0x339574\n; > GJMessageCell::loadFromMessage @ 0x339daa\n; > EditorUI::setupCreateMenu @ 0x39bd86\n; > PauseLayer::createToggleButton @ 0x3a7d0c\n; > MoreSearchLayer::createToggleButton @ 0x3af688\n; > ShareLevelSettingsLayer::init @ 0x3b9d90\n; > ShareLevelSettingsLayer::init @ 0x3b9f94\n; > LevelBrowserLayer::init @ 0x3bc92c\n; > ColorSelectPopup::init @ 0x3db4fc\n; > GJGarageLayer::setupIconSelect @ 0x4067ea\n; > GJGarageLayer::setupIconSelect @ 0x40683a\n; > GJGarageLayer::setupIconSelect @ 0x40688a\n; > GJGarageLayer::setupIconSelect @ 0x4068da\n; > GJGarageLayer::setupIconSelect @ 0x40692a\n; > GJGarageLayer::setupIconSelect @ 0x40697a\n; > GJGarageLayer::setupIconSelect @ 0x4069ca\n; > GJGarageLayer::setupIconSelect @ 0x406a7a\n; > GJGarageLayer::setupIconSelect @ 0x406aca\n; > GJGarageLayer::setupIconSelect @ 0x406b1a\n; > GJGarageLayer::setupIconSelect @ 0x406b6a\n; > OptionsLayer::createToggleButton @ 0x422868\n; > VideoOptionsLayer::createToggleButton @ 0x4248fa\n; > SupportLayer::createToggleButton @ 0x42cce0\n; > ShareCommentLayer::init @ 0x432020\n; > LeaderboardsLayer::setupTabs @ 0x451a0e\n; > LeaderboardsLayer::setupTabs @ 0x451a8c\n; > LeaderboardsLayer::setupTabs @ 0x451b0a\n; > LeaderboardsLayer::setupTabs @ 0x451b88\n; > CustomizeObjectLayer::createToggleButton @ 0x46160a\n; > AccountLayer::createToggleButton @ 0x4667ec\n; > GJAccountSettingsLayer::createToggleButton @ 0x4abc08\n; > MessagesProfilePage::init @ 0x4c16ea\n; > sub_4C275C @ 0x4c2c48\n; > CollisionBlockPopup::createToggleButton @ 0x4cd494\n; > ColorSelectLiveOverlay::createToggleButton @ 0x4ce29c\n; > CharacterColorPage::init @ 0x565d2c\n; > LevelSettingsLayer::createToggleButton @ 0x570248\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\nSUB             SP, SP, #8                                             ; +0x0, 0x2e6cbc\nPUSH            {R0-R2,R4-R7,LR}                                       ; +0x2, 0x2e6cbe\nMOV             R7, R0                                                 ; +0x4, 0x2e6cc0\nMOV.W           R0, #0x138; unsigned int                               ; +0x6, 0x2e6cc2\nMOV             R6, R1                                                 ; +0xa, 0x2e6cc6\nMOV             R5, R2                                                 ; +0xc, 0x2e6cc8\nSTR             R3, [SP,#0xC+varg_r3]                                  ; +0xe, 0x2e6cca\nBL              _Znwj; operator new(uint)                              ; +0x10, 0x2e6ccc\nMOV             R4, R0                                                 ; +0x14, 0x2e6cd0\nBL              _ZN7cocos2d10CCNodeRGBAC2Ev; cocos2d::CCNodeRGBA::CCNodeRGBA(void) ; +0x16, 0x2e6cd2\nMOVS            R2, #0                                                 ; +0x1a, 0x2e6cd6\nSTR.W           R2, [R4,#0x128]                                        ; +0x1c, 0x2e6cd8\nLDR             R2, =(_ZTV17CCMenuItemToggler_ptr - 0x2E6CEC)          ; +0x20, 0x2e6cdc\nMOVS            R3, #0                                                 ; +0x22, 0x2e6cde\nSTRB.W          R3, [R4,#0x116]                                        ; +0x24, 0x2e6ce0\nSTRB.W          R3, [R4,#0x117]                                        ; +0x28, 0x2e6ce4\nADD             R2, PC; _ZTV17CCMenuItemToggler_ptr                    ; +0x2c, 0x2e6ce8\nLDR             R2, [R2]; `vtable for'CCMenuItemToggler ...            ; +0x2e, 0x2e6cea\nSTR.W           R3, [R4,#0x118]                                        ; +0x30, 0x2e6cec\nADD.W           R1, R2, #8                                             ; +0x34, 0x2e6cf0\nSTR.W           R3, [R4,#0x11C]                                        ; +0x38, 0x2e6cf4\nADD.W           R2, R2, #0x220                                         ; +0x3c, 0x2e6cf8\nSTR.W           R3, [R4,#0x120]                                        ; +0x40, 0x2e6cfc\nSTR.W           R3, [R4,#0x124]                                        ; +0x44, 0x2e6d00\nSTR.W           R3, [R4,#0x12C]                                        ; +0x48, 0x2e6d04\nSTR.W           R3, [R4,#0x130]                                        ; +0x4c, 0x2e6d08\nSTRB.W          R3, [R4,#0x134]                                        ; +0x50, 0x2e6d0c\nSTRB.W          R3, [R4,#0x135]                                        ; +0x54, 0x2e6d10\nADD             R3, SP, #0xC+varg_r3                                   ; +0x58, 0x2e6d14\nSTR             R1, [R4]                                               ; +0x5a, 0x2e6d16\nLDM.W           R3, {R0,R1}                                            ; +0x5c, 0x2e6d18\nMOV             R3, R5                                                 ; +0x60, 0x2e6d1c\nSTR.W           R2, [R4,#0x108]                                        ; +0x62, 0x2e6d1e\nMOV             R2, R6                                                 ; +0x66, 0x2e6d22\nSTMEA.W         SP, {R0,R1}                                            ; +0x68, 0x2e6d24\nMOV             R0, R4                                                 ; +0x6c, 0x2e6d28\nMOV             R1, R7                                                 ; +0x6e, 0x2e6d2a\nBL              _ZN17CCMenuItemToggler4initEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemToggler::init(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x70, 0x2e6d2c\nMOV             R5, R0                                                 ; +0x74, 0x2e6d30\nCBZ             R0, loc_2E6D46                                         ; +0x76, 0x2e6d32\nMOV             R0, R4; this                                           ; +0x78, 0x2e6d34\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0x7a, 0x2e6d36\nB               loc_2E6D50                                             ; +0x7e, 0x2e6d3a\nMOV             R0, R4; p                                              ; +0x80, 0x2e6d3c\nBL              _ZdlPv; operator delete(void *)                        ; +0x82, 0x2e6d3e\nBL              __cxa_end_cleanup                                      ; +0x86, 0x2e6d42\nLDR             R3, [R4]                                               ; +0x8a, 0x2e6d46\nMOV             R0, R4                                                 ; +0x8c, 0x2e6d48\nMOV             R4, R5                                                 ; +0x8e, 0x2e6d4a\nLDR             R3, [R3,#8]                                            ; +0x90, 0x2e6d4c\nBLX             R3                                                     ; +0x92, 0x2e6d4e\nMOV             R0, R4                                                 ; +0x94, 0x2e6d50\nADD             SP, SP, #0xC                                           ; +0x96, 0x2e6d52\nPOP.W           {R4-R7,LR}                                             ; +0x98, 0x2e6d54\nADD             SP, SP, #8                                             ; +0x9c, 0x2e6d58\nBX              LR                                                     ; +0x9e, 0x2e6d5a", "xrefs": ["GameToolbox::createToggleButton @ 0x2ec010", "LevelCell::loadFromLevel @ 0x3337aa", "GJRequestCell::loadFromScore @ 0x339574", "GJMessageCell::loadFromMessage @ 0x339daa", "EditorUI::setupCreateMenu @ 0x39bd86", "PauseLayer::createToggleButton @ 0x3a7d0c", "MoreSearchLayer::createToggleButton @ 0x3af688", "ShareLevelSettingsLayer::init @ 0x3b9d90", "ShareLevelSettingsLayer::init @ 0x3b9f94", "LevelBrowserLayer::init @ 0x3bc92c", "ColorSelectPopup::init @ 0x3db4fc", "GJGarageLayer::setupIconSelect @ 0x4067ea", "GJGarageLayer::setupIconSelect @ 0x40683a", "GJGarageLayer::setupIconSelect @ 0x40688a", "GJGarageLayer::setupIconSelect @ 0x4068da", "GJGarageLayer::setupIconSelect @ 0x40692a", "GJGarageLayer::setupIconSelect @ 0x40697a", "GJGarageLayer::setupIconSelect @ 0x4069ca", "GJGarageLayer::setupIconSelect @ 0x406a7a", "GJGarageLayer::setupIconSelect @ 0x406aca", "GJGarageLayer::setupIconSelect @ 0x406b1a", "GJGarageLayer::setupIconSelect @ 0x406b6a", "OptionsLayer::createToggleButton @ 0x422868", "VideoOptionsLayer::createToggleButton @ 0x4248fa", "SupportLayer::createToggleButton @ 0x42cce0", "ShareCommentLayer::init @ 0x432020", "LeaderboardsLayer::setupTabs @ 0x451a0e", "LeaderboardsLayer::setupTabs @ 0x451a8c", "LeaderboardsLayer::setupTabs @ 0x451b0a", "LeaderboardsLayer::setupTabs @ 0x451b88", "CustomizeObjectLayer::createToggleButton @ 0x46160a", "AccountLayer::createToggleButton @ 0x4667ec", "GJAccountSettingsLayer::createToggleButton @ 0x4abc08", "MessagesProfilePage::init @ 0x4c16ea", "sub_4C275C @ 0x4c2c48", "CollisionBlockPopup::createToggleButton @ 0x4cd494", "ColorSelectLiveOverlay::createToggleButton @ 0x4ce29c", "CharacterColorPage::init @ 0x565d2c", "LevelSettingsLayer::createToggleButton @ 0x570248"], "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"}