{"type": "func", "start": 5373392048, "end": 5373392675, "name": "SetupTriggerPopup::createCustomButton", "pseudocode": "// \n// SetupTriggerPopup::createCustomButton from 0x1404774b0 to 0x140477723 (627 bytes)\n// \n// 5 xrefs:\n// > SetupKeyframePopup::init @ 0x1404260c8\n// > SetupKeyframePopup::init @ 0x140426163\n// > SetupKeyframePopup::init @ 0x1404261f4\n// > SetupKeyframePopup::init @ 0x140426298\n// > <???> @ 0x1406db720\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=2\nvoid __fastcall SetupTriggerPopup::createCustomButton(\n        SetupTriggerPopup *a1,\n        int a2,\n        const char *a3,\n        __int64 a4,\n        __int64 a5)\n{\n  float v5; // xmm0_4\n  __int64 v10; // rcx\n  struct cocos2d::CCObject *v11; // rax\n  cocos2d::CCArray *v12; // rbp\n  const char *v13; // rcx\n  struct cocos2d::CCSprite *v14; // r12\n  CCMenuItemSpriteExtra *v15; // rdi\n  CCMenuItemSpriteExtra_vtbl *v16; // rbx\n  struct cocos2d::CCPoint v17; // rax\n  double v18; // xmm0_8\n  const char *v19; // rcx\n  struct cocos2d::CCLabelBMFont *v20; // rdi\n  cocos2d::CCLabelBMFont_vtbl *v21; // rbx\n  double v22; // xmm0_8\n  const cocos2d::CCPoint *v23; // rax\n  struct cocos2d::CCPoint v24; // [rsp+20h] [rbp-88h] BYREF\n  cocos2d::CCPoint v25[4]; // [rsp+28h] [rbp-80h] BYREF\n\n  v25[2] = (cocos2d::CCPoint)a3;\n  v25[3] = (cocos2d::CCPoint)a4;\n  while ( !cocos2d::CCArray::count(a1->m_pageContainers) )\n  {\n    v11 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v10);\n    cocos2d::CCArray::addObject(a1->m_pageContainers, v11);\n  }\n  v12 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, 0);\n  SetupTriggerPopup::getGroupContainer(a1, 0);\n  if ( !*(_QWORD *)(a4 + 16) )\n    sub_14003CCE0((void **)a4, \"GJ_plus2Btn_001.png\", 0x13u);\n  v13 = (const char *)a4;\n  if ( *(_QWORD *)(a4 + 24) > 0xFu )\n    v13 = *(const char **)a4;\n  v14 = cocos2d::CCSprite::createWithSpriteFrameName(v13);\n  ((void (__fastcall *)(struct cocos2d::CCSprite *))v14->setScale_0)(v14);\n  v15 = CCMenuItemSpriteExtra::create(v14, nullptr, a1, (cocos2d::SEL_MenuHandler *)sub_1401377B4);\n  v15->setTag(v15, a2);\n  a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v15);\n  v16 = v15->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v17 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v24);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v16->setPosition_0)(v15, v17);\n  cocos2d::CCArray::addObject(v12, v15);\n  cocos2d::CCPoint::CCPoint(v5, 0.0);\n  v18 = cocos2d::CCPoint::CCPoint(v25);\n  v19 = a3;\n  if ( *((_QWORD *)a3 + 3) > 0xFu )\n    v19 = *(const char **)a3;\n  v20 = cocos2d::CCLabelBMFont::create(v19, \"goldFont.fnt\");\n  a1->m_mainLayer->addChild_1(a1->m_mainLayer, v20);\n  cocos2d::CCArray::addObject(v12, v20);\n  v21 = v20->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v22 = cocos2d::CCPoint::CCPoint(*(float *)&v18, 0.5);\n  v21->setAnchorPoint(v20, v23);\n  v14->getContentSize(v14);\n  cocos2d::CCPoint::CCPoint(*(float *)&v22, v25[0].x);\n  cocos2d::CCPoint::operator+(a5, &v24);\n  v20->setPosition_0(v20, &v24);\n  ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v20->setScale_0)(v20);\n  sub_14003A830((__int64)a3);\n  sub_14003A830(a4);\n}", "assembly": "; \n; SetupTriggerPopup::createCustomButton from 0x1404774b0 to 0x140477723 (627 bytes)\n; \n; 5 xrefs:\n; > SetupKeyframePopup::init @ 0x1404260c8\n; > SetupKeyframePopup::init @ 0x140426163\n; > SetupKeyframePopup::init @ 0x1404261f4\n; > SetupKeyframePopup::init @ 0x140426298\n; > <???> @ 0x1406db720\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, 0x1404774b0\npush    rbp                                                            ; +0x2, 0x1404774b2\npush    rsi                                                            ; +0x3, 0x1404774b3\npush    rdi                                                            ; +0x4, 0x1404774b4\npush    r12                                                            ; +0x5, 0x1404774b5\npush    r13                                                            ; +0x7, 0x1404774b7\npush    r14                                                            ; +0x9, 0x1404774b9\npush    r15                                                            ; +0xb, 0x1404774bb\nsub     rsp, 68h                                                       ; +0xd, 0x1404774bd\nmovaps  [rsp+0A8h+var_58], xmm7                                        ; +0x11, 0x1404774c1\nmov     rax, cs:__security_cookie                                      ; +0x16, 0x1404774c6\nxor     rax, rsp                                                       ; +0x1d, 0x1404774cd\nmov     [rsp+0A8h+var_60], rax                                         ; +0x20, 0x1404774d0\nmov     r14, r9                                                        ; +0x25, 0x1404774d5\nmov     r15, r8                                                        ; +0x28, 0x1404774d8\nmov     ebx, edx                                                       ; +0x2b, 0x1404774db\nmov     rsi, rcx                                                       ; +0x2d, 0x1404774dd\nmov     [rsp+0A8h+var_70], r8                                          ; +0x30, 0x1404774e0\nmov     [rsp+0A8h+var_68], r9                                          ; +0x35, 0x1404774e5\nmov     r13, [rsp+0A8h+arg_20]                                         ; +0x3a, 0x1404774ea\nmovss   xmm7, [rsp+0A8h+arg_28]                                        ; +0x42, 0x1404774f2\nmov     rcx, [rcx+350h]                                                ; +0x4b, 0x1404774fb\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x52, 0x140477502\ntest    eax, eax                                                       ; +0x58, 0x140477508\njnz     short loc_140477537                                            ; +0x5a, 0x14047750a\nnop     dword ptr [rax+00h]                                            ; +0x5c, 0x14047750c\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x60, 0x140477510\nmov     rdx, rax                                                       ; +0x66, 0x140477516\nmov     rcx, [rsi+350h]                                                ; +0x69, 0x140477519\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x70, 0x140477520\nmov     rcx, [rsi+350h]                                                ; +0x76, 0x140477526\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7d, 0x14047752d\ntest    eax, eax                                                       ; +0x83, 0x140477533\njz      short loc_140477510                                            ; +0x85, 0x140477535\nxor     edx, edx                                                       ; +0x87, 0x140477537\nmov     rcx, [rsi+350h]                                                ; +0x89, 0x140477539\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x90, 0x140477540\nmov     rbp, rax                                                       ; +0x96, 0x140477546\nxor     edx, edx                                                       ; +0x99, 0x140477549\nmov     rcx, rsi                                                       ; +0x9b, 0x14047754b\ncall    SetupTriggerPopup__getGroupContainer                           ; +0x9e, 0x14047754e\ncmp     qword ptr [r14+10h], 0                                         ; +0xa3, 0x140477553\njnz     short loc_14047756F                                            ; +0xa8, 0x140477558\nmov     r8d, 13h; Size                                                 ; +0xaa, 0x14047755a\nlea     rdx, aGjPlus2btn001P; \"GJ_plus2Btn_001.png\"                    ; +0xb0, 0x140477560\nmov     rcx, r14; void *                                               ; +0xb7, 0x140477567\ncall    sub_14003CCE0                                                  ; +0xba, 0x14047756a\nmov     rcx, r14                                                       ; +0xbf, 0x14047756f\ncmp     qword ptr [r14+18h], 0Fh                                       ; +0xc2, 0x140477572\njbe     short loc_14047757C                                            ; +0xc7, 0x140477577\nmov     rcx, [r14]                                                     ; +0xc9, 0x140477579\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xcc, 0x14047757c\nmov     r12, rax                                                       ; +0xd2, 0x140477582\nmov     r8, [rax]                                                      ; +0xd5, 0x140477585\nmovaps  xmm1, xmm7                                                     ; +0xd8, 0x140477588\nmov     rcx, rax                                                       ; +0xdb, 0x14047758b\ncall    qword ptr [r8+0A0h]                                            ; +0xde, 0x14047758e\nlea     r9, sub_1401377B4                                              ; +0xe5, 0x140477595\nmov     r8, rsi                                                        ; +0xec, 0x14047759c\nxor     edx, edx                                                       ; +0xef, 0x14047759f\nmov     rcx, r12                                                       ; +0xf1, 0x1404775a1\ncall    CCMenuItemSpriteExtra__create                                  ; +0xf4, 0x1404775a4\nmov     rdi, rax                                                       ; +0xf9, 0x1404775a9\nmov     r8, [rax]                                                      ; +0xfc, 0x1404775ac\nmov     edx, ebx                                                       ; +0xff, 0x1404775af\nmov     rcx, rax                                                       ; +0x101, 0x1404775b1\ncall    qword ptr [r8+40h]                                             ; +0x104, 0x1404775b4\nmov     rcx, [rsi+220h]                                                ; +0x108, 0x1404775b8\nmov     r8, [rcx]                                                      ; +0x10f, 0x1404775bf\nmov     rdx, rdi                                                       ; +0x112, 0x1404775c2\ncall    qword ptr [r8+1C0h]                                            ; +0x115, 0x1404775c5\nmov     rbx, [rdi]                                                     ; +0x11c, 0x1404775cc\nmov     r8, r13                                                        ; +0x11f, 0x1404775cf\nlea     rdx, [rsp+0A8h+var_88]                                         ; +0x122, 0x1404775d2\nmov     rcx, [rsi+220h]                                                ; +0x127, 0x1404775d7\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x12e, 0x1404775de\nmov     rdx, rax                                                       ; +0x134, 0x1404775e4\nmov     rcx, rdi                                                       ; +0x137, 0x1404775e7\ncall    qword ptr [rbx+0B8h]                                           ; +0x13a, 0x1404775ea\nmov     rdx, rdi                                                       ; +0x140, 0x1404775f0\nmov     rcx, rbp                                                       ; +0x143, 0x1404775f3\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x146, 0x1404775f6\nmovss   xmm2, cs:dword_140622FF0                                       ; +0x14c, 0x1404775fc\nxorps   xmm1, xmm1                                                     ; +0x154, 0x140477604\nlea     rcx, [rsp+0A8h+var_88]                                         ; +0x157, 0x140477607\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x15c, 0x14047760c\nmov     rdx, rax                                                       ; +0x162, 0x140477612\nlea     rcx, [rsp+0A8h+var_80]                                         ; +0x165, 0x140477615\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x16a, 0x14047761a\nmov     rcx, r15                                                       ; +0x170, 0x140477620\ncmp     qword ptr [r15+18h], 0Fh                                       ; +0x173, 0x140477623\njbe     short loc_14047762D                                            ; +0x178, 0x140477628\nmov     rcx, [r15]                                                     ; +0x17a, 0x14047762a\nlea     rdx, aGoldfontFnt; \"goldFont.fnt\"                              ; +0x17d, 0x14047762d\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x184, 0x140477634\nmov     rdi, rax                                                       ; +0x18a, 0x14047763a\nmov     rcx, [rsi+240h]                                                ; +0x18d, 0x14047763d\nmov     r8, [rcx]                                                      ; +0x194, 0x140477644\nmov     rdx, rax                                                       ; +0x197, 0x140477647\ncall    qword ptr [r8+1C0h]                                            ; +0x19a, 0x14047764a\nmov     rdx, rdi                                                       ; +0x1a1, 0x140477651\nmov     rcx, rbp                                                       ; +0x1a4, 0x140477654\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1a7, 0x140477657\nmov     rbx, [rdi]                                                     ; +0x1ad, 0x14047765d\nxorps   xmm2, xmm2                                                     ; +0x1b0, 0x140477660\nmovss   xmm1, cs:dword_140622B08                                       ; +0x1b3, 0x140477663\nlea     rcx, [rsp+0A8h+var_88]                                         ; +0x1bb, 0x14047766b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1c0, 0x140477670\nmov     rdx, rax                                                       ; +0x1c6, 0x140477676\nmov     rcx, rdi                                                       ; +0x1c9, 0x140477679\ncall    qword ptr [rbx+110h]                                           ; +0x1cc, 0x14047767c\nmov     rax, [r12]                                                     ; +0x1d2, 0x140477682\nmov     rcx, r12                                                       ; +0x1d6, 0x140477686\ncall    qword ptr [rax+130h]                                           ; +0x1d9, 0x140477689\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x1df, 0x14047768f\nmulss   xmm2, cs:dword_140622B08                                       ; +0x1e4, 0x140477694\nmulss   xmm2, xmm7                                                     ; +0x1ec, 0x14047769c\naddss   xmm2, [rsp+0A8h+var_7C]                                        ; +0x1f0, 0x1404776a0\nmovss   xmm1, [rsp+0A8h+var_80]                                        ; +0x1f6, 0x1404776a6\nlea     rcx, [rsp+0A8h+var_78]                                         ; +0x1fc, 0x1404776ac\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x201, 0x1404776b1\nmov     r8, rax                                                        ; +0x207, 0x1404776b7\nlea     rdx, [rsp+0A8h+var_88]                                         ; +0x20a, 0x1404776ba\nmov     rcx, r13                                                       ; +0x20f, 0x1404776bf\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x212, 0x1404776c2\nmov     rax, [rdi]                                                     ; +0x218, 0x1404776c8\nlea     rdx, [rsp+0A8h+var_88]                                         ; +0x21b, 0x1404776cb\nmov     rcx, rdi                                                       ; +0x220, 0x1404776d0\ncall    qword ptr [rax+0B8h]                                           ; +0x223, 0x1404776d3\nmov     rax, [rdi]                                                     ; +0x229, 0x1404776d9\nmovss   xmm1, [rsp+0A8h+arg_30]                                        ; +0x22c, 0x1404776dc\nmov     rcx, rdi                                                       ; +0x235, 0x1404776e5\ncall    qword ptr [rax+0A0h]                                           ; +0x238, 0x1404776e8\nnop                                                                    ; +0x23e, 0x1404776ee\nmov     rcx, r15                                                       ; +0x23f, 0x1404776ef\ncall    sub_14003A830                                                  ; +0x242, 0x1404776f2\nnop                                                                    ; +0x247, 0x1404776f7\nmov     rcx, r14                                                       ; +0x248, 0x1404776f8\ncall    sub_14003A830                                                  ; +0x24b, 0x1404776fb\nmov     rcx, [rsp+0A8h+var_60]                                         ; +0x250, 0x140477700\nxor     rcx, rsp; StackCookie                                          ; +0x255, 0x140477705\ncall    __security_check_cookie                                        ; +0x258, 0x140477708\nmovaps  xmm7, [rsp+0A8h+var_58]                                        ; +0x25d, 0x14047770d\nadd     rsp, 68h                                                       ; +0x262, 0x140477712\npop     r15                                                            ; +0x266, 0x140477716\npop     r14                                                            ; +0x268, 0x140477718\npop     r13                                                            ; +0x26a, 0x14047771a\npop     r12                                                            ; +0x26c, 0x14047771c\npop     rdi                                                            ; +0x26e, 0x14047771e\npop     rsi                                                            ; +0x26f, 0x14047771f\npop     rbp                                                            ; +0x270, 0x140477720\npop     rbx                                                            ; +0x271, 0x140477721\nretn                                                                   ; +0x272, 0x140477722", "xrefs": ["SetupKeyframePopup::init @ 0x1404260c8", "SetupKeyframePopup::init @ 0x140426163", "SetupKeyframePopup::init @ 0x1404261f4", "SetupKeyframePopup::init @ 0x140426298", "<???> @ 0x1406db720"], "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"}