{"type": "func", "start": 5372503952, "end": 5372504479, "name": "GJAccountSettingsLayer::createToggleButton", "pseudocode": "// \n// GJAccountSettingsLayer::createToggleButton from 0x14039e790 to 0x14039e99f (527 bytes)\n// \n// 13 xrefs:\n// > GJAccountSettingsLayer::init @ 0x14039d2ca\n// > GJAccountSettingsLayer::init @ 0x14039d3a5\n// > GJAccountSettingsLayer::init @ 0x14039d472\n// > GJAccountSettingsLayer::init @ 0x14039d77e\n// > GJAccountSettingsLayer::init @ 0x14039d825\n// > GJAccountSettingsLayer::init @ 0x14039d8d8\n// > GJAccountSettingsLayer::init @ 0x14039dc14\n// > GJAccountSettingsLayer::init @ 0x14039dce4\n// > GJAccountSettingsLayer::init @ 0x14039dd8e\n// > GJAccountSettingsLayer::init @ 0x14039dfa7\n// > GJAccountSettingsLayer::init @ 0x14039e065\n// > GJAccountSettingsLayer::init @ 0x14039e10c\n// > <???> @ 0x1409233b4\n// \n// This function is hookable on this platform (idp: pc, 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 11:31:16 +0000\n// \n\n// Hidden C++ exception states: #wind=1\ncocos2d::CCMenuItem *__fastcall GJAccountSettingsLayer::createToggleButton(\n        __int64 a1,\n        const char *a2,\n        __int64 a3,\n        __int64 a4,\n        __int64 a5,\n        __int64 a6,\n        float a7,\n        float a8)\n{\n  struct cocos2d::CCSprite *v11; // rbp\n  struct cocos2d::CCSprite *v12; // rbx\n  cocos2d::CCMenuItem *v13; // r15\n  __int64 v14; // rdx\n  __int64 v15; // rbx\n  __int64 v16; // rax\n  const char *v17; // rcx\n  cocos2d::CCLabelBMFont *v18; // rdi\n  __int64 v19; // rbx\n  __int64 v20; // rax\n  float *v21; // rax\n  __int64 v22; // rax\n  _BYTE v24[8]; // [rsp+20h] [rbp-68h] BYREF\n  _BYTE v25[8]; // [rsp+28h] [rbp-60h] BYREF\n  const char *v26; // [rsp+30h] [rbp-58h]\n\n  v26 = a2;\n  v11 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOn_001.png\");\n  v12 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOff_001.png\");\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v11 + 160LL))(v11);\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v12 + 160LL))(v12);\n  v13 = CCMenuItemToggler::create((int)v11, (int)v12, a1, a3);\n  LOBYTE(v14) = 1;\n  CCMenuItemToggler::toggle((__int64)v13, v14);\n  (*(void (__fastcall **)(__int64, cocos2d::CCMenuItem *))(*(_QWORD *)a5 + 464LL))(a5, v13);\n  v15 = *(_QWORD *)v13;\n  cocos2d::CCNode::convertToNodeSpace(a5, v24, a6);\n  (*(void (__fastcall **)(cocos2d::CCMenuItem *, __int64))(v15 + 184))(v13, v16);\n  *(_DWORD *)(*((_QWORD *)v13 + 47) + 372LL) = 1069547520;\n  *(_DWORD *)(*((_QWORD *)v13 + 48) + 372LL) = 1069547520;\n  CCMenuItemToggler::toggle((__int64)v13, *((unsigned __int8 *)v13 + 392));\n  v17 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v17 = *(const char **)a2;\n  v18 = cocos2d::CCLabelBMFont::create(v17, (const char *)&qword_140704F78);\n  (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(\n    *(_QWORD *)(a1 + 584),\n    v18);\n  v19 = *(_QWORD *)v18;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 0.0, 0.5);\n  (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v19 + 288))(v18, v20);\n  v21 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v11 + 320LL))(v11);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (float)((float)(*v21 * 0.5) * 0.5) + 4.0, 0.0);\n  cocos2d::CCPoint::operator+(a6, v24, v22);\n  (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v18 + 184LL))(v18, v24);\n  cocos2d::CCLabelBMFont::limitLabelWidth(v18, a7, a8, 0.0);\n  sub_14003D310((__int64)a2);\n  return v13;\n}", "assembly": "; \n; GJAccountSettingsLayer::createToggleButton from 0x14039e790 to 0x14039e99f (527 bytes)\n; \n; 13 xrefs:\n; > GJAccountSettingsLayer::init @ 0x14039d2ca\n; > GJAccountSettingsLayer::init @ 0x14039d3a5\n; > GJAccountSettingsLayer::init @ 0x14039d472\n; > GJAccountSettingsLayer::init @ 0x14039d77e\n; > GJAccountSettingsLayer::init @ 0x14039d825\n; > GJAccountSettingsLayer::init @ 0x14039d8d8\n; > GJAccountSettingsLayer::init @ 0x14039dc14\n; > GJAccountSettingsLayer::init @ 0x14039dce4\n; > GJAccountSettingsLayer::init @ 0x14039dd8e\n; > GJAccountSettingsLayer::init @ 0x14039dfa7\n; > GJAccountSettingsLayer::init @ 0x14039e065\n; > GJAccountSettingsLayer::init @ 0x14039e10c\n; > <???> @ 0x1409233b4\n; \n; This function is hookable on this platform (idp: pc, 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 11:31:16 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x14039e790\npush    rbp                                                            ; +0x5, 0x14039e795\npush    rsi                                                            ; +0x6, 0x14039e796\npush    rdi                                                            ; +0x7, 0x14039e797\npush    r12                                                            ; +0x8, 0x14039e798\npush    r13                                                            ; +0xa, 0x14039e79a\npush    r14                                                            ; +0xc, 0x14039e79c\npush    r15                                                            ; +0xe, 0x14039e79e\nsub     rsp, 50h                                                       ; +0x10, 0x14039e7a0\nmovaps  [rsp+88h+var_48], xmm6                                         ; +0x14, 0x14039e7a4\nmov     rax, cs:__security_cookie                                      ; +0x19, 0x14039e7a9\nxor     rax, rsp                                                       ; +0x20, 0x14039e7b0\nmov     [rsp+88h+var_50], rax                                          ; +0x23, 0x14039e7b3\nmov     rdi, r8                                                        ; +0x28, 0x14039e7b8\nmov     r14, rdx                                                       ; +0x2b, 0x14039e7bb\nmov     r13, rcx                                                       ; +0x2e, 0x14039e7be\nmov     [rsp+88h+var_58], rdx                                          ; +0x31, 0x14039e7c1\nmov     rsi, [rsp+88h+arg_20]                                          ; +0x36, 0x14039e7c6\nmov     r12, [rsp+88h+arg_28]                                          ; +0x3e, 0x14039e7ce\nlea     rcx, aGjCheckon001Pn; \"GJ_checkOn_001.png\"                     ; +0x46, 0x14039e7d6\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x4d, 0x14039e7dd\nmov     rbp, rax                                                       ; +0x53, 0x14039e7e3\nlea     rcx, aGjCheckoff001P; \"GJ_checkOff_001.png\"                    ; +0x56, 0x14039e7e6\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x5d, 0x14039e7ed\nmov     rbx, rax                                                       ; +0x63, 0x14039e7f3\nmov     rcx, [rbp+0]                                                   ; +0x66, 0x14039e7f6\nmov     rdx, [rcx+0A0h]                                                ; +0x6a, 0x14039e7fa\nmovss   xmm6, cs:dword_140834F20                                       ; +0x71, 0x14039e801\nmovaps  xmm1, xmm6                                                     ; +0x79, 0x14039e809\nmov     rcx, rbp                                                       ; +0x7c, 0x14039e80c\ncall    rdx                                                            ; +0x7f, 0x14039e80f\nmov     rcx, [rbx]                                                     ; +0x81, 0x14039e811\nmov     rdx, [rcx+0A0h]                                                ; +0x84, 0x14039e814\nmovaps  xmm1, xmm6                                                     ; +0x8b, 0x14039e81b\nmov     rcx, rbx                                                       ; +0x8e, 0x14039e81e\ncall    rdx                                                            ; +0x91, 0x14039e821\nmov     r9, rdi                                                        ; +0x93, 0x14039e823\nmov     r8, r13                                                        ; +0x96, 0x14039e826\nmov     rdx, rbx                                                       ; +0x99, 0x14039e829\nmov     rcx, rbp                                                       ; +0x9c, 0x14039e82c\ncall    CCMenuItemToggler__create                                      ; +0x9f, 0x14039e82f\nmov     r15, rax                                                       ; +0xa4, 0x14039e834\nmov     dl, 1                                                          ; +0xa7, 0x14039e837\nmov     rcx, rax                                                       ; +0xa9, 0x14039e839\ncall    CCMenuItemToggler__toggle                                      ; +0xac, 0x14039e83c\nmov     rdx, [rsi]                                                     ; +0xb1, 0x14039e841\nmov     r8, [rdx+1D0h]                                                 ; +0xb4, 0x14039e844\nmov     rdx, r15                                                       ; +0xbb, 0x14039e84b\nmov     rcx, rsi                                                       ; +0xbe, 0x14039e84e\ncall    r8                                                             ; +0xc1, 0x14039e851\nmov     rbx, [r15]                                                     ; +0xc4, 0x14039e854\nmov     r8, r12                                                        ; +0xc7, 0x14039e857\nlea     rdx, [rsp+88h+var_68]                                          ; +0xca, 0x14039e85a\nmov     rcx, rsi                                                       ; +0xcf, 0x14039e85f\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xd2, 0x14039e862\nmov     rdx, rax                                                       ; +0xd8, 0x14039e868\nmov     rcx, r15                                                       ; +0xdb, 0x14039e86b\ncall    qword ptr [rbx+0B8h]                                           ; +0xde, 0x14039e86e\nmov     rax, [r15+178h]                                                ; +0xe4, 0x14039e874\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0xeb, 0x14039e87b\nmov     rax, [r15+180h]                                                ; +0xf5, 0x14039e885\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0xfc, 0x14039e88c\nmovzx   edx, byte ptr [r15+188h]                                       ; +0x106, 0x14039e896\nmov     rcx, r15                                                       ; +0x10e, 0x14039e89e\ncall    CCMenuItemToggler__toggle                                      ; +0x111, 0x14039e8a1\nmov     rcx, r14                                                       ; +0x116, 0x14039e8a6\ncmp     qword ptr [r14+18h], 0Fh                                       ; +0x119, 0x14039e8a9\njbe     short loc_14039E8B3                                            ; +0x11e, 0x14039e8ae\nmov     rcx, [r14]                                                     ; +0x120, 0x14039e8b0\nlea     rdx, qword_140704F78                                           ; +0x123, 0x14039e8b3\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x12a, 0x14039e8ba\nmov     rdi, rax                                                       ; +0x130, 0x14039e8c0\nmov     rcx, [r13+248h]                                                ; +0x133, 0x14039e8c3\nmov     rdx, [rcx]                                                     ; +0x13a, 0x14039e8ca\nmov     r8, [rdx+1D0h]                                                 ; +0x13d, 0x14039e8cd\nmov     rdx, rax                                                       ; +0x144, 0x14039e8d4\ncall    r8                                                             ; +0x147, 0x14039e8d7\nmov     rbx, [rdi]                                                     ; +0x14a, 0x14039e8da\nmovaps  xmm2, xmm6                                                     ; +0x14d, 0x14039e8dd\nxorps   xmm1, xmm1                                                     ; +0x150, 0x14039e8e0\nlea     rcx, [rsp+88h+var_68]                                          ; +0x153, 0x14039e8e3\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x158, 0x14039e8e8\nmov     rdx, rax                                                       ; +0x15e, 0x14039e8ee\nmov     rcx, rdi                                                       ; +0x161, 0x14039e8f1\ncall    qword ptr [rbx+120h]                                           ; +0x164, 0x14039e8f4\nmov     rax, [rbp+0]                                                   ; +0x16a, 0x14039e8fa\nmov     rcx, rbp                                                       ; +0x16e, 0x14039e8fe\ncall    qword ptr [rax+140h]                                           ; +0x171, 0x14039e901\nmovss   xmm1, dword ptr [rax]                                          ; +0x177, 0x14039e907\nmulss   xmm1, xmm6                                                     ; +0x17b, 0x14039e90b\nmulss   xmm1, xmm6                                                     ; +0x17f, 0x14039e90f\naddss   xmm1, cs:dword_140835450                                       ; +0x183, 0x14039e913\nxorps   xmm2, xmm2                                                     ; +0x18b, 0x14039e91b\nlea     rcx, [rsp+88h+var_60]                                          ; +0x18e, 0x14039e91e\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x193, 0x14039e923\nmov     r8, rax                                                        ; +0x199, 0x14039e929\nlea     rdx, [rsp+88h+var_68]                                          ; +0x19c, 0x14039e92c\nmov     rcx, r12                                                       ; +0x1a1, 0x14039e931\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x1a4, 0x14039e934\nmov     rax, [rdi]                                                     ; +0x1aa, 0x14039e93a\nlea     rdx, [rsp+88h+var_68]                                          ; +0x1ad, 0x14039e93d\nmov     rcx, rdi                                                       ; +0x1b2, 0x14039e942\ncall    qword ptr [rax+0B8h]                                           ; +0x1b5, 0x14039e945\nxorps   xmm3, xmm3                                                     ; +0x1bb, 0x14039e94b\nmovss   xmm2, [rsp+88h+arg_38]                                         ; +0x1be, 0x14039e94e\nmovss   xmm1, [rsp+88h+arg_30]                                         ; +0x1c7, 0x14039e957\nmov     rcx, rdi                                                       ; +0x1d0, 0x14039e960\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0x1d3, 0x14039e963\nnop                                                                    ; +0x1d9, 0x14039e969\nmov     rcx, r14                                                       ; +0x1da, 0x14039e96a\ncall    sub_14003D310                                                  ; +0x1dd, 0x14039e96d\nmov     rax, r15                                                       ; +0x1e2, 0x14039e972\nmov     rcx, [rsp+88h+var_50]                                          ; +0x1e5, 0x14039e975\nxor     rcx, rsp; StackCookie                                          ; +0x1ea, 0x14039e97a\ncall    __security_check_cookie                                        ; +0x1ed, 0x14039e97d\nmov     rbx, [rsp+88h+arg_18]                                          ; +0x1f2, 0x14039e982\nmovaps  xmm6, [rsp+88h+var_48]                                         ; +0x1fa, 0x14039e98a\nadd     rsp, 50h                                                       ; +0x1ff, 0x14039e98f\npop     r15                                                            ; +0x203, 0x14039e993\npop     r14                                                            ; +0x205, 0x14039e995\npop     r13                                                            ; +0x207, 0x14039e997\npop     r12                                                            ; +0x209, 0x14039e999\npop     rdi                                                            ; +0x20b, 0x14039e99b\npop     rsi                                                            ; +0x20c, 0x14039e99c\npop     rbp                                                            ; +0x20d, 0x14039e99d\nretn                                                                   ; +0x20e, 0x14039e99e", "xrefs": ["GJAccountSettingsLayer::init @ 0x14039d2ca", "GJAccountSettingsLayer::init @ 0x14039d3a5", "GJAccountSettingsLayer::init @ 0x14039d472", "GJAccountSettingsLayer::init @ 0x14039d77e", "GJAccountSettingsLayer::init @ 0x14039d825", "GJAccountSettingsLayer::init @ 0x14039d8d8", "GJAccountSettingsLayer::init @ 0x14039dc14", "GJAccountSettingsLayer::init @ 0x14039dce4", "GJAccountSettingsLayer::init @ 0x14039dd8e", "GJAccountSettingsLayer::init @ 0x14039dfa7", "GJAccountSettingsLayer::init @ 0x14039e065", "GJAccountSettingsLayer::init @ 0x14039e10c", "<???> @ 0x1409233b4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}