{"type": "func", "start": 5373166816, "end": 5373167430, "name": "MoreSearchLayer::createToggleButton", "pseudocode": "// \n// MoreSearchLayer::createToggleButton from 0x1404404e0 to 0x140440746 (614 bytes)\n// \n// 13 xrefs:\n// > MoreSearchLayer::init @ 0x14043becd\n// > MoreSearchLayer::init @ 0x14043c02b\n// > MoreSearchLayer::init @ 0x14043c181\n// > MoreSearchLayer::init @ 0x14043c2e1\n// > MoreSearchLayer::init @ 0x14043c432\n// > MoreSearchLayer::init @ 0x14043c58f\n// > MoreSearchLayer::init @ 0x14043c6ef\n// > MoreSearchLayer::init @ 0x14043c84b\n// > MoreSearchLayer::init @ 0x14043c99a\n// > MoreSearchLayer::init @ 0x14043caf9\n// > MoreSearchLayer::init @ 0x14043cc50\n// > <???> @ 0x14092705c\n// > <???> @ 0x140927068\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:21 +0000\n// \n\n// Hidden C++ exception states: #wind=1\ncocos2d::CCMenuItem *__fastcall MoreSearchLayer::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 *v10; // r12\n  struct cocos2d::CCSprite *v11; // rbx\n  cocos2d::CCMenuItem *v12; // r15\n  __int64 v13; // rbx\n  __int64 v14; // rax\n  const char *v15; // rcx\n  struct cocos2d::CCLabelBMFont *v16; // rdi\n  __int64 v17; // rbx\n  __int64 v18; // rax\n  float *v19; // rax\n  __int64 v20; // rax\n  __int64 v22; // [rsp+20h] [rbp-78h] BYREF\n  _BYTE v23[8]; // [rsp+28h] [rbp-70h] BYREF\n  const char *v24; // [rsp+30h] [rbp-68h]\n\n  v24 = a2;\n  v22 = a6;\n  v10 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOn_001.png\");\n  v11 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOff_001.png\");\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v10 + 160LL))(v10);\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v11 + 160LL))(v11);\n  v12 = CCMenuItemToggler::create((int)v10, (int)v11, a1, a3);\n  CCMenuItemToggler::toggle((__int64)v12, a4);\n  (*(void (__fastcall **)(__int64, cocos2d::CCMenuItem *))(*(_QWORD *)a5 + 464LL))(a5, v12);\n  v13 = *(_QWORD *)v12;\n  cocos2d::CCNode::convertToNodeSpace(a5, &v22, a6);\n  (*(void (__fastcall **)(cocos2d::CCMenuItem *, __int64))(v13 + 184))(v12, v14);\n  *(_DWORD *)(*((_QWORD *)v12 + 47) + 372LL) = 1069547520;\n  *(_DWORD *)(*((_QWORD *)v12 + 48) + 372LL) = 1069547520;\n  CCMenuItemToggler::toggle((__int64)v12, *((unsigned __int8 *)v12 + 392));\n  v15 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v15 = *(const char **)a2;\n  v16 = cocos2d::CCLabelBMFont::create(v15, (const char *)&qword_140704F78);\n  (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(\n    *(_QWORD *)(a1 + 584),\n    v16);\n  v17 = *(_QWORD *)v16;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, 0.0, 0.5);\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v17 + 288))(v16, v18);\n  v19 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v10 + 320LL))(v10);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, (float)((float)(*v19 * 0.5) * 0.80000001) + 8.0, 0.0);\n  cocos2d::CCPoint::operator+(a6, &v22, v20);\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v16 + 184LL))(v16, &v22);\n  if ( *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v16 + 320LL))(v16) > 80.0 )\n  {\n    (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v16 + 320LL))(v16);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v16 + 160LL))(v16);\n  }\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v16 + 168LL))(v16);\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v16 + 160LL))(v16);\n  sub_14003D310((__int64)a2);\n  return v12;\n}", "assembly": "; \n; MoreSearchLayer::createToggleButton from 0x1404404e0 to 0x140440746 (614 bytes)\n; \n; 13 xrefs:\n; > MoreSearchLayer::init @ 0x14043becd\n; > MoreSearchLayer::init @ 0x14043c02b\n; > MoreSearchLayer::init @ 0x14043c181\n; > MoreSearchLayer::init @ 0x14043c2e1\n; > MoreSearchLayer::init @ 0x14043c432\n; > MoreSearchLayer::init @ 0x14043c58f\n; > MoreSearchLayer::init @ 0x14043c6ef\n; > MoreSearchLayer::init @ 0x14043c84b\n; > MoreSearchLayer::init @ 0x14043c99a\n; > MoreSearchLayer::init @ 0x14043caf9\n; > MoreSearchLayer::init @ 0x14043cc50\n; > <???> @ 0x14092705c\n; > <???> @ 0x140927068\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:21 +0000\n; \npush    rbx                                                            ; +0x0, 0x1404404e0\npush    rbp                                                            ; +0x2, 0x1404404e2\npush    rsi                                                            ; +0x3, 0x1404404e3\npush    rdi                                                            ; +0x4, 0x1404404e4\npush    r12                                                            ; +0x5, 0x1404404e5\npush    r13                                                            ; +0x7, 0x1404404e7\npush    r14                                                            ; +0x9, 0x1404404e9\npush    r15                                                            ; +0xb, 0x1404404eb\nsub     rsp, 58h                                                       ; +0xd, 0x1404404ed\nmovaps  [rsp+98h+var_58], xmm6                                         ; +0x11, 0x1404404f1\nmov     rax, cs:__security_cookie                                      ; +0x16, 0x1404404f6\nxor     rax, rsp                                                       ; +0x1d, 0x1404404fd\nmov     [rsp+98h+var_60], rax                                          ; +0x20, 0x140440500\nmovzx   ebp, r9b                                                       ; +0x25, 0x140440505\nmov     rdi, r8                                                        ; +0x29, 0x140440509\nmov     r14, rdx                                                       ; +0x2c, 0x14044050c\nmov     r13, rcx                                                       ; +0x2f, 0x14044050f\nmov     [rsp+98h+var_68], rdx                                          ; +0x32, 0x140440512\nmov     rsi, [rsp+98h+arg_20]                                          ; +0x37, 0x140440517\nmov     rax, [rsp+98h+arg_28]                                          ; +0x3f, 0x14044051f\nmov     [rsp+98h+var_78], rax                                          ; +0x47, 0x140440527\nlea     rcx, aGjCheckon001Pn; \"GJ_checkOn_001.png\"                     ; +0x4c, 0x14044052c\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x53, 0x140440533\nmov     r12, rax                                                       ; +0x59, 0x140440539\nlea     rcx, aGjCheckoff001P; \"GJ_checkOff_001.png\"                    ; +0x5c, 0x14044053c\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x63, 0x140440543\nmov     rbx, rax                                                       ; +0x69, 0x140440549\nmov     rcx, [r12]                                                     ; +0x6c, 0x14044054c\nmov     r8, [rcx+0A0h]                                                 ; +0x70, 0x140440550\nmovss   xmm1, cs:dword_140834FE8                                       ; +0x77, 0x140440557\nmov     rcx, r12                                                       ; +0x7f, 0x14044055f\ncall    r8                                                             ; +0x82, 0x140440562\nmov     rcx, [rbx]                                                     ; +0x85, 0x140440565\nmov     r8, [rcx+0A0h]                                                 ; +0x88, 0x140440568\nmovss   xmm1, cs:dword_140834FE8                                       ; +0x8f, 0x14044056f\nmov     rcx, rbx                                                       ; +0x97, 0x140440577\ncall    r8                                                             ; +0x9a, 0x14044057a\nmov     r9, rdi                                                        ; +0x9d, 0x14044057d\nmov     r8, r13                                                        ; +0xa0, 0x140440580\nmov     rdx, rbx                                                       ; +0xa3, 0x140440583\nmov     rcx, r12                                                       ; +0xa6, 0x140440586\ncall    CCMenuItemToggler__create                                      ; +0xa9, 0x140440589\nmov     r15, rax                                                       ; +0xae, 0x14044058e\nmovzx   edx, bpl                                                       ; +0xb1, 0x140440591\nmov     rcx, rax                                                       ; +0xb5, 0x140440595\ncall    CCMenuItemToggler__toggle                                      ; +0xb8, 0x140440598\nmov     rdx, [rsi]                                                     ; +0xbd, 0x14044059d\nmov     r8, [rdx+1D0h]                                                 ; +0xc0, 0x1404405a0\nmov     rdx, r15                                                       ; +0xc7, 0x1404405a7\nmov     rcx, rsi                                                       ; +0xca, 0x1404405aa\ncall    r8                                                             ; +0xcd, 0x1404405ad\nmov     rbx, [r15]                                                     ; +0xd0, 0x1404405b0\nmov     rbp, [rsp+98h+var_78]                                          ; +0xd3, 0x1404405b3\nmov     r8, rbp                                                        ; +0xd8, 0x1404405b8\nlea     rdx, [rsp+98h+var_78]                                          ; +0xdb, 0x1404405bb\nmov     rcx, rsi                                                       ; +0xe0, 0x1404405c0\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xe3, 0x1404405c3\nmov     rdx, rax                                                       ; +0xe9, 0x1404405c9\nmov     rcx, r15                                                       ; +0xec, 0x1404405cc\ncall    qword ptr [rbx+0B8h]                                           ; +0xef, 0x1404405cf\nmov     rax, [r15+178h]                                                ; +0xf5, 0x1404405d5\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0xfc, 0x1404405dc\nmov     rax, [r15+180h]                                                ; +0x106, 0x1404405e6\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0x10d, 0x1404405ed\nmovzx   edx, byte ptr [r15+188h]                                       ; +0x117, 0x1404405f7\nmov     rcx, r15                                                       ; +0x11f, 0x1404405ff\ncall    CCMenuItemToggler__toggle                                      ; +0x122, 0x140440602\nmov     rcx, r14                                                       ; +0x127, 0x140440607\ncmp     qword ptr [r14+18h], 0Fh                                       ; +0x12a, 0x14044060a\njbe     short loc_140440614                                            ; +0x12f, 0x14044060f\nmov     rcx, [r14]                                                     ; +0x131, 0x140440611\nlea     rdx, qword_140704F78                                           ; +0x134, 0x140440614\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x13b, 0x14044061b\nmov     rdi, rax                                                       ; +0x141, 0x140440621\nmov     rcx, [r13+248h]                                                ; +0x144, 0x140440624\nmov     rdx, [rcx]                                                     ; +0x14b, 0x14044062b\nmov     r8, [rdx+1D0h]                                                 ; +0x14e, 0x14044062e\nmov     rdx, rax                                                       ; +0x155, 0x140440635\ncall    r8                                                             ; +0x158, 0x140440638\nmov     rbx, [rdi]                                                     ; +0x15b, 0x14044063b\nmovss   xmm6, cs:dword_140834F20                                       ; +0x15e, 0x14044063e\nmovaps  xmm2, xmm6                                                     ; +0x166, 0x140440646\nxorps   xmm1, xmm1                                                     ; +0x169, 0x140440649\nlea     rcx, [rsp+98h+var_78]                                          ; +0x16c, 0x14044064c\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x171, 0x140440651\nmov     rdx, rax                                                       ; +0x177, 0x140440657\nmov     rcx, rdi                                                       ; +0x17a, 0x14044065a\ncall    qword ptr [rbx+120h]                                           ; +0x17d, 0x14044065d\nmov     rax, [r12]                                                     ; +0x183, 0x140440663\nmov     rcx, r12                                                       ; +0x187, 0x140440667\ncall    qword ptr [rax+140h]                                           ; +0x18a, 0x14044066a\nmovss   xmm1, dword ptr [rax]                                          ; +0x190, 0x140440670\nmulss   xmm1, xmm6                                                     ; +0x194, 0x140440674\nmulss   xmm1, cs:dword_140834FE8                                       ; +0x198, 0x140440678\naddss   xmm1, cs:dword_1408354D4                                       ; +0x1a0, 0x140440680\nxorps   xmm2, xmm2                                                     ; +0x1a8, 0x140440688\nlea     rcx, [rsp+98h+var_70]                                          ; +0x1ab, 0x14044068b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b0, 0x140440690\nmov     r8, rax                                                        ; +0x1b6, 0x140440696\nlea     rdx, [rsp+98h+var_78]                                          ; +0x1b9, 0x140440699\nmov     rcx, rbp                                                       ; +0x1be, 0x14044069e\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x1c1, 0x1404406a1\nmov     rax, [rdi]                                                     ; +0x1c7, 0x1404406a7\nlea     rdx, [rsp+98h+var_78]                                          ; +0x1ca, 0x1404406aa\nmov     rcx, rdi                                                       ; +0x1cf, 0x1404406af\ncall    qword ptr [rax+0B8h]                                           ; +0x1d2, 0x1404406b2\nmov     rax, [rdi]                                                     ; +0x1d8, 0x1404406b8\nmov     rcx, rdi                                                       ; +0x1db, 0x1404406bb\ncall    qword ptr [rax+140h]                                           ; +0x1de, 0x1404406be\nmovss   xmm0, dword ptr [rax]                                          ; +0x1e4, 0x1404406c4\nmovss   xmm6, cs:dword_14083574C                                       ; +0x1e8, 0x1404406c8\ncomiss  xmm0, xmm6                                                     ; +0x1f0, 0x1404406d0\njbe     short loc_1404406F4                                            ; +0x1f3, 0x1404406d3\nmov     rax, [rdi]                                                     ; +0x1f5, 0x1404406d5\nmov     rcx, rdi                                                       ; +0x1f8, 0x1404406d8\ncall    qword ptr [rax+140h]                                           ; +0x1fb, 0x1404406db\ndivss   xmm6, dword ptr [rax]                                          ; +0x201, 0x1404406e1\nmov     rax, [rdi]                                                     ; +0x205, 0x1404406e5\nmovaps  xmm1, xmm6                                                     ; +0x208, 0x1404406e8\nmov     rcx, rdi                                                       ; +0x20b, 0x1404406eb\ncall    qword ptr [rax+0A0h]                                           ; +0x20e, 0x1404406ee\nmov     rax, [rdi]                                                     ; +0x214, 0x1404406f4\nmov     rcx, rdi                                                       ; +0x217, 0x1404406f7\ncall    qword ptr [rax+0A8h]                                           ; +0x21a, 0x1404406fa\nminss   xmm0, cs:dword_140834EC0                                       ; +0x220, 0x140440700\nmov     rax, [rdi]                                                     ; +0x228, 0x140440708\nmovaps  xmm1, xmm0                                                     ; +0x22b, 0x14044070b\nmov     rcx, rdi                                                       ; +0x22e, 0x14044070e\ncall    qword ptr [rax+0A0h]                                           ; +0x231, 0x140440711\nnop                                                                    ; +0x237, 0x140440717\nmov     rcx, r14                                                       ; +0x238, 0x140440718\ncall    sub_14003D310                                                  ; +0x23b, 0x14044071b\nmov     rax, r15                                                       ; +0x240, 0x140440720\nmov     rcx, [rsp+98h+var_60]                                          ; +0x243, 0x140440723\nxor     rcx, rsp; StackCookie                                          ; +0x248, 0x140440728\ncall    __security_check_cookie                                        ; +0x24b, 0x14044072b\nmovaps  xmm6, [rsp+98h+var_58]                                         ; +0x250, 0x140440730\nadd     rsp, 58h                                                       ; +0x255, 0x140440735\npop     r15                                                            ; +0x259, 0x140440739\npop     r14                                                            ; +0x25b, 0x14044073b\npop     r13                                                            ; +0x25d, 0x14044073d\npop     r12                                                            ; +0x25f, 0x14044073f\npop     rdi                                                            ; +0x261, 0x140440741\npop     rsi                                                            ; +0x262, 0x140440742\npop     rbp                                                            ; +0x263, 0x140440743\npop     rbx                                                            ; +0x264, 0x140440744\nretn                                                                   ; +0x265, 0x140440745", "xrefs": ["MoreSearchLayer::init @ 0x14043becd", "MoreSearchLayer::init @ 0x14043c02b", "MoreSearchLayer::init @ 0x14043c181", "MoreSearchLayer::init @ 0x14043c2e1", "MoreSearchLayer::init @ 0x14043c432", "MoreSearchLayer::init @ 0x14043c58f", "MoreSearchLayer::init @ 0x14043c6ef", "MoreSearchLayer::init @ 0x14043c84b", "MoreSearchLayer::init @ 0x14043c99a", "MoreSearchLayer::init @ 0x14043caf9", "MoreSearchLayer::init @ 0x14043cc50", "<???> @ 0x14092705c", "<???> @ 0x140927068"], "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"}