{"type": "func", "start": 9215736, "end": 9216256, "name": "GJAccountSettingsLayer::createToggleButton", "pseudocode": "// \n// GJAccountSettingsLayer::createToggleButton from 0x8c9ef8 to 0x8ca100 (520 bytes)\n// \n// 9 xrefs:\n// > GJAccountSettingsLayer::init @ 0x8de928\n// > GJAccountSettingsLayer::init @ 0x8de9c0\n// > GJAccountSettingsLayer::init @ 0x8dea5c\n// > GJAccountSettingsLayer::init @ 0x8dec60\n// > GJAccountSettingsLayer::init @ 0x8decfc\n// > GJAccountSettingsLayer::init @ 0x8deef0\n// > GJAccountSettingsLayer::init @ 0x8def88\n// > GJAccountSettingsLayer::init @ 0x8df020\n// > <???> @ 0x86370\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 GJAccountSettingsLayer::createToggleButton(\n        __int64 a1,\n        float a2,\n        float a3,\n        __int64 a4,\n        void (__cdecl *a5)(cocos2d::CCObject *),\n        size_t a6,\n        bool a7,\n        cocos2d::CCNode *a8,\n        const cocos2d::CCPoint *a9)\n{\n  cocos2d::CCSprite *v15; // x22\n  cocos2d::CCSprite *v16; // x21\n  CCMenuItemToggler *v17; // x21\n  cocos2d::CCNode *v18; // x0\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20\n  cocos2d::CCLabelBMFont *v20; // x20\n  void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26\n  cocos2d::CCSprite *v22; // x0\n  const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1\n  void (__fastcall *v24)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22\n  float *v25; // x0\n  cocos2d::CCPoint v27; // [xsp+98h] [xbp+98h] BYREF\n  cocos2d::CCPoint v28; // [xsp+A0h] [xbp+A0h] BYREF\n  cocos2d::CCPoint v29; // 0:kr00_8.8\n  cocos2d::SEL_MenuHandler v30; // 0:^80.16\n\n  v30.ptr = a5;\n  v30.adj = a6;\n  v15 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOn_001.png\");\n  v16 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOff_001.png\");\n  v15->setScale(v15, 0.5);\n  v16->setScale(v16, 0.5);\n  v17 = CCMenuItemToggler::create(v15, v16, (cocos2d::CCObject *)a1, v30);\n  CCMenuItemToggler::toggle(v17, a7);\n  a8->addChild(a8, v17);\n  v18 = a8;\n  setPosition = v17->setPosition;\n  v29 = cocos2d::CCNode::convertToNodeSpace(v18, a9);\n  ((void (__fastcall *)(CCMenuItemToggler *, cocos2d::CCPoint *, float, float))setPosition)(v17, &v28, v29.x, v29.y);\n  CCMenuItemToggler::setSizeMult(v17, 1.5);\n  v20 = cocos2d::CCLabelBMFont::create();\n  (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 576) + 440LL))(\n    *(_QWORD *)(a1 + 576),\n    v20);\n  setAnchorPoint = v20->setAnchorPoint;\n  cocos2d::CCPoint::CCPoint(&v28, 0.0, 0.5);\n  setAnchorPoint(v20, &v28);\n  v22 = v15;\n  getContentSize = v15->getContentSize;\n  v24 = v20->setPosition;\n  v25 = (float *)getContentSize(v22);\n  cocos2d::CCPoint::CCPoint(&v27, (float)((float)(*v25 * 0.5) * 0.5) + 4.0, 0.0);\n  cocos2d::CCPoint::operator+(&v28, a9, &v27);\n  v24(v20, &v28);\n  cocos2d::CCLabelBMFont::limitLabelWidth(v20, a2, a3, 0.0);\n  return v17;\n}", "assembly": "; \n; GJAccountSettingsLayer::createToggleButton from 0x8c9ef8 to 0x8ca100 (520 bytes)\n; \n; 9 xrefs:\n; > GJAccountSettingsLayer::init @ 0x8de928\n; > GJAccountSettingsLayer::init @ 0x8de9c0\n; > GJAccountSettingsLayer::init @ 0x8dea5c\n; > GJAccountSettingsLayer::init @ 0x8dec60\n; > GJAccountSettingsLayer::init @ 0x8decfc\n; > GJAccountSettingsLayer::init @ 0x8deef0\n; > GJAccountSettingsLayer::init @ 0x8def88\n; > GJAccountSettingsLayer::init @ 0x8df020\n; > <???> @ 0x86370\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,#var_B0]!                                ; +0x0, 0x8c9ef8\nMOV             X29, SP                                                ; +0x4, 0x8c9efc\nSTP             X23, X24, [SP,#0xB0+var_80]                            ; +0x8, 0x8c9f00\nSTP             D8, D9, [SP,#0xB0+var_50]                              ; +0xc, 0x8c9f04\nADRP            X23, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x8c9f08\nADD             X24, X29, #0xB0+var_18                                 ; +0x14, 0x8c9f0c\nFMOV            S9, S1                                                 ; +0x18, 0x8c9f10\nSTR             D10, [SP,#0xB0+var_40]                                 ; +0x1c, 0x8c9f14\nLDR             X23, [X23,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x8c9f18\nFMOV            S10, S0                                                ; +0x24, 0x8c9f1c\nSTP             X25, X26, [SP,#0xB0+var_70]                            ; +0x28, 0x8c9f20\nSTP             X27, X28, [SP,#0xB0+var_60]                            ; +0x2c, 0x8c9f24\nMOV             X26, X0                                                ; +0x30, 0x8c9f28\nMOV             X27, X1                                                ; +0x34, 0x8c9f2c\nADRP            X0, #aGjCheckon001Pn@PAGE; \"GJ_checkOn_001.png\"        ; +0x38, 0x8c9f30\nLDR             X1, [X23]; char *                                      ; +0x3c, 0x8c9f34\nUXTB            W28, W4                                                ; +0x40, 0x8c9f38\nADD             X0, X0, #aGjCheckon001Pn@PAGEOFF; \"GJ_checkOn_001.png\" ; +0x44, 0x8c9f3c\nMOV             X4, X3                                                 ; +0x48, 0x8c9f40\nMOV             X3, X2                                                 ; +0x4c, 0x8c9f44\nMOV             X25, X6                                                ; +0x50, 0x8c9f48\nSTR             X1, [X29,#0xB0+var_8]                                  ; +0x54, 0x8c9f4c\nSTP             X3, X4, [X29,#0xB0+var_30]                             ; +0x58, 0x8c9f50\nSTP             X19, X20, [SP,#0xB0+var_A0]                            ; +0x5c, 0x8c9f54\nSTP             X21, X22, [SP,#0xB0+var_90]                            ; +0x60, 0x8c9f58\nMOV             X20, X5                                                ; +0x64, 0x8c9f5c\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x68, 0x8c9f60\nMOV             X22, X0                                                ; +0x6c, 0x8c9f64\nADRP            X0, #aGjCheckoff001P@PAGE; \"GJ_checkOff_001.png\"       ; +0x70, 0x8c9f68\nFMOV            S8, #0.5                                               ; +0x74, 0x8c9f6c\nADD             X0, X0, #aGjCheckoff001P@PAGEOFF; \"GJ_checkOff_001.png\" ; +0x78, 0x8c9f70\nADD             X19, X29, #0xB0+var_10                                 ; +0x7c, 0x8c9f74\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x80, 0x8c9f78\nMOV             X21, X0                                                ; +0x84, 0x8c9f7c\nLDR             X1, [X22]                                              ; +0x88, 0x8c9f80\nMOV             X0, X22                                                ; +0x8c, 0x8c9f84\nFMOV            S0, S8                                                 ; +0x90, 0x8c9f88\nLDR             X1, [X1,#0xA0]                                         ; +0x94, 0x8c9f8c\nBLR             X1                                                     ; +0x98, 0x8c9f90\nLDR             X1, [X21]                                              ; +0x9c, 0x8c9f94\nMOV             X0, X21                                                ; +0xa0, 0x8c9f98\nFMOV            S0, S8                                                 ; +0xa4, 0x8c9f9c\nLDR             X1, [X1,#0xA0]                                         ; +0xa8, 0x8c9fa0\nBLR             X1                                                     ; +0xac, 0x8c9fa4\nLDP             X3, X4, [X29,#0xB0+var_30]                             ; +0xb0, 0x8c9fa8\nMOV             X2, X26                                                ; +0xb4, 0x8c9fac\nMOV             X1, X21                                                ; +0xb8, 0x8c9fb0\nMOV             X0, X22                                                ; +0xbc, 0x8c9fb4\nBL              _ZN17CCMenuItemToggler6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemToggler::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0xc0, 0x8c9fb8\nMOV             X21, X0                                                ; +0xc4, 0x8c9fbc\nMOV             W1, W28; bool                                          ; +0xc8, 0x8c9fc0\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0xcc, 0x8c9fc4\nLDR             X2, [X20]                                              ; +0xd0, 0x8c9fc8\nMOV             X0, X20                                                ; +0xd4, 0x8c9fcc\nMOV             X1, X21                                                ; +0xd8, 0x8c9fd0\nLDR             X2, [X2,#0x1B8]                                        ; +0xdc, 0x8c9fd4\nBLR             X2                                                     ; +0xe0, 0x8c9fd8\nLDR             X2, [X21]                                              ; +0xe4, 0x8c9fdc\nMOV             X8, X19                                                ; +0xe8, 0x8c9fe0\nMOV             X0, X20; this                                          ; +0xec, 0x8c9fe4\nMOV             X1, X25; cocos2d::CCPoint *                            ; +0xf0, 0x8c9fe8\nLDR             X20, [X2,#0xB8]                                        ; +0xf4, 0x8c9fec\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0xf8, 0x8c9ff0\nMOV             X1, X19                                                ; +0xfc, 0x8c9ff4\nMOV             X0, X21                                                ; +0x100, 0x8c9ff8\nBLR             X20                                                    ; +0x104, 0x8c9ffc\nFMOV            S0, #1.5; float                                        ; +0x108, 0x8ca000\nMOV             X0, X21; this                                          ; +0x10c, 0x8ca004\nBL              _ZN17CCMenuItemToggler11setSizeMultEf; CCMenuItemToggler::setSizeMult(float) ; +0x110, 0x8ca008\nLDR             X0, [X27]; this                                        ; +0x114, 0x8ca00c\nADRL            X1, aBigfontFnt; \"bigFont.fnt\"                         ; +0x118, 0x8ca010\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0x120, 0x8ca018\nMOV             X20, X0                                                ; +0x124, 0x8ca01c\nLDR             X2, [X26,#0x240]                                       ; +0x128, 0x8ca020\nMOV             X1, X0                                                 ; +0x12c, 0x8ca024\nMOV             X0, X2                                                 ; +0x130, 0x8ca028\nLDR             X2, [X2]                                               ; +0x134, 0x8ca02c\nLDR             X2, [X2,#0x1B8]                                        ; +0x138, 0x8ca030\nBLR             X2                                                     ; +0x13c, 0x8ca034\nFMOV            S0, WZR; float                                         ; +0x140, 0x8ca038\nLDR             X1, [X20]                                              ; +0x144, 0x8ca03c\nFMOV            S1, S8; float                                          ; +0x148, 0x8ca040\nMOV             X0, X19; this                                          ; +0x14c, 0x8ca044\nLDR             X26, [X1,#0x118]                                       ; +0x150, 0x8ca048\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x154, 0x8ca04c\nMOV             X0, X20                                                ; +0x158, 0x8ca050\nMOV             X1, X19                                                ; +0x15c, 0x8ca054\nBLR             X26                                                    ; +0x160, 0x8ca058\nLDR             X1, [X22]                                              ; +0x164, 0x8ca05c\nMOV             X0, X22                                                ; +0x168, 0x8ca060\nLDR             X2, [X20]                                              ; +0x16c, 0x8ca064\nLDR             X1, [X1,#0x138]                                        ; +0x170, 0x8ca068\nLDR             X22, [X2,#0xB8]                                        ; +0x174, 0x8ca06c\nBLR             X1                                                     ; +0x178, 0x8ca070\nSTR             X24, [X29,#0xB0+var_30]                                ; +0x17c, 0x8ca074\nLDR             S0, [X0]                                               ; +0x180, 0x8ca078\nMOV             X0, X24; this                                          ; +0x184, 0x8ca07c\nFMOV            S2, #4.0                                               ; +0x188, 0x8ca080\nFMUL            S0, S0, S8                                             ; +0x18c, 0x8ca084\nFMOV            S1, WZR; float                                         ; +0x190, 0x8ca088\nFMADD           S0, S0, S8, S2; float                                  ; +0x194, 0x8ca08c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x198, 0x8ca090\nLDR             X1, [X29,#0xB0+var_30]                                 ; +0x19c, 0x8ca094\nMOV             X8, X19                                                ; +0x1a0, 0x8ca098\nMOV             X0, X25                                                ; +0x1a4, 0x8ca09c\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x1a8, 0x8ca0a0\nMOV             X1, X19                                                ; +0x1ac, 0x8ca0a4\nMOV             X0, X20                                                ; +0x1b0, 0x8ca0a8\nBLR             X22                                                    ; +0x1b4, 0x8ca0ac\nFMOV            S2, WZR; float                                         ; +0x1b8, 0x8ca0b0\nMOV             X0, X20; this                                          ; +0x1bc, 0x8ca0b4\nFMOV            S0, S10; float                                         ; +0x1c0, 0x8ca0b8\nFMOV            S1, S9; float                                          ; +0x1c4, 0x8ca0bc\nBL              _ZN7cocos2d13CCLabelBMFont15limitLabelWidthEfff; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0x1c8, 0x8ca0c0\nLDR             X2, [X29,#0xB0+var_8]                                  ; +0x1cc, 0x8ca0c4\nMOV             X0, X21                                                ; +0x1d0, 0x8ca0c8\nLDR             X1, [X23]                                              ; +0x1d4, 0x8ca0cc\nCMP             X2, X1                                                 ; +0x1d8, 0x8ca0d0\nB.NE            loc_8CA0FC                                             ; +0x1dc, 0x8ca0d4\nLDP             X19, X20, [SP,#0xB0+var_A0]                            ; +0x1e0, 0x8ca0d8\nLDP             D8, D9, [SP,#0xB0+var_50]                              ; +0x1e4, 0x8ca0dc\nLDP             X21, X22, [SP,#0xB0+var_90]                            ; +0x1e8, 0x8ca0e0\nLDP             X23, X24, [SP,#0xB0+var_80]                            ; +0x1ec, 0x8ca0e4\nLDP             X25, X26, [SP,#0xB0+var_70]                            ; +0x1f0, 0x8ca0e8\nLDP             X27, X28, [SP,#0xB0+var_60]                            ; +0x1f4, 0x8ca0ec\nLDR             D10, [SP,#0xB0+var_40]                                 ; +0x1f8, 0x8ca0f0\nLDP             X29, X30, [SP+0xB0+var_B0],#0xB0                       ; +0x1fc, 0x8ca0f4\nRET                                                                    ; +0x200, 0x8ca0f8\nBL              .__stack_chk_fail                                      ; +0x204, 0x8ca0fc", "xrefs": ["GJAccountSettingsLayer::init @ 0x8de928", "GJAccountSettingsLayer::init @ 0x8de9c0", "GJAccountSettingsLayer::init @ 0x8dea5c", "GJAccountSettingsLayer::init @ 0x8dec60", "GJAccountSettingsLayer::init @ 0x8decfc", "GJAccountSettingsLayer::init @ 0x8deef0", "GJAccountSettingsLayer::init @ 0x8def88", "GJAccountSettingsLayer::init @ 0x8df020", "<???> @ 0x86370"], "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"}