{"type": "func", "start": 5371949792, "end": 5371950391, "name": "MoreSearchLayer::createToggleButton", "pseudocode": "// \n// MoreSearchLayer::createToggleButton from 0x1403172e0 to 0x140317537 (599 bytes)\n// \n// 12 xrefs:\n// > MoreSearchLayer::init @ 0x1403130f5\n// > MoreSearchLayer::init @ 0x140313255\n// > MoreSearchLayer::init @ 0x140313399\n// > MoreSearchLayer::init @ 0x1403134eb\n// > MoreSearchLayer::init @ 0x14031362e\n// > MoreSearchLayer::init @ 0x140313788\n// > MoreSearchLayer::init @ 0x1403138e0\n// > MoreSearchLayer::init @ 0x140313a26\n// > MoreSearchLayer::init @ 0x140313b67\n// > MoreSearchLayer::init @ 0x140313cc8\n// > MoreSearchLayer::init @ 0x140313e11\n// > <???> @ 0x1406d49a0\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\n// Hidden C++ exception states: #wind=1\nCCMenuItemToggler *__fastcall MoreSearchLayer::createToggleButton(\n        __int64 a1,\n        const char *a2,\n        cocos2d::SEL_MenuHandler *a3,\n        bool a4,\n        cocos2d::CCNode *a5,\n        struct cocos2d::CCPoint a6)\n{\n  struct cocos2d::CCSprite *v10; // r12\n  struct cocos2d::CCSprite *v11; // rbx\n  CCMenuItemToggler *v12; // r15\n  CCMenuItemToggler_vtbl *v13; // rbx\n  struct cocos2d::CCPoint v14; // rax\n  const char *v15; // rcx\n  struct cocos2d::CCLabelBMFont *v16; // rdi\n  float v17; // xmm0_4\n  cocos2d::CCLabelBMFont_vtbl *v18; // rbx\n  double v19; // xmm0_8\n  const cocos2d::CCPoint *v20; // rax\n  float *v21; // rax\n  cocos2d::CCLabelBMFont_vtbl *v22; // rbx\n  struct cocos2d::CCPoint v24[3]; // [rsp+20h] [rbp-78h] BYREF\n\n  v24[2] = (struct cocos2d::CCPoint)a2;\n  v24[0] = 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 *))v10->setScale_0)(v10);\n  ((void (__fastcall *)(struct cocos2d::CCSprite *))v11->setScale_0)(v11);\n  v12 = CCMenuItemToggler::create(v10, v11, (cocos2d::CCObject *)a1, a3);\n  CCMenuItemToggler::toggle(v12, a4);\n  a5->addChild_1(a5, v12);\n  v13 = v12->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v14 = cocos2d::CCNode::convertToNodeSpace(a5, v24);\n  ((void (__fastcall *)(CCMenuItemToggler *, struct cocos2d::CCPoint))v13->setPosition_0)(v12, v14);\n  *(_DWORD *)(*(_QWORD *)&v12->m_nScriptTapHandler + 372LL) = 1069547520;\n  HIDWORD(v12->m_offButton->m_pfnSelector.adj) = 1069547520;\n  CCMenuItemToggler::toggle(v12, (bool)v12->m_onButton);\n  v15 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v15 = *(const char **)a2;\n  v16 = cocos2d::CCLabelBMFont::create(v15, (const char *)&qword_14052A4D8);\n  v17 = (*(float (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 576) + 448LL))(\n          *(_QWORD *)(a1 + 576),\n          v16);\n  v18 = v16->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v19 = cocos2d::CCPoint::CCPoint(v17, 0.0);\n  v18->setAnchorPoint(v16, v20);\n  v21 = (float *)v10->getContentSize(v10);\n  cocos2d::CCPoint::CCPoint(*(float *)&v19, (float)((float)(*v21 * 0.5) * 0.80000001) + 8.0);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(a6, v24);\n  v16->setPosition_0(v16, v24);\n  if ( v16->getContentSize(v16)->width > 80.0 )\n  {\n    v22 = v16->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v16->getContentSize(v16);\n    ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v22->setScale_0)(v16);\n  }\n  v16->getScale(v16);\n  ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v16->setScale_0)(v16);\n  sub_14003A830((__int64)a2);\n  return v12;\n}", "assembly": "; \n; MoreSearchLayer::createToggleButton from 0x1403172e0 to 0x140317537 (599 bytes)\n; \n; 12 xrefs:\n; > MoreSearchLayer::init @ 0x1403130f5\n; > MoreSearchLayer::init @ 0x140313255\n; > MoreSearchLayer::init @ 0x140313399\n; > MoreSearchLayer::init @ 0x1403134eb\n; > MoreSearchLayer::init @ 0x14031362e\n; > MoreSearchLayer::init @ 0x140313788\n; > MoreSearchLayer::init @ 0x1403138e0\n; > MoreSearchLayer::init @ 0x140313a26\n; > MoreSearchLayer::init @ 0x140313b67\n; > MoreSearchLayer::init @ 0x140313cc8\n; > MoreSearchLayer::init @ 0x140313e11\n; > <???> @ 0x1406d49a0\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\npush    rbx                                                            ; +0x0, 0x1403172e0\npush    rbp                                                            ; +0x2, 0x1403172e2\npush    rsi                                                            ; +0x3, 0x1403172e3\npush    rdi                                                            ; +0x4, 0x1403172e4\npush    r12                                                            ; +0x5, 0x1403172e5\npush    r13                                                            ; +0x7, 0x1403172e7\npush    r14                                                            ; +0x9, 0x1403172e9\npush    r15                                                            ; +0xb, 0x1403172eb\nsub     rsp, 58h                                                       ; +0xd, 0x1403172ed\nmovaps  [rsp+98h+var_58], xmm6                                         ; +0x11, 0x1403172f1\nmov     rax, cs:__security_cookie                                      ; +0x16, 0x1403172f6\nxor     rax, rsp                                                       ; +0x1d, 0x1403172fd\nmov     [rsp+98h+var_60], rax                                          ; +0x20, 0x140317300\nmovzx   ebp, r9b                                                       ; +0x25, 0x140317305\nmov     rdi, r8                                                        ; +0x29, 0x140317309\nmov     r14, rdx                                                       ; +0x2c, 0x14031730c\nmov     r13, rcx                                                       ; +0x2f, 0x14031730f\nmov     [rsp+98h+var_68], rdx                                          ; +0x32, 0x140317312\nmov     rsi, [rsp+98h+arg_20]                                          ; +0x37, 0x140317317\nmov     rax, [rsp+98h+arg_28]                                          ; +0x3f, 0x14031731f\nmov     [rsp+98h+var_78], rax                                          ; +0x47, 0x140317327\nlea     rcx, aGjCheckon001Pn; \"GJ_checkOn_001.png\"                     ; +0x4c, 0x14031732c\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x53, 0x140317333\nmov     r12, rax                                                       ; +0x59, 0x140317339\nlea     rcx, aGjCheckoff001P; \"GJ_checkOff_001.png\"                    ; +0x5c, 0x14031733c\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x63, 0x140317343\nmov     rbx, rax                                                       ; +0x69, 0x140317349\nmov     r8, [r12]                                                      ; +0x6c, 0x14031734c\nmovss   xmm1, cs:dword_140622BA4                                       ; +0x70, 0x140317350\nmov     rcx, r12                                                       ; +0x78, 0x140317358\ncall    qword ptr [r8+0A0h]                                            ; +0x7b, 0x14031735b\nmov     r8, [rbx]                                                      ; +0x82, 0x140317362\nmovss   xmm1, cs:dword_140622BA4                                       ; +0x85, 0x140317365\nmov     rcx, rbx                                                       ; +0x8d, 0x14031736d\ncall    qword ptr [r8+0A0h]                                            ; +0x90, 0x140317370\nmov     r9, rdi                                                        ; +0x97, 0x140317377\nmov     r8, r13                                                        ; +0x9a, 0x14031737a\nmov     rdx, rbx                                                       ; +0x9d, 0x14031737d\nmov     rcx, r12                                                       ; +0xa0, 0x140317380\ncall    CCMenuItemToggler__create                                      ; +0xa3, 0x140317383\nmov     r15, rax                                                       ; +0xa8, 0x140317388\nmovzx   edx, bpl                                                       ; +0xab, 0x14031738b\nmov     rcx, rax                                                       ; +0xaf, 0x14031738f\ncall    CCMenuItemToggler__toggle                                      ; +0xb2, 0x140317392\nmov     r8, [rsi]                                                      ; +0xb7, 0x140317397\nmov     rdx, r15                                                       ; +0xba, 0x14031739a\nmov     rcx, rsi                                                       ; +0xbd, 0x14031739d\ncall    qword ptr [r8+1C0h]                                            ; +0xc0, 0x1403173a0\nmov     rbx, [r15]                                                     ; +0xc7, 0x1403173a7\nmov     rbp, [rsp+98h+var_78]                                          ; +0xca, 0x1403173aa\nmov     r8, rbp                                                        ; +0xcf, 0x1403173af\nlea     rdx, [rsp+98h+var_78]                                          ; +0xd2, 0x1403173b2\nmov     rcx, rsi                                                       ; +0xd7, 0x1403173b7\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xda, 0x1403173ba\nmov     rdx, rax                                                       ; +0xe0, 0x1403173c0\nmov     rcx, r15                                                       ; +0xe3, 0x1403173c3\ncall    qword ptr [rbx+0B8h]                                           ; +0xe6, 0x1403173c6\nmov     rax, [r15+178h]                                                ; +0xec, 0x1403173cc\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0xf3, 0x1403173d3\nmov     rax, [r15+180h]                                                ; +0xfd, 0x1403173dd\nmov     dword ptr [rax+174h], 3FC00000h                                ; +0x104, 0x1403173e4\nmovzx   edx, byte ptr [r15+188h]                                       ; +0x10e, 0x1403173ee\nmov     rcx, r15                                                       ; +0x116, 0x1403173f6\ncall    CCMenuItemToggler__toggle                                      ; +0x119, 0x1403173f9\nmov     rcx, r14                                                       ; +0x11e, 0x1403173fe\ncmp     qword ptr [r14+18h], 0Fh                                       ; +0x121, 0x140317401\njbe     short loc_14031740B                                            ; +0x126, 0x140317406\nmov     rcx, [r14]                                                     ; +0x128, 0x140317408\nlea     rdx, qword_14052A4D8                                           ; +0x12b, 0x14031740b\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x132, 0x140317412\nmov     rdi, rax                                                       ; +0x138, 0x140317418\nmov     rcx, [r13+240h]                                                ; +0x13b, 0x14031741b\nmov     r8, [rcx]                                                      ; +0x142, 0x140317422\nmov     rdx, rax                                                       ; +0x145, 0x140317425\ncall    qword ptr [r8+1C0h]                                            ; +0x148, 0x140317428\nmov     rbx, [rdi]                                                     ; +0x14f, 0x14031742f\nmovss   xmm6, cs:dword_140622B08                                       ; +0x152, 0x140317432\nmovaps  xmm2, xmm6                                                     ; +0x15a, 0x14031743a\nxorps   xmm1, xmm1                                                     ; +0x15d, 0x14031743d\nlea     rcx, [rsp+98h+var_78]                                          ; +0x160, 0x140317440\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x165, 0x140317445\nmov     rdx, rax                                                       ; +0x16b, 0x14031744b\nmov     rcx, rdi                                                       ; +0x16e, 0x14031744e\ncall    qword ptr [rbx+110h]                                           ; +0x171, 0x140317451\nmov     rax, [r12]                                                     ; +0x177, 0x140317457\nmov     rcx, r12                                                       ; +0x17b, 0x14031745b\ncall    qword ptr [rax+130h]                                           ; +0x17e, 0x14031745e\nmovss   xmm1, dword ptr [rax]                                          ; +0x184, 0x140317464\nmulss   xmm1, xmm6                                                     ; +0x188, 0x140317468\nmulss   xmm1, cs:dword_140622BA4                                       ; +0x18c, 0x14031746c\naddss   xmm1, cs:dword_140623068                                       ; +0x194, 0x140317474\nxorps   xmm2, xmm2                                                     ; +0x19c, 0x14031747c\nlea     rcx, [rsp+98h+var_70]                                          ; +0x19f, 0x14031747f\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1a4, 0x140317484\nmov     r8, rax                                                        ; +0x1aa, 0x14031748a\nlea     rdx, [rsp+98h+var_78]                                          ; +0x1ad, 0x14031748d\nmov     rcx, rbp                                                       ; +0x1b2, 0x140317492\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x1b5, 0x140317495\nmov     rax, [rdi]                                                     ; +0x1bb, 0x14031749b\nlea     rdx, [rsp+98h+var_78]                                          ; +0x1be, 0x14031749e\nmov     rcx, rdi                                                       ; +0x1c3, 0x1403174a3\ncall    qword ptr [rax+0B8h]                                           ; +0x1c6, 0x1403174a6\nmov     rax, [rdi]                                                     ; +0x1cc, 0x1403174ac\nmov     rcx, rdi                                                       ; +0x1cf, 0x1403174af\ncall    qword ptr [rax+130h]                                           ; +0x1d2, 0x1403174b2\nmovss   xmm0, dword ptr [rax]                                          ; +0x1d8, 0x1403174b8\nmovss   xmm6, cs:dword_14062326C                                       ; +0x1dc, 0x1403174bc\ncomiss  xmm0, xmm6                                                     ; +0x1e4, 0x1403174c4\njbe     short loc_1403174E5                                            ; +0x1e7, 0x1403174c7\nmov     rbx, [rdi]                                                     ; +0x1e9, 0x1403174c9\nmov     rcx, rdi                                                       ; +0x1ec, 0x1403174cc\ncall    qword ptr [rbx+130h]                                           ; +0x1ef, 0x1403174cf\ndivss   xmm6, dword ptr [rax]                                          ; +0x1f5, 0x1403174d5\nmovaps  xmm1, xmm6                                                     ; +0x1f9, 0x1403174d9\nmov     rcx, rdi                                                       ; +0x1fc, 0x1403174dc\ncall    qword ptr [rbx+0A0h]                                           ; +0x1ff, 0x1403174df\nmov     rax, [rdi]                                                     ; +0x205, 0x1403174e5\nmov     rcx, rdi                                                       ; +0x208, 0x1403174e8\ncall    qword ptr [rax+0A8h]                                           ; +0x20b, 0x1403174eb\nminss   xmm0, cs:dword_140622ABC                                       ; +0x211, 0x1403174f1\nmov     rax, [rdi]                                                     ; +0x219, 0x1403174f9\nmovaps  xmm1, xmm0                                                     ; +0x21c, 0x1403174fc\nmov     rcx, rdi                                                       ; +0x21f, 0x1403174ff\ncall    qword ptr [rax+0A0h]                                           ; +0x222, 0x140317502\nnop                                                                    ; +0x228, 0x140317508\nmov     rcx, r14                                                       ; +0x229, 0x140317509\ncall    sub_14003A830                                                  ; +0x22c, 0x14031750c\nmov     rax, r15                                                       ; +0x231, 0x140317511\nmov     rcx, [rsp+98h+var_60]                                          ; +0x234, 0x140317514\nxor     rcx, rsp; StackCookie                                          ; +0x239, 0x140317519\ncall    __security_check_cookie                                        ; +0x23c, 0x14031751c\nmovaps  xmm6, [rsp+98h+var_58]                                         ; +0x241, 0x140317521\nadd     rsp, 58h                                                       ; +0x246, 0x140317526\npop     r15                                                            ; +0x24a, 0x14031752a\npop     r14                                                            ; +0x24c, 0x14031752c\npop     r13                                                            ; +0x24e, 0x14031752e\npop     r12                                                            ; +0x250, 0x140317530\npop     rdi                                                            ; +0x252, 0x140317532\npop     rsi                                                            ; +0x253, 0x140317533\npop     rbp                                                            ; +0x254, 0x140317534\npop     rbx                                                            ; +0x255, 0x140317535\nretn                                                                   ; +0x256, 0x140317536", "xrefs": ["MoreSearchLayer::init @ 0x1403130f5", "MoreSearchLayer::init @ 0x140313255", "MoreSearchLayer::init @ 0x140313399", "MoreSearchLayer::init @ 0x1403134eb", "MoreSearchLayer::init @ 0x14031362e", "MoreSearchLayer::init @ 0x140313788", "MoreSearchLayer::init @ 0x1403138e0", "MoreSearchLayer::init @ 0x140313a26", "MoreSearchLayer::init @ 0x140313b67", "MoreSearchLayer::init @ 0x140313cc8", "MoreSearchLayer::init @ 0x140313e11", "<???> @ 0x1406d49a0"], "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"}