{"type": "func", "start": 5373322432, "end": 5373322964, "name": "SetupEventLinkPopup::onSelectEvent", "pseudocode": "// \n// SetupEventLinkPopup::onSelectEvent from 0x1404664c0 to 0x1404666d4 (532 bytes)\n// \n// 2 xrefs:\n// > SetupEventLinkPopup::init @ 0x1404663e6\n// > <???> @ 0x1406db0a8\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=4\nvoid SetupEventLinkPopup::onSelectEvent(SetupEventLinkPopup *a1, cocos2d::CCObject *a2)\n{\n  _QWORD *v3; // rax\n  EffectGameObject *m_gameObject; // rdx\n  unsigned int *p_m_uID; // rdx\n  char *v6; // rdi\n  _QWORD *v7; // rax\n  _QWORD *v8; // rax\n  __int64 (__fastcall *v9)(__int64); // rdx\n  std::set<int> v10[2]; // [rsp+20h] [rbp-28h] BYREF\n\n  v10[0]._Mypair._Myval2._Myval2._Mysize = 0;\n  v3 = operator new(0x20u);\n  *v3 = v3;\n  v3[1] = v3;\n  v3[2] = v3;\n  *((_WORD *)v3 + 12) = 257;\n  v10[0]._Mypair._Myval2._Myval2._Myhead = (std::_Tree_val<std::_Tree_simple_types<int>>::_Nodeptr)v3;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    p_m_uID = (unsigned int *)&m_gameObject[1];\n  }\n  else\n  {\n    if ( !cocos2d::CCArray::count(a1->m_gameObjects) )\n      goto LABEL_6;\n    p_m_uID = &cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, 0)[33].m_uID;\n  }\n  sub_140473880(v10, p_m_uID);\nLABEL_6:\n  v6 = (char *)operator new(0x3E0u);\n  SetupTriggerPopup::SetupTriggerPopup((SetupTriggerPopup *)v6);\n  *(_QWORD *)v6 = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 40) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 41) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 42) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 43) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 44) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 51) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 54) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 79) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 80) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 81) = &SelectEventLayer::`vftable';\n  *((_QWORD *)v6 + 117) = 0;\n  v6[944] = 0;\n  *(_QWORD *)(v6 + 948) = 0;\n  *((_DWORD *)v6 + 239) = 0;\n  *((_QWORD *)v6 + 120) = 0;\n  *((_QWORD *)v6 + 121) = 0;\n  v7 = operator new(0x48u);\n  *v7 = v7;\n  v7[1] = v7;\n  v7[2] = v7;\n  *((_WORD *)v7 + 12) = 257;\n  *((_QWORD *)v6 + 120) = v7;\n  *((_QWORD *)v6 + 122) = 0;\n  *((_QWORD *)v6 + 123) = 0;\n  v8 = operator new(0x20u);\n  *v8 = v8;\n  v8[1] = v8;\n  v8[2] = v8;\n  *((_WORD *)v8 + 12) = 257;\n  *((_QWORD *)v6 + 122) = v8;\n  if ( SelectEventLayer::init((SelectEventLayer *)v6, a1, v10) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v6);\n  }\n  else\n  {\n    (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v6 + 8LL))(v6, 1);\n    v6 = nullptr;\n  }\n  v9 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1040LL);\n  if ( v9 == CollisionBlockPopup::show )\n    CollisionBlockPopup::show((__int64)v6);\n  else\n    v9((__int64)v6);\n  sub_1400CDB90((void **)&v10[0]._Mypair._Myval2._Myval2._Myhead);\n}", "assembly": "; \n; SetupEventLinkPopup::onSelectEvent from 0x1404664c0 to 0x1404666d4 (532 bytes)\n; \n; 2 xrefs:\n; > SetupEventLinkPopup::init @ 0x1404663e6\n; > <???> @ 0x1406db0a8\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+arg_0], rbx                                               ; +0x0, 0x1404664c0\npush    rbp                                                            ; +0x5, 0x1404664c5\npush    rsi                                                            ; +0x6, 0x1404664c6\npush    rdi                                                            ; +0x7, 0x1404664c7\nsub     rsp, 30h                                                       ; +0x8, 0x1404664c8\nmov     rsi, rcx                                                       ; +0xc, 0x1404664cc\nxor     ebp, ebp                                                       ; +0xf, 0x1404664cf\nmov     [rsp+48h+var_28], rbp                                          ; +0x11, 0x1404664d1\nmov     [rsp+48h+var_20], rbp                                          ; +0x16, 0x1404664d6\nlea     ecx, [rbp+20h]; Size                                           ; +0x1b, 0x1404664db\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x1404664de\nmov     [rax], rax                                                     ; +0x23, 0x1404664e3\nmov     [rax+8], rax                                                   ; +0x26, 0x1404664e6\nmov     [rax+10h], rax                                                 ; +0x2a, 0x1404664ea\nmov     word ptr [rax+18h], 101h                                       ; +0x2e, 0x1404664ee\nmov     [rsp+48h+var_28], rax                                          ; +0x34, 0x1404664f4\nmov     rdx, [rsi+290h]                                                ; +0x39, 0x1404664f9\ntest    rdx, rdx                                                       ; +0x40, 0x140466500\njz      short loc_14046650E                                            ; +0x43, 0x140466503\nadd     rdx, 740h                                                      ; +0x45, 0x140466505\njmp     short loc_140466535                                            ; +0x4c, 0x14046650c\nmov     rcx, [rsi+298h]                                                ; +0x4e, 0x14046650e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x55, 0x140466515\ntest    eax, eax                                                       ; +0x5b, 0x14046651b\njz      short loc_14046653F                                            ; +0x5d, 0x14046651d\nxor     edx, edx                                                       ; +0x5f, 0x14046651f\nmov     rcx, [rsi+298h]                                                ; +0x61, 0x140466521\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x68, 0x140466528\nlea     rdx, [rax+740h]                                                ; +0x6e, 0x14046652e\nlea     rcx, [rsp+48h+var_28]                                          ; +0x75, 0x140466535\ncall    sub_140473880                                                  ; +0x7a, 0x14046653a\nmov     ecx, 3E0h; Size                                                ; +0x7f, 0x14046653f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x84, 0x140466544\nmov     rdi, rax                                                       ; +0x89, 0x140466549\nmov     [rsp+48h+arg_10], rax                                          ; +0x8c, 0x14046654c\nmov     rcx, rax                                                       ; +0x91, 0x140466551\ncall    SetupTriggerPopup__SetupTriggerPopup                           ; +0x94, 0x140466554\nnop                                                                    ; +0x99, 0x140466559\nlea     rax, ??_7SelectEventLayer@@6B@; const SelectEventLayer::`vftable' ; +0x9a, 0x14046655a\nmov     [rdi], rax                                                     ; +0xa1, 0x140466561\nlea     rax, ??_7SelectEventLayer@@6B@_0; const SelectEventLayer::`vftable' ; +0xa4, 0x140466564\nmov     [rdi+140h], rax                                                ; +0xab, 0x14046656b\nlea     rax, ??_7SelectEventLayer@@6B@_1; const SelectEventLayer::`vftable' ; +0xb2, 0x140466572\nmov     [rdi+148h], rax                                                ; +0xb9, 0x140466579\nlea     rax, ??_7SelectEventLayer@@6B@_2; const SelectEventLayer::`vftable' ; +0xc0, 0x140466580\nmov     [rdi+150h], rax                                                ; +0xc7, 0x140466587\nlea     rax, ??_7SelectEventLayer@@6B@_3; const SelectEventLayer::`vftable' ; +0xce, 0x14046658e\nmov     [rdi+158h], rax                                                ; +0xd5, 0x140466595\nlea     rax, ??_7SelectEventLayer@@6B@_4; const SelectEventLayer::`vftable' ; +0xdc, 0x14046659c\nmov     [rdi+160h], rax                                                ; +0xe3, 0x1404665a3\nlea     rax, ??_7SelectEventLayer@@6B@_5; const SelectEventLayer::`vftable' ; +0xea, 0x1404665aa\nmov     [rdi+198h], rax                                                ; +0xf1, 0x1404665b1\nlea     rax, ??_7SelectEventLayer@@6B@_6; const SelectEventLayer::`vftable' ; +0xf8, 0x1404665b8\nmov     [rdi+1B0h], rax                                                ; +0xff, 0x1404665bf\nlea     rax, ??_7SelectEventLayer@@6B@_7; const SelectEventLayer::`vftable' ; +0x106, 0x1404665c6\nmov     [rdi+278h], rax                                                ; +0x10d, 0x1404665cd\nlea     rax, ??_7SelectEventLayer@@6B@_8; const SelectEventLayer::`vftable' ; +0x114, 0x1404665d4\nmov     [rdi+280h], rax                                                ; +0x11b, 0x1404665db\nlea     rax, ??_7SelectEventLayer@@6B@_9; const SelectEventLayer::`vftable' ; +0x122, 0x1404665e2\nmov     [rdi+288h], rax                                                ; +0x129, 0x1404665e9\nmov     [rdi+3A8h], rbp                                                ; +0x130, 0x1404665f0\nmov     byte ptr [rdi+3B0h], 0                                         ; +0x137, 0x1404665f7\nmov     [rdi+3B4h], rbp                                                ; +0x13e, 0x1404665fe\nmov     [rdi+3BCh], ebp                                                ; +0x145, 0x140466605\nlea     rbx, [rdi+3C0h]                                                ; +0x14b, 0x14046660b\nmov     [rsp+48h+arg_18], rbx                                          ; +0x152, 0x140466612\nmov     [rbx], rbp                                                     ; +0x157, 0x140466617\nmov     [rbx+8], rbp                                                   ; +0x15a, 0x14046661a\nmov     ecx, 48h ; 'H'; Size                                           ; +0x15e, 0x14046661e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x163, 0x140466623\nmov     [rax], rax                                                     ; +0x168, 0x140466628\nmov     [rax+8], rax                                                   ; +0x16b, 0x14046662b\nmov     [rax+10h], rax                                                 ; +0x16f, 0x14046662f\nmov     word ptr [rax+18h], 101h                                       ; +0x173, 0x140466633\nmov     [rbx], rax                                                     ; +0x179, 0x140466639\nlea     rbx, [rdi+3D0h]                                                ; +0x17c, 0x14046663c\nmov     [rsp+48h+arg_18], rbx                                          ; +0x183, 0x140466643\nmov     [rbx], rbp                                                     ; +0x188, 0x140466648\nmov     [rbx+8], rbp                                                   ; +0x18b, 0x14046664b\nmov     ecx, 20h ; ' '; Size                                           ; +0x18f, 0x14046664f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x194, 0x140466654\nmov     [rax], rax                                                     ; +0x199, 0x140466659\nmov     [rax+8], rax                                                   ; +0x19c, 0x14046665c\nmov     [rax+10h], rax                                                 ; +0x1a0, 0x140466660\nmov     word ptr [rax+18h], 101h                                       ; +0x1a4, 0x140466664\nmov     [rbx], rax                                                     ; +0x1aa, 0x14046666a\nlea     r8, [rsp+48h+var_28]                                           ; +0x1ad, 0x14046666d\nmov     rdx, rsi                                                       ; +0x1b2, 0x140466672\nmov     rcx, rdi                                                       ; +0x1b5, 0x140466675\ncall    SelectEventLayer__init                                         ; +0x1b8, 0x140466678\nmov     rcx, rdi                                                       ; +0x1bd, 0x14046667d\ntest    al, al                                                         ; +0x1c0, 0x140466680\njz      short loc_14046668C                                            ; +0x1c2, 0x140466682\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x1c4, 0x140466684\njmp     short loc_14046669A                                            ; +0x1ca, 0x14046668a\nmov     rax, [rdi]                                                     ; +0x1cc, 0x14046668c\nmov     edx, 1                                                         ; +0x1cf, 0x14046668f\ncall    qword ptr [rax+8]                                              ; +0x1d4, 0x140466694\nmov     rdi, rbp                                                       ; +0x1d7, 0x140466697\nmov     rax, [rdi]                                                     ; +0x1da, 0x14046669a\nmov     rdx, [rax+410h]                                                ; +0x1dd, 0x14046669d\nlea     rax, CollisionBlockPopup__show; Merged with: CollisionBlockPopup::show, ColorSelectLiveOverlay::show, SetupTriggerPopup::show, HSVLiveOverlay::show, SetTextPopup::show, SetupObjectOptionsPopup::show, SetupSmartBlockLayer::show ; +0x1e4, 0x1404666a4\nmov     rcx, rdi                                                       ; +0x1eb, 0x1404666ab\ncmp     rdx, rax                                                       ; +0x1ee, 0x1404666ae\njnz     short loc_1404666BA                                            ; +0x1f1, 0x1404666b1\ncall    CollisionBlockPopup__show; Merged with: CollisionBlockPopup::show, ColorSelectLiveOverlay::show, SetupTriggerPopup::show, HSVLiveOverlay::show, SetTextPopup::show, SetupObjectOptionsPopup::show, SetupSmartBlockLayer::show ; +0x1f3, 0x1404666b3\njmp     short loc_1404666BD                                            ; +0x1f8, 0x1404666b8\ncall    rdx                                                            ; +0x1fa, 0x1404666ba\nnop                                                                    ; +0x1fc, 0x1404666bc\nlea     rcx, [rsp+48h+var_28]                                          ; +0x1fd, 0x1404666bd\ncall    sub_1400CDB90                                                  ; +0x202, 0x1404666c2\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x207, 0x1404666c7\nadd     rsp, 30h                                                       ; +0x20c, 0x1404666cc\npop     rdi                                                            ; +0x210, 0x1404666d0\npop     rsi                                                            ; +0x211, 0x1404666d1\npop     rbp                                                            ; +0x212, 0x1404666d2\nretn                                                                   ; +0x213, 0x1404666d3", "xrefs": ["SetupEventLinkPopup::init @ 0x1404663e6", "<???> @ 0x1406db0a8"], "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"}