{"type": "func", "start": 5369074752, "end": 5369075136, "name": "CCTextInputNode::openEditMenu", "pseudocode": "// \n// CCTextInputNode::openEditMenu from 0x140059440 to 0x1400595c0 (384 bytes)\n// \n// 4 xrefs:\n// > CCTextInputNode::holdTimerFired @ 0x140059083\n// > CCTextInputNode::showHoldMenu @ 0x14005913a\n// > CCTextInputNode::rightClick @ 0x14005932b\n// > <???> @ 0x140910544\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:25:41 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nstruct cocos2d::CCObject *__fastcall CCTextInputNode::openEditMenu(_QWORD *a1, const struct cocos2d::CCPoint *a2)\n{\n  const struct cocos2d::CCPoint *v2; // rdi\n  cocos2d::CCObject *v4; // rbx\n  __int64 *v5; // r14\n  const struct cocos2d::CCPoint *v6; // rax\n  const struct cocos2d::CCPoint *v7; // rbx\n  _QWORD *v8; // rdi\n  float *v9; // rax\n  struct cocos2d::CCObject *result; // rax\n  __int64 v11; // rbx\n  int v12; // eax\n  char v13; // [rsp+40h] [rbp+8h] BYREF\n  _QWORD *v14; // [rsp+50h] [rbp+18h] BYREF\n\n  v2 = a2;\n  v4 = (cocos2d::CCObject *)a1[87];\n  if ( v4 )\n  {\n    a1[87] = 0;\n    LOBYTE(a2) = 1;\n    (*(void (__fastcall **)(cocos2d::CCObject *, const struct cocos2d::CCPoint *))(*(_QWORD *)v4 + 520LL))(v4, a2);\n    cocos2d::CCObject::release(v4);\n  }\n  v5 = *(__int64 **)(cocos2d::CCDirector::sharedDirector() + 272);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, v2);\n  v7 = v6;\n  v8 = operator new(0x1B0u);\n  v14 = v8;\n  memset(v8, 0, 0x1B0u);\n  cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v8);\n  *v8 = &CCTextInputMenu::`vftable';\n  v8[40] = &CCTextInputMenu::`vftable';\n  v8[41] = &CCTextInputMenu::`vftable';\n  v8[42] = &CCTextInputMenu::`vftable';\n  v8[43] = &CCTextInputMenu::`vftable';\n  v8[44] = &CCTextInputMenu::`vftable';\n  v8[51] = 0;\n  cocos2d::CCRect::CCRect((cocos2d::CCRect *)(v8 + 52));\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, v7);\n  if ( !CCTextInputMenu::init((cocos2d::CCLayer *)v8, a1, v9) )\n    return (struct cocos2d::CCObject *)(*(__int64 (__fastcall **)(_QWORD *, __int64))(*v8 + 8LL))(v8, 1);\n  result = cocos2d::CCObject::autorelease((cocos2d::CCObject *)v8);\n  if ( v8 )\n  {\n    if ( v5 )\n    {\n      a1[87] = v8;\n      cocos2d::CCObject::retain((cocos2d::CCObject *)v8);\n      v11 = *v5;\n      v12 = GameToolbox::highestChildZ(v5);\n      return (struct cocos2d::CCObject *)(*(__int64 (__fastcall **)(__int64 *, _QWORD, _QWORD))(v11 + 456))(\n                                           v5,\n                                           a1[87],\n                                           (unsigned int)(v12 + 1));\n    }\n  }\n  return result;\n}", "assembly": "; \n; CCTextInputNode::openEditMenu from 0x140059440 to 0x1400595c0 (384 bytes)\n; \n; 4 xrefs:\n; > CCTextInputNode::holdTimerFired @ 0x140059083\n; > CCTextInputNode::showHoldMenu @ 0x14005913a\n; > CCTextInputNode::rightClick @ 0x14005932b\n; > <???> @ 0x140910544\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:25:41 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140059440\npush    rsi                                                            ; +0x5, 0x140059445\npush    rdi                                                            ; +0x6, 0x140059446\npush    r14                                                            ; +0x7, 0x140059447\nsub     rsp, 20h                                                       ; +0x9, 0x140059449\nmov     rdi, rdx                                                       ; +0xd, 0x14005944d\nmov     rsi, rcx                                                       ; +0x10, 0x140059450\nmov     rbx, [rcx+2B8h]                                                ; +0x13, 0x140059453\ntest    rbx, rbx                                                       ; +0x1a, 0x14005945a\njz      short loc_140059481                                            ; +0x1d, 0x14005945d\nmov     qword ptr [rcx+2B8h], 0                                        ; +0x1f, 0x14005945f\nmov     rax, [rbx]                                                     ; +0x2a, 0x14005946a\nmov     dl, 1                                                          ; +0x2d, 0x14005946d\nmov     rcx, rbx                                                       ; +0x2f, 0x14005946f\ncall    qword ptr [rax+208h]                                           ; +0x32, 0x140059472\nmov     rcx, rbx                                                       ; +0x38, 0x140059478\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x3b, 0x14005947b\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x41, 0x140059481\nmov     r14, [rax+110h]                                                ; +0x47, 0x140059487\nmov     rdx, rdi                                                       ; +0x4e, 0x14005948e\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x51, 0x140059491\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x56, 0x140059496\nmov     rbx, rax                                                       ; +0x5c, 0x14005949c\nmov     ecx, 1B0h; Size                                                ; +0x5f, 0x14005949f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x64, 0x1400594a4\nmov     rdi, rax                                                       ; +0x69, 0x1400594a9\nmov     [rsp+38h+arg_10], rax                                          ; +0x6c, 0x1400594ac\nxor     edx, edx; Val                                                  ; +0x71, 0x1400594b1\nmov     r8d, 1B0h; Size                                                ; +0x73, 0x1400594b3\nmov     rcx, rax; void *                                               ; +0x79, 0x1400594b9\ncall    memset                                                         ; +0x7c, 0x1400594bc\nmov     rcx, rdi                                                       ; +0x81, 0x1400594c1\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x84, 0x1400594c4\nnop                                                                    ; +0x8a, 0x1400594ca\nlea     rax, ??_7CCTextInputMenu@@6B@; const CCTextInputMenu::`vftable' ; +0x8b, 0x1400594cb\nmov     [rdi], rax                                                     ; +0x92, 0x1400594d2\nlea     rax, ??_7CCTextInputMenu@@6B@_0; const CCTextInputMenu::`vftable' ; +0x95, 0x1400594d5\nmov     [rdi+140h], rax                                                ; +0x9c, 0x1400594dc\nlea     rax, ??_7CCTextInputMenu@@6B@_1; const CCTextInputMenu::`vftable' ; +0xa3, 0x1400594e3\nmov     [rdi+148h], rax                                                ; +0xaa, 0x1400594ea\nlea     rax, ??_7CCTextInputMenu@@6B@_2; const CCTextInputMenu::`vftable' ; +0xb1, 0x1400594f1\nmov     [rdi+150h], rax                                                ; +0xb8, 0x1400594f8\nlea     rax, ??_7CCTextInputMenu@@6B@_3; const CCTextInputMenu::`vftable' ; +0xbf, 0x1400594ff\nmov     [rdi+158h], rax                                                ; +0xc6, 0x140059506\nlea     rax, ??_7CCTextInputMenu@@6B@_4; const CCTextInputMenu::`vftable' ; +0xcd, 0x14005950d\nmov     [rdi+160h], rax                                                ; +0xd4, 0x140059514\nmov     qword ptr [rdi+198h], 0                                        ; +0xdb, 0x14005951b\nlea     rcx, [rdi+1A0h]                                                ; +0xe6, 0x140059526\ncall    cs:??0CCRect@cocos2d@@QEAA@XZ; cocos2d::CCRect::CCRect(void)   ; +0xed, 0x14005952d\nnop                                                                    ; +0xf3, 0x140059533\nmov     rdx, rbx                                                       ; +0xf4, 0x140059534\nlea     rcx, [rsp+38h+arg_10]                                          ; +0xf7, 0x140059537\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xfc, 0x14005953c\nmov     r8, rax                                                        ; +0x102, 0x140059542\nmov     rdx, rsi                                                       ; +0x105, 0x140059545\nmov     rcx, rdi                                                       ; +0x108, 0x140059548\ncall    CCTextInputMenu__init                                          ; +0x10b, 0x14005954b\nmov     rcx, rdi                                                       ; +0x110, 0x140059550\ntest    al, al                                                         ; +0x113, 0x140059553\njz      short loc_1400595A7                                            ; +0x115, 0x140059555\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x117, 0x140059557\ntest    rdi, rdi                                                       ; +0x11d, 0x14005955d\njz      short loc_1400595B2                                            ; +0x120, 0x140059560\ntest    r14, r14                                                       ; +0x122, 0x140059562\njz      short loc_1400595B2                                            ; +0x125, 0x140059565\nmov     [rsi+2B8h], rdi                                                ; +0x127, 0x140059567\nmov     rcx, rdi                                                       ; +0x12e, 0x14005956e\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x131, 0x140059571\nmov     rbx, [r14]                                                     ; +0x137, 0x140059577\nmov     rcx, r14                                                       ; +0x13a, 0x14005957a\ncall    GameToolbox__highestChildZ                                     ; +0x13d, 0x14005957d\nlea     r8d, [rax+1]                                                   ; +0x142, 0x140059582\nmov     rdx, [rsi+2B8h]                                                ; +0x146, 0x140059586\nmov     rcx, r14                                                       ; +0x14d, 0x14005958d\nmov     rax, [rbx+1C8h]                                                ; +0x150, 0x140059590\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x157, 0x140059597\nadd     rsp, 20h                                                       ; +0x15c, 0x14005959c\npop     r14                                                            ; +0x160, 0x1400595a0\npop     rdi                                                            ; +0x162, 0x1400595a2\npop     rsi                                                            ; +0x163, 0x1400595a3\njmp     rax                                                            ; +0x164, 0x1400595a4\nmov     rax, [rdi]                                                     ; +0x167, 0x1400595a7\nmov     edx, 1                                                         ; +0x16a, 0x1400595aa\ncall    qword ptr [rax+8]                                              ; +0x16f, 0x1400595af\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x172, 0x1400595b2\nadd     rsp, 20h                                                       ; +0x177, 0x1400595b7\npop     r14                                                            ; +0x17b, 0x1400595bb\npop     rdi                                                            ; +0x17d, 0x1400595bd\npop     rsi                                                            ; +0x17e, 0x1400595be\nretn                                                                   ; +0x17f, 0x1400595bf", "xrefs": ["CCTextInputNode::holdTimerFired @ 0x140059083", "CCTextInputNode::showHoldMenu @ 0x14005913a", "CCTextInputNode::rightClick @ 0x14005932b", "<???> @ 0x140910544"], "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"}