{"type": "func", "start": 5370271648, "end": 5370271914, "name": "EditorCommandsPopup::addCommandButton", "pseudocode": "// \n// EditorCommandsPopup::addCommandButton from 0x14017d7a0 to 0x14017d8aa (266 bytes)\n// \n// 20 xrefs:\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d606\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d61b\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d630\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d645\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d65a\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d66f\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d684\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d699\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6ae\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6c3\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6d8\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6ed\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d702\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d717\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d72c\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d741\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d756\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d76b\n// > EditorCommandsPopup::onBuildWindowContent @ 0x14017d780\n// > <???> @ 0x140918854\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:27:35 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall EditorCommandsPopup::addCommandButton(__int64 a1, __int64 a2, unsigned int a3)\n{\n  cocos2d::CCObject *v6; // rbx\n  cocos2d::CCObject *v7; // rbx\n  void *v9; // [rsp+60h] [rbp+8h]\n\n  v9 = operator new(0x2C8u);\n  v6 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v9);\n  if ( v6 )\n  {\n    if ( ButtonSprite::init_1(\n           (__int64)v6,\n           a2,\n           260,\n           0,\n           1061997773,\n           1,\n           &qword_140704F78,\n           (__int64)\"GJ_button_04.png\",\n           1107296256) )\n    {\n      cocos2d::CCObject::autorelease(v6);\n    }\n    else\n    {\n      (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 8LL))(v6, 1);\n      v6 = nullptr;\n    }\n  }\n  (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v6 + 160LL))(v6);\n  v7 = CCMenuItemSpriteExtra::create((int)v6, 0, a1, (__int64)EditorCommandsPopup::onCommand);\n  (*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v7 + 64LL))(v7, a3);\n  return (*(__int64 (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 1032) + 464LL))(\n           *(_QWORD *)(a1 + 1032),\n           v7);\n}", "assembly": "; \n; EditorCommandsPopup::addCommandButton from 0x14017d7a0 to 0x14017d8aa (266 bytes)\n; \n; 20 xrefs:\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d606\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d61b\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d630\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d645\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d65a\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d66f\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d684\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d699\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6ae\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6c3\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6d8\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d6ed\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d702\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d717\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d72c\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d741\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d756\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d76b\n; > EditorCommandsPopup::onBuildWindowContent @ 0x14017d780\n; > <???> @ 0x140918854\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:27:35 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14017d7a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14017d7a5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14017d7aa\npush    rdi                                                            ; +0xf, 0x14017d7af\nsub     rsp, 50h                                                       ; +0x10, 0x14017d7b0\nmov     ebp, r8d                                                       ; +0x14, 0x14017d7b4\nmov     rdi, rdx                                                       ; +0x17, 0x14017d7b7\nmov     rsi, rcx                                                       ; +0x1a, 0x14017d7ba\nmov     ecx, 2C8h; Size                                                ; +0x1d, 0x14017d7bd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x22, 0x14017d7c2\nmov     [rsp+58h+arg_0], rax                                           ; +0x27, 0x14017d7c7\nmov     rcx, rax                                                       ; +0x2c, 0x14017d7cc\ncall    ButtonSprite__ButtonSprite                                     ; +0x2f, 0x14017d7cf\nmov     rbx, rax                                                       ; +0x34, 0x14017d7d4\ntest    rax, rax                                                       ; +0x37, 0x14017d7d7\njz      short loc_14017D845                                            ; +0x3a, 0x14017d7da\nmovss   xmm0, cs:dword_140835640                                       ; +0x3c, 0x14017d7dc\nmovss   [rsp+58h+var_18], xmm0                                         ; +0x44, 0x14017d7e4\nlea     rax, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x4a, 0x14017d7ea\nmov     [rsp+58h+var_20], rax                                          ; +0x51, 0x14017d7f1\nlea     rax, qword_140704F78                                           ; +0x56, 0x14017d7f6\nmov     [rsp+58h+var_28], rax                                          ; +0x5d, 0x14017d7fd\nmov     [rsp+58h+var_30], 1                                            ; +0x62, 0x14017d802\nmovss   xmm0, cs:dword_140834FE8                                       ; +0x67, 0x14017d807\nmovss   [rsp+58h+var_38], xmm0                                         ; +0x6f, 0x14017d80f\nxor     r9d, r9d                                                       ; +0x75, 0x14017d815\nmov     r8d, 104h                                                      ; +0x78, 0x14017d818\nmov     rdx, rdi                                                       ; +0x7e, 0x14017d81e\nmov     rcx, rbx                                                       ; +0x81, 0x14017d821\ncall    ButtonSprite__init_1                                           ; +0x84, 0x14017d824\nmov     rcx, rbx                                                       ; +0x89, 0x14017d829\ntest    al, al                                                         ; +0x8c, 0x14017d82c\njz      short loc_14017D838                                            ; +0x8e, 0x14017d82e\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x90, 0x14017d830\njmp     short loc_14017D845                                            ; +0x96, 0x14017d836\nmov     rax, [rbx]                                                     ; +0x98, 0x14017d838\nmov     edx, 1                                                         ; +0x9b, 0x14017d83b\ncall    qword ptr [rax+8]                                              ; +0xa0, 0x14017d840\nxor     ebx, ebx                                                       ; +0xa3, 0x14017d843\nmov     rax, [rbx]                                                     ; +0xa5, 0x14017d845\nmovss   xmm1, cs:dword_140834F20                                       ; +0xa8, 0x14017d848\nmov     rcx, rbx                                                       ; +0xb0, 0x14017d850\ncall    qword ptr [rax+0A0h]                                           ; +0xb3, 0x14017d853\nlea     r9, EditorCommandsPopup__onCommand                             ; +0xb9, 0x14017d859\nmov     r8, rsi                                                        ; +0xc0, 0x14017d860\nxor     edx, edx                                                       ; +0xc3, 0x14017d863\nmov     rcx, rbx                                                       ; +0xc5, 0x14017d865\ncall    CCMenuItemSpriteExtra__create                                  ; +0xc8, 0x14017d868\nmov     rbx, rax                                                       ; +0xcd, 0x14017d86d\nmov     rcx, [rax]                                                     ; +0xd0, 0x14017d870\nmov     r8, [rcx+40h]                                                  ; +0xd3, 0x14017d873\nmov     edx, ebp                                                       ; +0xd7, 0x14017d877\nmov     rcx, rax                                                       ; +0xd9, 0x14017d879\ncall    r8                                                             ; +0xdc, 0x14017d87c\nmov     rcx, [rsi+408h]                                                ; +0xdf, 0x14017d87f\nmov     rdx, [rcx]                                                     ; +0xe6, 0x14017d886\nmov     r8, [rdx+1D0h]                                                 ; +0xe9, 0x14017d889\nmov     rdx, rbx                                                       ; +0xf0, 0x14017d890\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xf3, 0x14017d893\nmov     rbp, [rsp+58h+arg_10]                                          ; +0xf8, 0x14017d898\nmov     rsi, [rsp+58h+arg_18]                                          ; +0xfd, 0x14017d89d\nadd     rsp, 50h                                                       ; +0x102, 0x14017d8a2\npop     rdi                                                            ; +0x106, 0x14017d8a6\njmp     r8                                                             ; +0x107, 0x14017d8a7", "xrefs": ["EditorCommandsPopup::onBuildWindowContent @ 0x14017d606", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d61b", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d630", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d645", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d65a", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d66f", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d684", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d699", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d6ae", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d6c3", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d6d8", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d6ed", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d702", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d717", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d72c", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d741", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d756", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d76b", "EditorCommandsPopup::onBuildWindowContent @ 0x14017d780", "<???> @ 0x140918854"], "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"}