{"type": "func", "start": 5373378592, "end": 5373379275, "name": "SetupTriggerPopup::createPageButtons", "pseudocode": "// \n// SetupTriggerPopup::createPageButtons from 0x140474020 to 0x1404742cb (683 bytes)\n// \n// 16 xrefs:\n// > SetupRotateCommandPopup::init @ 0x1402a8ea5\n// > SetupAdvFollowPopup::init @ 0x140405543\n// > SetupAreaMoveTriggerPopup::init @ 0x14040c294\n// > SetupAreaTransformTriggerPopup::init @ 0x14040e940\n// > SetupAreaRotateTriggerPopup::init @ 0x14040f0a4\n// > SetupAreaFadeTriggerPopup::init @ 0x14040f7f2\n// > SetupAreaTintTriggerPopup::init @ 0x14041027e\n// > SetupAreaTriggerPopup::init @ 0x140410e17\n// > SetupKeyframeAnimPopup::init @ 0x1404251bd\n// > SetupOptionsTriggerPopup::init @ 0x14043668b\n// > SetupSFXPopup::init @ 0x140448447\n// > SetupSFXEditPopup::init @ 0x14044a0fe\n// > SetupSongTriggerPopup::init @ 0x14045d4ea\n// > SetupSpawnPopup::init @ 0x14045edde\n// > SelectEventLayer::init @ 0x14046750b\n// > <???> @ 0x1406db408\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\nvoid SetupTriggerPopup::createPageButtons(SetupTriggerPopup *a1, float a2, int a3)\n{\n  cocos2d::CCString *v4; // rax\n  char *CString; // rax\n  size_t v6; // r8\n  __int64 v7; // rcx\n  cocos2d::CCDirector *v8; // rax\n  void **v9; // rcx\n  struct cocos2d::CCSprite *v10; // rbx\n  CCMenuItemSpriteExtra *v11; // rax\n  float v12; // xmm0_4\n  void **v13; // rcx\n  cocos2d::CCSprite *v14; // rbx\n  CCMenuItemSpriteExtra *v15; // rax\n  float v16; // xmm0_4\n  void *v17; // rcx\n  _BYTE v18[8]; // [rsp+20h] [rbp-60h] BYREF\n  float v19; // [rsp+28h] [rbp-58h]\n  struct cocos2d::CCPoint v20; // [rsp+30h] [rbp-50h] BYREF\n  void *Block[2]; // [rsp+40h] [rbp-40h] BYREF\n  __int64 v22; // [rsp+50h] [rbp-30h]\n  unsigned __int64 v23; // [rsp+58h] [rbp-28h]\n\n  *(_OWORD *)Block = 0;\n  v22 = 0;\n  v23 = 15;\n  LOBYTE(Block[0]) = 0;\n  v4 = cocos2d::CCString::createWithFormat(\"GJ_arrow_0%i_001.png\", 1);\n  CString = (char *)cocos2d::CCString::getCString(v4);\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003CCE0(Block, CString, v6);\n  v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);\n  cocos2d::CCDirector::getWinSize(v8);\n  cocos2d::CCPoint::CCPoint(0.0, v19 * 0.5);\n  cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v20);\n  v9 = Block;\n  if ( v23 > 0xF )\n    v9 = (void **)Block[0];\n  v10 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v9);\n  ((void (__fastcall *)(struct cocos2d::CCSprite *))v10->setScale_0)(v10);\n  v11 = CCMenuItemSpriteExtra::create(v10, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onPage);\n  a1->m_prevButton = v11;\n  a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v11);\n  v12 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_prevButton->setTag)(\n          a1->m_prevButton,\n          0xFFFFFFFFLL);\n  cocos2d::CCPoint::CCPoint(v12, -a2);\n  cocos2d::CCPoint::operator+(&v20, v18);\n  a1->m_prevButton->setPosition_0(a1->m_prevButton, (const cocos2d::CCPoint *)v18);\n  HIDWORD(a1->m_prevButton->m_pfnSelector.adj) = 0x40000000;\n  v13 = Block;\n  if ( v23 > 0xF )\n    v13 = (void **)Block[0];\n  v14 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v13);\n  cocos2d::CCSprite::setFlipX(v14, 1);\n  ((void (__fastcall *)(cocos2d::CCSprite *))v14->setScale_0)(v14);\n  v15 = CCMenuItemSpriteExtra::create(v14, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onPage);\n  a1->m_nextButton = v15;\n  a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v15);\n  v16 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_nextButton->setTag)(a1->m_nextButton, 1);\n  cocos2d::CCPoint::CCPoint(v16, a2);\n  cocos2d::CCPoint::operator+(&v20, v18);\n  a1->m_nextButton->setPosition_0(a1->m_nextButton, (const cocos2d::CCPoint *)v18);\n  HIDWORD(a1->m_nextButton->m_pfnSelector.adj) = 0x40000000;\n  if ( v23 > 0xF )\n  {\n    v17 = Block[0];\n    if ( v23 + 1 >= 0x1000 )\n    {\n      v17 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v17 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v17);\n  }\n}", "assembly": "; \n; SetupTriggerPopup::createPageButtons from 0x140474020 to 0x1404742cb (683 bytes)\n; \n; 16 xrefs:\n; > SetupRotateCommandPopup::init @ 0x1402a8ea5\n; > SetupAdvFollowPopup::init @ 0x140405543\n; > SetupAreaMoveTriggerPopup::init @ 0x14040c294\n; > SetupAreaTransformTriggerPopup::init @ 0x14040e940\n; > SetupAreaRotateTriggerPopup::init @ 0x14040f0a4\n; > SetupAreaFadeTriggerPopup::init @ 0x14040f7f2\n; > SetupAreaTintTriggerPopup::init @ 0x14041027e\n; > SetupAreaTriggerPopup::init @ 0x140410e17\n; > SetupKeyframeAnimPopup::init @ 0x1404251bd\n; > SetupOptionsTriggerPopup::init @ 0x14043668b\n; > SetupSFXPopup::init @ 0x140448447\n; > SetupSFXEditPopup::init @ 0x14044a0fe\n; > SetupSongTriggerPopup::init @ 0x14045d4ea\n; > SetupSpawnPopup::init @ 0x14045edde\n; > SelectEventLayer::init @ 0x14046750b\n; > <???> @ 0x1406db408\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\nmov     [rsp-8+arg_10], rbx                                            ; +0x0, 0x140474020\nmov     [rsp-8+arg_18], rdi                                            ; +0x5, 0x140474025\npush    rbp                                                            ; +0xa, 0x14047402a\nmov     rbp, rsp                                                       ; +0xb, 0x14047402b\nsub     rsp, 80h                                                       ; +0xe, 0x14047402e\nmovaps  [rsp+80h+var_10], xmm7                                         ; +0x15, 0x140474035\nmov     rax, cs:__security_cookie                                      ; +0x1a, 0x14047403a\nxor     rax, rsp                                                       ; +0x21, 0x140474041\nmov     [rbp+var_20], rax                                              ; +0x24, 0x140474044\nmovaps  xmm7, xmm1                                                     ; +0x28, 0x140474048\nmov     rdi, rcx                                                       ; +0x2b, 0x14047404b\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x14047404e\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0x31, 0x140474051\nmov     [rbp+var_30], 0                                                ; +0x35, 0x140474055\nmov     [rbp+var_28], 0Fh                                              ; +0x3d, 0x14047405d\nmov     byte ptr [rbp+Block], 0                                        ; +0x45, 0x140474065\nmov     edx, 1                                                         ; +0x49, 0x140474069\nlea     rcx, aGjArrow0I001Pn; \"GJ_arrow_0%i_001.png\"                   ; +0x4e, 0x14047406e\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x55, 0x140474075\nmov     rcx, rax                                                       ; +0x5b, 0x14047407b\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5e, 0x14047407e\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x64, 0x140474084\nnop     dword ptr [rax+rax+00h]                                        ; +0x6b, 0x14047408b\ninc     r8; Size                                                       ; +0x70, 0x140474090\ncmp     byte ptr [rax+r8], 0                                           ; +0x73, 0x140474093\njnz     short loc_140474090                                            ; +0x78, 0x140474098\nmov     rdx, rax; Src                                                  ; +0x7a, 0x14047409a\nlea     rcx, [rbp+Block]; void *                                       ; +0x7d, 0x14047409d\ncall    sub_14003CCE0                                                  ; +0x81, 0x1404740a1\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x86, 0x1404740a6\nmov     rcx, rax                                                       ; +0x8c, 0x1404740ac\nlea     rdx, [rbp+var_58]                                              ; +0x8f, 0x1404740af\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x93, 0x1404740b3\nmovss   xmm2, [rbp+var_54]                                             ; +0x99, 0x1404740b9\nmulss   xmm2, cs:dword_140622B08                                       ; +0x9e, 0x1404740be\nmovss   xmm1, [rbp+var_58]                                             ; +0xa6, 0x1404740c6\nmulss   xmm1, cs:dword_140622B08                                       ; +0xab, 0x1404740cb\nlea     rcx, [rbp+var_60]                                              ; +0xb3, 0x1404740d3\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xb7, 0x1404740d7\nmov     r8, rax                                                        ; +0xbd, 0x1404740dd\nlea     rdx, [rbp+var_50]                                              ; +0xc0, 0x1404740e0\nmov     rcx, [rdi+220h]                                                ; +0xc4, 0x1404740e4\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xcb, 0x1404740eb\nlea     rcx, [rbp+Block]                                               ; +0xd1, 0x1404740f1\ncmp     [rbp+var_28], 0Fh                                              ; +0xd5, 0x1404740f5\ncmova   rcx, [rbp+Block]                                               ; +0xda, 0x1404740fa\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xdf, 0x1404740ff\nmov     rbx, rax                                                       ; +0xe5, 0x140474105\nmov     rdx, [rax]                                                     ; +0xe8, 0x140474108\nmovss   xmm1, cs:dword_140622B74                                       ; +0xeb, 0x14047410b\nmov     rcx, rax                                                       ; +0xf3, 0x140474113\ncall    qword ptr [rdx+0A0h]                                           ; +0xf6, 0x140474116\nlea     r9, SetupTriggerPopup__onPage                                  ; +0xfc, 0x14047411c\nmov     r8, rdi                                                        ; +0x103, 0x140474123\nxor     edx, edx                                                       ; +0x106, 0x140474126\nmov     rcx, rbx                                                       ; +0x108, 0x140474128\ncall    CCMenuItemSpriteExtra__create                                  ; +0x10b, 0x14047412b\nmov     [rdi+390h], rax                                                ; +0x110, 0x140474130\nmov     rcx, [rdi+220h]                                                ; +0x117, 0x140474137\nmov     r8, [rcx]                                                      ; +0x11e, 0x14047413e\nmov     rdx, rax                                                       ; +0x121, 0x140474141\ncall    qword ptr [r8+1C0h]                                            ; +0x124, 0x140474144\nmov     rcx, [rdi+390h]                                                ; +0x12b, 0x14047414b\nmov     rax, [rcx]                                                     ; +0x132, 0x140474152\nmov     edx, 0FFFFFFFFh                                                ; +0x135, 0x140474155\ncall    qword ptr [rax+40h]                                            ; +0x13a, 0x14047415a\nmovaps  xmm1, xmm7                                                     ; +0x13d, 0x14047415d\nxorps   xmm1, cs:xmmword_1406243F0                                     ; +0x140, 0x140474160\nxorps   xmm2, xmm2                                                     ; +0x147, 0x140474167\nlea     rcx, [rbp+var_48]                                              ; +0x14a, 0x14047416a\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x14e, 0x14047416e\nmov     r8, rax                                                        ; +0x154, 0x140474174\nlea     rdx, [rbp+var_60]                                              ; +0x157, 0x140474177\nlea     rcx, [rbp+var_50]                                              ; +0x15b, 0x14047417b\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x15f, 0x14047417f\nmov     rcx, [rdi+390h]                                                ; +0x165, 0x140474185\nmov     rax, [rcx]                                                     ; +0x16c, 0x14047418c\nlea     rdx, [rbp+var_60]                                              ; +0x16f, 0x14047418f\ncall    qword ptr [rax+0B8h]                                           ; +0x173, 0x140474193\nmov     rax, [rdi+390h]                                                ; +0x179, 0x140474199\nmov     dword ptr [rax+174h], 40000000h                                ; +0x180, 0x1404741a0\nlea     rcx, [rbp+Block]                                               ; +0x18a, 0x1404741aa\ncmp     [rbp+var_28], 0Fh                                              ; +0x18e, 0x1404741ae\ncmova   rcx, [rbp+Block]                                               ; +0x193, 0x1404741b3\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x198, 0x1404741b8\nmov     rbx, rax                                                       ; +0x19e, 0x1404741be\nmov     dl, 1                                                          ; +0x1a1, 0x1404741c1\nmov     rcx, rax                                                       ; +0x1a3, 0x1404741c3\ncall    cs:?setFlipX@CCSprite@cocos2d@@QEAAX_N@Z; cocos2d::CCSprite::setFlipX(bool) ; +0x1a6, 0x1404741c6\nmov     rdx, [rbx]                                                     ; +0x1ac, 0x1404741cc\nmovss   xmm1, cs:dword_140622B74                                       ; +0x1af, 0x1404741cf\nmov     rcx, rbx                                                       ; +0x1b7, 0x1404741d7\ncall    qword ptr [rdx+0A0h]                                           ; +0x1ba, 0x1404741da\nlea     r9, SetupTriggerPopup__onPage                                  ; +0x1c0, 0x1404741e0\nmov     r8, rdi                                                        ; +0x1c7, 0x1404741e7\nxor     edx, edx                                                       ; +0x1ca, 0x1404741ea\nmov     rcx, rbx                                                       ; +0x1cc, 0x1404741ec\ncall    CCMenuItemSpriteExtra__create                                  ; +0x1cf, 0x1404741ef\nmov     [rdi+398h], rax                                                ; +0x1d4, 0x1404741f4\nmov     rcx, [rdi+220h]                                                ; +0x1db, 0x1404741fb\nmov     r8, [rcx]                                                      ; +0x1e2, 0x140474202\nmov     rdx, rax                                                       ; +0x1e5, 0x140474205\ncall    qword ptr [r8+1C0h]                                            ; +0x1e8, 0x140474208\nmov     rcx, [rdi+398h]                                                ; +0x1ef, 0x14047420f\nmov     rax, [rcx]                                                     ; +0x1f6, 0x140474216\nmov     edx, 1                                                         ; +0x1f9, 0x140474219\ncall    qword ptr [rax+40h]                                            ; +0x1fe, 0x14047421e\nxorps   xmm2, xmm2                                                     ; +0x201, 0x140474221\nmovaps  xmm1, xmm7                                                     ; +0x204, 0x140474224\nlea     rcx, [rbp+var_48]                                              ; +0x207, 0x140474227\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x20b, 0x14047422b\nmov     r8, rax                                                        ; +0x211, 0x140474231\nlea     rdx, [rbp+var_60]                                              ; +0x214, 0x140474234\nlea     rcx, [rbp+var_50]                                              ; +0x218, 0x140474238\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x21c, 0x14047423c\nmov     rcx, [rdi+398h]                                                ; +0x222, 0x140474242\nmov     rax, [rcx]                                                     ; +0x229, 0x140474249\nlea     rdx, [rbp+var_60]                                              ; +0x22c, 0x14047424c\ncall    qword ptr [rax+0B8h]                                           ; +0x230, 0x140474250\nmov     rax, [rdi+398h]                                                ; +0x236, 0x140474256\nmov     dword ptr [rax+174h], 40000000h                                ; +0x23d, 0x14047425d\nmov     rdx, [rbp+var_28]                                              ; +0x247, 0x140474267\ncmp     rdx, 0Fh                                                       ; +0x24b, 0x14047426b\njbe     short loc_1404742A5                                            ; +0x24f, 0x14047426f\ninc     rdx                                                            ; +0x251, 0x140474271\nmov     rcx, [rbp+Block]; Block                                        ; +0x254, 0x140474274\nmov     rax, rcx                                                       ; +0x258, 0x140474278\ncmp     rdx, 1000h                                                     ; +0x25b, 0x14047427b\njb      short loc_1404742A0                                            ; +0x262, 0x140474282\nadd     rdx, 27h ; '''                                                 ; +0x264, 0x140474284\nmov     rcx, [rcx-8]                                                   ; +0x268, 0x140474288\nsub     rax, rcx                                                       ; +0x26c, 0x14047428c\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x26f, 0x14047428f\ncmp     rax, 1Fh                                                       ; +0x273, 0x140474293\njbe     short loc_1404742A0                                            ; +0x277, 0x140474297\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x279, 0x140474299\nalign 20h                                                              ; +0x27f, 0x14047429f\ncall    j_j_free                                                       ; +0x280, 0x1404742a0\nmov     rcx, [rbp+var_20]                                              ; +0x285, 0x1404742a5\nxor     rcx, rsp; StackCookie                                          ; +0x289, 0x1404742a9\ncall    __security_check_cookie                                        ; +0x28c, 0x1404742ac\nlea     r11, [rsp+80h+var_s0]                                          ; +0x291, 0x1404742b1\nmov     rbx, [r11+20h]                                                 ; +0x299, 0x1404742b9\nmov     rdi, [r11+28h]                                                 ; +0x29d, 0x1404742bd\nmovaps  xmm7, [rsp+80h+var_10]                                         ; +0x2a1, 0x1404742c1\nmov     rsp, r11                                                       ; +0x2a6, 0x1404742c6\npop     rbp                                                            ; +0x2a9, 0x1404742c9\nretn                                                                   ; +0x2aa, 0x1404742ca", "xrefs": ["SetupRotateCommandPopup::init @ 0x1402a8ea5", "SetupAdvFollowPopup::init @ 0x140405543", "SetupAreaMoveTriggerPopup::init @ 0x14040c294", "SetupAreaTransformTriggerPopup::init @ 0x14040e940", "SetupAreaRotateTriggerPopup::init @ 0x14040f0a4", "SetupAreaFadeTriggerPopup::init @ 0x14040f7f2", "SetupAreaTintTriggerPopup::init @ 0x14041027e", "SetupAreaTriggerPopup::init @ 0x140410e17", "SetupKeyframeAnimPopup::init @ 0x1404251bd", "SetupOptionsTriggerPopup::init @ 0x14043668b", "SetupSFXPopup::init @ 0x140448447", "SetupSFXEditPopup::init @ 0x14044a0fe", "SetupSongTriggerPopup::init @ 0x14045d4ea", "SetupSpawnPopup::init @ 0x14045edde", "SelectEventLayer::init @ 0x14046750b", "<???> @ 0x1406db408"], "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"}