{"type": "func", "start": 10012312, "end": 10012948, "name": "AccountLayer::createToggleButton", "pseudocode": "// \n// AccountLayer::createToggleButton from 0x98c698 to 0x98c914 (636 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0xa7e48\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:57:56 +0000\n// \n\n__int64 __fastcall AccountLayer::createToggleButton(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        __int64 a4,\n        unsigned __int8 a5,\n        cocos2d::CCNode *a6,\n        const cocos2d::CCPoint *a7)\n{\n  __int64 v12; // x21\n  const char *v13; // x1\n  __int64 v14; // x19\n  CCMenuItemToggler *v15; // x19\n  cocos2d::CCNode *v16; // x0\n  void (__fastcall *v17)(CCMenuItemToggler *, __int64 *); // x23\n  const char *v18; // x2\n  cocos2d::CCLabelBMFont *v19; // x0\n  __int64 v20; // x19\n  void (__fastcall *v21)(__int64, __int64 *); // x25\n  __int64 v22; // x0\n  __int64 (__fastcall *v23)(__int64); // x1\n  void (__fastcall *v24)(__int64, __int64 *); // x21\n  float *v25; // x0\n  float v26; // s0\n  void (__fastcall *v27)(__int64, float); // x20\n  float v28; // s0\n  float v29; // s1\n  void (__fastcall *v31)(__int64, float); // x20\n  float *v32; // x0\n  _BYTE v35[8]; // [xsp+88h] [xbp+88h] BYREF\n  __int64 v36; // [xsp+90h] [xbp+90h] BYREF\n\n  v12 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)\"GJ_checkOn_001.png\", _stack_chk_guard);\n  v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)\"GJ_checkOff_001.png\", v13);\n  (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, 0.8);\n  (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v14 + 160LL))(v14, 0.8);\n  v15 = (CCMenuItemToggler *)CCMenuItemToggler::create(v12, v14, a1, a3, a4);\n  CCMenuItemToggler::toggle(v15, a5);\n  (*(void (__fastcall **)(cocos2d::CCNode *, CCMenuItemToggler *))(*(_QWORD *)a6 + 456LL))(a6, v15);\n  v16 = a6;\n  v17 = *(void (__fastcall **)(CCMenuItemToggler *, __int64 *))(*(_QWORD *)v15 + 184LL);\n  cocos2d::CCNode::convertToNodeSpace(&v36, v16, a7);\n  v17(v15, &v36);\n  CCMenuItemToggler::setSizeMult(v15, 1.5);\n  v19 = (cocos2d::CCLabelBMFont *)(a2 + 1);\n  if ( (*(_BYTE *)a2 & 1) != 0 )\n    v19 = *(cocos2d::CCLabelBMFont **)(a2 + 16);\n  v20 = cocos2d::CCLabelBMFont::create(v19, \"bigFont.fnt\", v18);\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 576) + 456LL))(*(_QWORD *)(a1 + 576), v20);\n  v21 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 296LL);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v36, 0.0, 0.5);\n  v21(v20, &v36);\n  v22 = v12;\n  v23 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 328LL);\n  v24 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 184LL);\n  v25 = (float *)v23(v22);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, (float)((float)(*v25 * 0.5) * 0.8) + 8.0, 0.0);\n  cocos2d::CCPoint::operator+(&v36, a7);\n  v24(v20, &v36);\n  v26 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 328LL))(v20);\n  if ( v26 > 120.0 )\n  {\n    v31 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL);\n    v32 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 328LL))(v20, v26);\n    v31(v20, 120.0 / *v32);\n  }\n  v27 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL);\n  v28 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v20 + 168LL))(v20);\n  v29 = 0.35;\n  if ( v28 <= 0.35 )\n    v29 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v20 + 168LL))(v20);\n  v27(v20, v29);\n  return _stack_chk_guard;\n}", "assembly": "; \n; AccountLayer::createToggleButton from 0x98c698 to 0x98c914 (636 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0xa7e48\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:57:56 +0000\n; \nSTP             X29, X30, [SP,#var_A0]!                                ; +0x0, 0x98c698\nMOV             X29, SP                                                ; +0x4, 0x98c69c\nSTP             X21, X22, [SP,#0xA0+var_80]                            ; +0x8, 0x98c6a0\nSTP             D8, D9, [SP,#0xA0+var_48]                              ; +0xc, 0x98c6a4\nADRP            X22, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x98c6a8\nSTR             X27, [SP,#0xA0+var_50]                                 ; +0x14, 0x98c6ac\nSTP             X23, X24, [SP,#0xA0+var_70]                            ; +0x18, 0x98c6b0\nMOV             X23, X5                                                ; +0x1c, 0x98c6b4\nUXTB            W27, W4                                                ; +0x20, 0x98c6b8\nLDR             X5, [X22,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x98c6bc\nMOV             X4, X3                                                 ; +0x28, 0x98c6c0\nSTP             X19, X20, [SP,#0xA0+var_90]                            ; +0x2c, 0x98c6c4\nSTP             X25, X26, [SP,#0xA0+var_60]                            ; +0x30, 0x98c6c8\nMOV             X25, X0                                                ; +0x34, 0x98c6cc\nMOV             X26, X1                                                ; +0x38, 0x98c6d0\nADRP            X0, #aGjCheckon001Pn@PAGE; \"GJ_checkOn_001.png\"        ; +0x3c, 0x98c6d4\nLDR             X1, [X5]; char *                                       ; +0x40, 0x98c6d8\nMOV             X3, X2                                                 ; +0x44, 0x98c6dc\nADD             X0, X0, #aGjCheckon001Pn@PAGEOFF; \"GJ_checkOn_001.png\" ; +0x48, 0x98c6e0\nMOV             X24, X6                                                ; +0x4c, 0x98c6e4\nSTR             X1, [X29,#0xA0+var_8]                                  ; +0x50, 0x98c6e8\nSTP             X3, X4, [X29,#0xA0+var_30]                             ; +0x54, 0x98c6ec\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x58, 0x98c6f0\nMOV             X21, X0                                                ; +0x5c, 0x98c6f4\nADRP            X0, #aGjCheckoff001P@PAGE; \"GJ_checkOff_001.png\"       ; +0x60, 0x98c6f8\nADD             X20, X29, #0xA0+var_10                                 ; +0x64, 0x98c6fc\nADD             X0, X0, #aGjCheckoff001P@PAGEOFF; \"GJ_checkOff_001.png\" ; +0x68, 0x98c700\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x6c, 0x98c704\nMOV             X19, X0                                                ; +0x70, 0x98c708\nLDR             S8, =0x3F4CCCCD                                        ; +0x74, 0x98c70c\nLDR             X1, [X21]                                              ; +0x78, 0x98c710\nMOV             X0, X21                                                ; +0x7c, 0x98c714\nFMOV            S0, S8                                                 ; +0x80, 0x98c718\nLDR             X1, [X1,#0xA0]                                         ; +0x84, 0x98c71c\nBLR             X1                                                     ; +0x88, 0x98c720\nLDR             X1, [X19]                                              ; +0x8c, 0x98c724\nMOV             X0, X19                                                ; +0x90, 0x98c728\nFMOV            S0, S8                                                 ; +0x94, 0x98c72c\nLDR             X1, [X1,#0xA0]                                         ; +0x98, 0x98c730\nBLR             X1                                                     ; +0x9c, 0x98c734\nLDP             X3, X4, [X29,#0xA0+var_30]                             ; +0xa0, 0x98c738\nMOV             X1, X19                                                ; +0xa4, 0x98c73c\nMOV             X2, X25                                                ; +0xa8, 0x98c740\nMOV             X0, X21                                                ; +0xac, 0x98c744\nBL              _ZN17CCMenuItemToggler6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemToggler::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0xb0, 0x98c748\nMOV             X19, X0                                                ; +0xb4, 0x98c74c\nMOV             W1, W27; bool                                          ; +0xb8, 0x98c750\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0xbc, 0x98c754\nLDR             X2, [X23]                                              ; +0xc0, 0x98c758\nMOV             X0, X23                                                ; +0xc4, 0x98c75c\nMOV             X1, X19                                                ; +0xc8, 0x98c760\nLDR             X2, [X2,#0x1C8]                                        ; +0xcc, 0x98c764\nBLR             X2                                                     ; +0xd0, 0x98c768\nLDR             X2, [X19]                                              ; +0xd4, 0x98c76c\nMOV             X8, X20                                                ; +0xd8, 0x98c770\nMOV             X0, X23; this                                          ; +0xdc, 0x98c774\nMOV             X1, X24; cocos2d::CCPoint *                            ; +0xe0, 0x98c778\nLDR             X23, [X2,#0xB8]                                        ; +0xe4, 0x98c77c\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0xe8, 0x98c780\nMOV             X1, X20                                                ; +0xec, 0x98c784\nMOV             X0, X19                                                ; +0xf0, 0x98c788\nBLR             X23                                                    ; +0xf4, 0x98c78c\nMOV             X0, X19; this                                          ; +0xf8, 0x98c790\nFMOV            S0, #1.5; float                                        ; +0xfc, 0x98c794\nBL              _ZN17CCMenuItemToggler11setSizeMultEf; CCMenuItemToggler::setSizeMult(float) ; +0x100, 0x98c798\nMOV             X0, X26                                                ; +0x104, 0x98c79c\nLDRB            W1, [X0],#1                                            ; +0x108, 0x98c7a0\nTBZ             W1, #0, loc_98C7AC                                     ; +0x10c, 0x98c7a4\nLDR             X0, [X26,#0x10]; this                                  ; +0x110, 0x98c7a8\nADRP            X1, #aBigfontFnt@PAGE; \"bigFont.fnt\"                   ; +0x114, 0x98c7ac\nADD             X23, X29, #0xA0+var_18                                 ; +0x118, 0x98c7b0\nFMOV            S9, #0.5                                               ; +0x11c, 0x98c7b4\nADD             X1, X1, #aBigfontFnt@PAGEOFF; \"bigFont.fnt\"            ; +0x120, 0x98c7b8\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0x124, 0x98c7bc\nMOV             X19, X0                                                ; +0x128, 0x98c7c0\nLDR             X2, [X25,#0x240]                                       ; +0x12c, 0x98c7c4\nMOV             X1, X0                                                 ; +0x130, 0x98c7c8\nMOV             X0, X2                                                 ; +0x134, 0x98c7cc\nLDR             X2, [X2]                                               ; +0x138, 0x98c7d0\nLDR             X2, [X2,#0x1C8]                                        ; +0x13c, 0x98c7d4\nBLR             X2                                                     ; +0x140, 0x98c7d8\nFMOV            S0, WZR; float                                         ; +0x144, 0x98c7dc\nLDR             X1, [X19]                                              ; +0x148, 0x98c7e0\nFMOV            S1, S9; float                                          ; +0x14c, 0x98c7e4\nMOV             X0, X20; this                                          ; +0x150, 0x98c7e8\nLDR             X25, [X1,#0x128]                                       ; +0x154, 0x98c7ec\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x158, 0x98c7f0\nMOV             X0, X19                                                ; +0x15c, 0x98c7f4\nMOV             X1, X20                                                ; +0x160, 0x98c7f8\nBLR             X25                                                    ; +0x164, 0x98c7fc\nLDR             X1, [X21]                                              ; +0x168, 0x98c800\nMOV             X0, X21                                                ; +0x16c, 0x98c804\nLDR             X2, [X19]                                              ; +0x170, 0x98c808\nLDR             X1, [X1,#0x148]                                        ; +0x174, 0x98c80c\nLDR             X21, [X2,#0xB8]                                        ; +0x178, 0x98c810\nBLR             X1                                                     ; +0x17c, 0x98c814\nSTR             X23, [X29,#0xA0+var_30]                                ; +0x180, 0x98c818\nLDR             S0, [X0]                                               ; +0x184, 0x98c81c\nMOV             X0, X23; this                                          ; +0x188, 0x98c820\nFMOV            S2, #8.0                                               ; +0x18c, 0x98c824\nFMUL            S0, S0, S9                                             ; +0x190, 0x98c828\nFMOV            S1, WZR; float                                         ; +0x194, 0x98c82c\nFMADD           S0, S0, S8, S2; float                                  ; +0x198, 0x98c830\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x19c, 0x98c834\nLDR             X1, [X29,#0xA0+var_30]                                 ; +0x1a0, 0x98c838\nMOV             X8, X20                                                ; +0x1a4, 0x98c83c\nMOV             X0, X24                                                ; +0x1a8, 0x98c840\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x1ac, 0x98c844\nMOV             X0, X19                                                ; +0x1b0, 0x98c848\nMOV             X1, X20                                                ; +0x1b4, 0x98c84c\nBLR             X21                                                    ; +0x1b8, 0x98c850\nLDR             X1, [X19]                                              ; +0x1bc, 0x98c854\nMOV             X0, X19                                                ; +0x1c0, 0x98c858\nLDR             X1, [X1,#0x148]                                        ; +0x1c4, 0x98c85c\nBLR             X1                                                     ; +0x1c8, 0x98c860\nLDR             S8, =0x42F00000                                        ; +0x1cc, 0x98c864\nLDR             S0, [X0]                                               ; +0x1d0, 0x98c868\nFCMPE           S0, S8                                                 ; +0x1d4, 0x98c86c\nB.GT            loc_98C8E8                                             ; +0x1d8, 0x98c870\nLDR             X1, [X19]                                              ; +0x1dc, 0x98c874\nMOV             X0, X19                                                ; +0x1e0, 0x98c878\nLDR             X2, [X1,#0xA8]                                         ; +0x1e4, 0x98c87c\nLDR             X20, [X1,#0xA0]                                        ; +0x1e8, 0x98c880\nBLR             X2                                                     ; +0x1ec, 0x98c884\nLDR             S1, =0x3EB33333                                        ; +0x1f0, 0x98c888\nFCMPE           S0, S1                                                 ; +0x1f4, 0x98c88c\nB.GT            loc_98C8A8                                             ; +0x1f8, 0x98c890\nLDR             X1, [X19]                                              ; +0x1fc, 0x98c894\nMOV             X0, X19                                                ; +0x200, 0x98c898\nLDR             X1, [X1,#0xA8]                                         ; +0x204, 0x98c89c\nBLR             X1                                                     ; +0x208, 0x98c8a0\nFMOV            S1, S0                                                 ; +0x20c, 0x98c8a4\nFMOV            S0, S1                                                 ; +0x210, 0x98c8a8\nMOV             X0, X19                                                ; +0x214, 0x98c8ac\nBLR             X20                                                    ; +0x218, 0x98c8b0\nLDR             X22, [X22,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x21c, 0x98c8b4\nLDR             X1, [X29,#0xA0+var_8]                                  ; +0x220, 0x98c8b8\nLDR             X0, [X22]                                              ; +0x224, 0x98c8bc\nCMP             X1, X0                                                 ; +0x228, 0x98c8c0\nB.NE            loc_98C910                                             ; +0x22c, 0x98c8c4\nLDP             X19, X20, [SP,#0xA0+var_90]                            ; +0x230, 0x98c8c8\nLDP             D8, D9, [SP,#0xA0+var_48]                              ; +0x234, 0x98c8cc\nLDP             X21, X22, [SP,#0xA0+var_80]                            ; +0x238, 0x98c8d0\nLDP             X23, X24, [SP,#0xA0+var_70]                            ; +0x23c, 0x98c8d4\nLDP             X25, X26, [SP,#0xA0+var_60]                            ; +0x240, 0x98c8d8\nLDR             X27, [SP,#0xA0+var_50]                                 ; +0x244, 0x98c8dc\nLDP             X29, X30, [SP+0xA0+var_A0],#0xA0                       ; +0x248, 0x98c8e0\nRET                                                                    ; +0x24c, 0x98c8e4\nLDR             X1, [X19]                                              ; +0x250, 0x98c8e8\nMOV             X0, X19                                                ; +0x254, 0x98c8ec\nLDR             X2, [X1,#0x148]                                        ; +0x258, 0x98c8f0\nLDR             X20, [X1,#0xA0]                                        ; +0x25c, 0x98c8f4\nBLR             X2                                                     ; +0x260, 0x98c8f8\nLDR             S0, [X0]                                               ; +0x264, 0x98c8fc\nMOV             X0, X19                                                ; +0x268, 0x98c900\nFDIV            S0, S8, S0                                             ; +0x26c, 0x98c904\nBLR             X20                                                    ; +0x270, 0x98c908\nB               loc_98C874                                             ; +0x274, 0x98c90c\nBL              .__stack_chk_fail                                      ; +0x278, 0x98c910", "xrefs": ["<???> @ 0xa7e48"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}