{"type": "func", "start": 5373273440, "end": 5373274047, "name": "LevelSettingsLayer::createToggleButton", "pseudocode": "// \n// LevelSettingsLayer::createToggleButton from 0x14045a560 to 0x14045a7bf (607 bytes)\n// \n// 2 xrefs:\n// > LevelSettingsLayer::init @ 0x140459536\n// > <???> @ 0x140927c2c\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:32:31 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall LevelSettingsLayer::createToggleButton(\n        __int64 a1,\n        const char *a2,\n        __int64 a3,\n        unsigned __int8 a4,\n        __int64 a5,\n        __int64 a6)\n{\n  struct cocos2d::CCSprite *v9; // rbp\n  struct cocos2d::CCSprite *v10; // rbx\n  cocos2d::CCMenuItem *v11; // rdi\n  __int64 v12; // rbx\n  __int64 v13; // rax\n  const char *v14; // rcx\n  struct cocos2d::CCLabelBMFont *v15; // rdi\n  __int64 v16; // rbx\n  __int64 v17; // rax\n  float *v18; // rax\n  __int64 v19; // rax\n  _BYTE v20[8]; // [rsp+20h] [rbp-68h] BYREF\n  _BYTE v21[8]; // [rsp+28h] [rbp-60h] BYREF\n  const char *v22; // [rsp+30h] [rbp-58h]\n\n  v22 = a2;\n  v9 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOn_001.png\");\n  v10 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOff_001.png\");\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v9 + 160LL))(v9);\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v10 + 160LL))(v10);\n  v11 = CCMenuItemToggler::create((int)v9, (int)v10, a1, (__int64)LevelSettingsLayer::onDisable);\n  CCMenuItemToggler::toggle((__int64)v11, a4);\n  (*(void (__fastcall **)(__int64, cocos2d::CCMenuItem *))(*(_QWORD *)a5 + 464LL))(a5, v11);\n  v12 = *(_QWORD *)v11;\n  cocos2d::CCNode::convertToNodeSpace(a5, v20, a6);\n  (*(void (__fastcall **)(cocos2d::CCMenuItem *, __int64))(v12 + 184))(v11, v13);\n  *(_DWORD *)(*((_QWORD *)v11 + 47) + 372LL) = 1069547520;\n  *(_DWORD *)(*((_QWORD *)v11 + 48) + 372LL) = 1069547520;\n  CCMenuItemToggler::toggle((__int64)v11, *((unsigned __int8 *)v11 + 392));\n  if ( *((_QWORD *)a2 + 2) )\n  {\n    v14 = a2;\n    if ( *((_QWORD *)a2 + 3) > 0xFu )\n      v14 = *(const char **)a2;\n    v15 = cocos2d::CCLabelBMFont::create(v14, (const char *)&qword_140704F78);\n    (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(\n      *(_QWORD *)(a1 + 584),\n      v15);\n    v16 = *(_QWORD *)v15;\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, 0.5);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v16 + 288))(v15, v17);\n    v18 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v9 + 320LL))(v9);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (float)((float)(*v18 * 0.5) * 0.80000001) + 6.0, 0.0);\n    cocos2d::CCPoint::operator+(a6, v20, v19);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v15 + 184LL))(v15, v20);\n    if ( *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v15 + 320LL))(v15) > 110.0 )\n    {\n      (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v15 + 320LL))(v15);\n      (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v15 + 160LL))(v15);\n    }\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v15 + 160LL))(v15);\n  }\n  sub_14003D310((__int64)a2);\n}", "assembly": "; \n; LevelSettingsLayer::createToggleButton from 0x14045a560 to 0x14045a7bf (607 bytes)\n; \n; 2 xrefs:\n; > LevelSettingsLayer::init @ 0x140459536\n; > <???> @ 0x140927c2c\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:32:31 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14045a560\npush    rbp                                                            ; +0x5, 0x14045a565\npush    rsi                                                            ; +0x6, 0x14045a566\npush    rdi                                                            ; +0x7, 0x14045a567\npush    r12                                                            ; +0x8, 0x14045a568\npush    r13                                                            ; +0xa, 0x14045a56a\npush    r14                                                            ; +0xc, 0x14045a56c\npush    r15                                                            ; +0xe, 0x14045a56e\nsub     rsp, 50h                                                       ; +0x10, 0x14045a570\nmovaps  [rsp+88h+var_48], xmm6                                         ; +0x14, 0x14045a574\nmov     rax, cs:__security_cookie                                      ; +0x19, 0x14045a579\nxor     rax, rsp                                                       ; +0x20, 0x14045a580\nmov     [rsp+88h+var_50], rax                                          ; +0x23, 0x14045a583\nmovzx   esi, r9b                                                       ; +0x28, 0x14045a588\nmov     r15, rdx                                                       ; +0x2c, 0x14045a58c\nmov     r13, rcx                                                       ; +0x2f, 0x14045a58f\nmov     [rsp+88h+var_58], rdx                                          ; +0x32, 0x14045a592\nmov     r14, [rsp+88h+arg_20]                                          ; +0x37, 0x14045a597\nmov     r12, [rsp+88h+arg_28]                                          ; +0x3f, 0x14045a59f\nlea     rcx, aGjCheckon001Pn; \"GJ_checkOn_001.png\"                     ; +0x47, 0x14045a5a7\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x4e, 0x14045a5ae\nmov     rbp, rax                                                       ; +0x54, 0x14045a5b4\nlea     rcx, aGjCheckoff001P; \"GJ_checkOff_001.png\"                    ; +0x57, 0x14045a5b7\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x5e, 0x14045a5be\nmov     rbx, rax                                                       ; +0x64, 0x14045a5c4\nmov     rcx, [rbp+0]                                                   ; +0x67, 0x14045a5c7\nmov     r8, [rcx+0A0h]                                                 ; +0x6b, 0x14045a5cb\nmovss   xmm1, cs:dword_140834FE8                                       ; +0x72, 0x14045a5d2\nmov     rcx, rbp                                                       ; +0x7a, 0x14045a5da\ncall    r8                                                             ; +0x7d, 0x14045a5dd\nmov     rcx, [rbx]                                                     ; +0x80, 0x14045a5e0\nmov     r8, [rcx+0A0h]                                                 ; +0x83, 0x14045a5e3\nmovss   xmm1, cs:dword_140834FE8                                       ; +0x8a, 0x14045a5ea\nmov     rcx, rbx                                                       ; +0x92, 0x14045a5f2\ncall    r8                                                             ; +0x95, 0x14045a5f5\nlea     r9, LevelSettingsLayer__onDisable                              ; +0x98, 0x14045a5f8\nmov     r8, r13                                                        ; +0x9f, 0x14045a5ff\nmov     rdx, rbx                                                       ; +0xa2, 0x14045a602\nmov     rcx, rbp                                                       ; +0xa5, 0x14045a605\ncall    CCMenuItemToggler__create                                      ; +0xa8, 0x14045a608\nmov     rdi, rax                                                       ; +0xad, 0x14045a60d\nmovzx   edx, sil                                                       ; +0xb0, 0x14045a610\nmov     rcx, rax                                                       ; +0xb4, 0x14045a614\ncall    CCMenuItemToggler__toggle                                      ; +0xb7, 0x14045a617\nmov     rdx, [r14]                                                     ; +0xbc, 0x14045a61c\nmov     r8, [rdx+1D0h]                                                 ; +0xbf, 0x14045a61f\nmov     rdx, rdi                                                       ; +0xc6, 0x14045a626\nmov     rcx, r14                                                       ; +0xc9, 0x14045a629\ncall    r8                                                             ; +0xcc, 0x14045a62c\nmov     rbx, [rdi]                                                     ; +0xcf, 0x14045a62f\nmov     r8, r12                                                        ; +0xd2, 0x14045a632\nlea     rdx, [rsp+88h+var_68]                                          ; +0xd5, 0x14045a635\nmov     rcx, r14                                                       ; +0xda, 0x14045a63a\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xdd, 0x14045a63d\nmov     rdx, rax                                                       ; +0xe3, 0x14045a643\nmov     rcx, rdi                                                       ; +0xe6, 0x14045a646\ncall    qword ptr [rbx+0B8h]                                           ; +0xe9, 0x14045a649\nmov     rax, [rdi+178h]                                                ; +0xef, 0x14045a64f\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0xf6, 0x14045a656\nmov     rax, [rdi+180h]                                                ; +0x100, 0x14045a660\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0x107, 0x14045a667\nmovzx   edx, byte ptr [rdi+188h]                                       ; +0x111, 0x14045a671\nmov     rcx, rdi                                                       ; +0x118, 0x14045a678\ncall    CCMenuItemToggler__toggle                                      ; +0x11b, 0x14045a67b\ncmp     qword ptr [r15+10h], 0                                         ; +0x120, 0x14045a680\njz      loc_14045A78D                                                  ; +0x125, 0x14045a685\nmov     rcx, r15                                                       ; +0x12b, 0x14045a68b\ncmp     qword ptr [r15+18h], 0Fh                                       ; +0x12e, 0x14045a68e\njbe     short loc_14045A698                                            ; +0x133, 0x14045a693\nmov     rcx, [r15]                                                     ; +0x135, 0x14045a695\nlea     rdx, qword_140704F78                                           ; +0x138, 0x14045a698\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x13f, 0x14045a69f\nmov     rdi, rax                                                       ; +0x145, 0x14045a6a5\nmov     rcx, [r13+248h]                                                ; +0x148, 0x14045a6a8\nmov     rdx, [rcx]                                                     ; +0x14f, 0x14045a6af\nmov     r8, [rdx+1D0h]                                                 ; +0x152, 0x14045a6b2\nmov     rdx, rax                                                       ; +0x159, 0x14045a6b9\ncall    r8                                                             ; +0x15c, 0x14045a6bc\nmov     rbx, [rdi]                                                     ; +0x15f, 0x14045a6bf\nmovss   xmm6, cs:dword_140834F20                                       ; +0x162, 0x14045a6c2\nmovaps  xmm2, xmm6                                                     ; +0x16a, 0x14045a6ca\nxorps   xmm1, xmm1                                                     ; +0x16d, 0x14045a6cd\nlea     rcx, [rsp+88h+var_68]                                          ; +0x170, 0x14045a6d0\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x175, 0x14045a6d5\nmov     rdx, rax                                                       ; +0x17b, 0x14045a6db\nmov     rcx, rdi                                                       ; +0x17e, 0x14045a6de\ncall    qword ptr [rbx+120h]                                           ; +0x181, 0x14045a6e1\nmov     rax, [rbp+0]                                                   ; +0x187, 0x14045a6e7\nmov     rcx, rbp                                                       ; +0x18b, 0x14045a6eb\ncall    qword ptr [rax+140h]                                           ; +0x18e, 0x14045a6ee\nmovss   xmm1, dword ptr [rax]                                          ; +0x194, 0x14045a6f4\nmulss   xmm1, xmm6                                                     ; +0x198, 0x14045a6f8\nmulss   xmm1, cs:dword_140834FE8                                       ; +0x19c, 0x14045a6fc\naddss   xmm1, cs:flt_140835490                                         ; +0x1a4, 0x14045a704\nxorps   xmm2, xmm2                                                     ; +0x1ac, 0x14045a70c\nlea     rcx, [rsp+88h+var_60]                                          ; +0x1af, 0x14045a70f\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b4, 0x14045a714\nmov     r8, rax                                                        ; +0x1ba, 0x14045a71a\nlea     rdx, [rsp+88h+var_68]                                          ; +0x1bd, 0x14045a71d\nmov     rcx, r12                                                       ; +0x1c2, 0x14045a722\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x1c5, 0x14045a725\nmov     rax, [rdi]                                                     ; +0x1cb, 0x14045a72b\nlea     rdx, [rsp+88h+var_68]                                          ; +0x1ce, 0x14045a72e\nmov     rcx, rdi                                                       ; +0x1d3, 0x14045a733\ncall    qword ptr [rax+0B8h]                                           ; +0x1d6, 0x14045a736\nmov     rax, [rdi]                                                     ; +0x1dc, 0x14045a73c\nmov     rcx, rdi                                                       ; +0x1df, 0x14045a73f\ncall    qword ptr [rax+140h]                                           ; +0x1e2, 0x14045a742\nmovss   xmm0, dword ptr [rax]                                          ; +0x1e8, 0x14045a748\nmovss   xmm6, cs:dword_1408357D0                                       ; +0x1ec, 0x14045a74c\ncomiss  xmm0, xmm6                                                     ; +0x1f4, 0x14045a754\njbe     short loc_14045A778                                            ; +0x1f7, 0x14045a757\nmov     rax, [rdi]                                                     ; +0x1f9, 0x14045a759\nmov     rcx, rdi                                                       ; +0x1fc, 0x14045a75c\ncall    qword ptr [rax+140h]                                           ; +0x1ff, 0x14045a75f\ndivss   xmm6, dword ptr [rax]                                          ; +0x205, 0x14045a765\nmov     rax, [rdi]                                                     ; +0x209, 0x14045a769\nmovaps  xmm1, xmm6                                                     ; +0x20c, 0x14045a76c\nmov     rcx, rdi                                                       ; +0x20f, 0x14045a76f\ncall    qword ptr [rax+0A0h]                                           ; +0x212, 0x14045a772\nmov     rax, [rdi]                                                     ; +0x218, 0x14045a778\nmovss   xmm1, cs:dword_140834EC0                                       ; +0x21b, 0x14045a77b\nmov     rcx, rdi                                                       ; +0x223, 0x14045a783\ncall    qword ptr [rax+0A0h]                                           ; +0x226, 0x14045a786\nnop                                                                    ; +0x22c, 0x14045a78c\nmov     rcx, r15                                                       ; +0x22d, 0x14045a78d\ncall    sub_14003D310                                                  ; +0x230, 0x14045a790\nmov     rcx, [rsp+88h+var_50]                                          ; +0x235, 0x14045a795\nxor     rcx, rsp; StackCookie                                          ; +0x23a, 0x14045a79a\ncall    __security_check_cookie                                        ; +0x23d, 0x14045a79d\nmov     rbx, [rsp+88h+arg_10]                                          ; +0x242, 0x14045a7a2\nmovaps  xmm6, [rsp+88h+var_48]                                         ; +0x24a, 0x14045a7aa\nadd     rsp, 50h                                                       ; +0x24f, 0x14045a7af\npop     r15                                                            ; +0x253, 0x14045a7b3\npop     r14                                                            ; +0x255, 0x14045a7b5\npop     r13                                                            ; +0x257, 0x14045a7b7\npop     r12                                                            ; +0x259, 0x14045a7b9\npop     rdi                                                            ; +0x25b, 0x14045a7bb\npop     rsi                                                            ; +0x25c, 0x14045a7bc\npop     rbp                                                            ; +0x25d, 0x14045a7bd\nretn                                                                   ; +0x25e, 0x14045a7be", "xrefs": ["LevelSettingsLayer::init @ 0x140459536", "<???> @ 0x140927c2c"], "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"}