{"type": "func", "start": 5369926832, "end": 5369927045, "name": "CreateMenuItem::create", "pseudocode": "// \n// CreateMenuItem::create from 0x1401294b0 to 0x140129585 (213 bytes)\n// \n// 7 xrefs:\n// > EditorUI::createCustomItems @ 0x1400e49d5\n// > EditorUI::createCustomItems @ 0x1400e4a87\n// > EditorUI::createCustomItems @ 0x1400e4b38\n// > EditorUI::createCustomItems @ 0x1400e4bea\n// > EditorUI::menuItemFromObjectString @ 0x14010e90e\n// > EditorUI::getCreateBtn @ 0x14010ed6a\n// > <???> @ 0x1406c9a20\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\nCreateMenuItem *CreateMenuItem::create(\n        cocos2d::CCNode *a1,\n        cocos2d::CCNode *a2,\n        cocos2d::CCObject *a3,\n        cocos2d::SEL_MenuHandler *a4)\n{\n  char *v7; // r14\n\n  v7 = (char *)operator new(0x238u);\n  CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)v7);\n  *(_QWORD *)v7 = &CreateMenuItem::`vftable';\n  *((_QWORD *)v7 + 40) = &CreateMenuItem::`vftable';\n  *(_OWORD *)(v7 + 520) = 0;\n  *((_QWORD *)v7 + 67) = 0;\n  *((_QWORD *)v7 + 68) = 15;\n  v7[520] = 0;\n  *(_QWORD *)(v7 + 556) = 0;\n  if ( CCMenuItemSpriteExtra::init((CCMenuItemSpriteExtra *)v7, a1, nullptr, a3, a4) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v7);\n    return (CreateMenuItem *)v7;\n  }\n  else\n  {\n    (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v7 + 8LL))(v7, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; CreateMenuItem::create from 0x1401294b0 to 0x140129585 (213 bytes)\n; \n; 7 xrefs:\n; > EditorUI::createCustomItems @ 0x1400e49d5\n; > EditorUI::createCustomItems @ 0x1400e4a87\n; > EditorUI::createCustomItems @ 0x1400e4b38\n; > EditorUI::createCustomItems @ 0x1400e4bea\n; > EditorUI::menuItemFromObjectString @ 0x14010e90e\n; > EditorUI::getCreateBtn @ 0x14010ed6a\n; > <???> @ 0x1406c9a20\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, 0x1401294b0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1401294b5\nmov     [rsp+arg_18], rdi                                              ; +0xa, 0x1401294ba\nmov     [rsp+arg_8], rdx                                               ; +0xf, 0x1401294bf\npush    r14                                                            ; +0x14, 0x1401294c4\nsub     rsp, 30h                                                       ; +0x16, 0x1401294c6\nmov     rbx, r9                                                        ; +0x1a, 0x1401294ca\nmov     rdi, r8                                                        ; +0x1d, 0x1401294cd\nmov     rsi, rcx                                                       ; +0x20, 0x1401294d0\nmov     ecx, 238h; Size                                                ; +0x23, 0x1401294d3\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x28, 0x1401294d8\nmov     r14, rax                                                       ; +0x2d, 0x1401294dd\nmov     [rsp+38h+arg_8], rax                                           ; +0x30, 0x1401294e0\nmov     rcx, rax                                                       ; +0x35, 0x1401294e5\ncall    CCMenuItemSpriteExtra__CCMenuItemSpriteExtra                   ; +0x38, 0x1401294e8\nlea     rax, ??_7CreateMenuItem@@6B@; const CreateMenuItem::`vftable'  ; +0x3d, 0x1401294ed\nmov     [r14], rax                                                     ; +0x44, 0x1401294f4\nlea     rax, ??_7CreateMenuItem@@6B@_0; const CreateMenuItem::`vftable' ; +0x47, 0x1401294f7\nmov     [r14+140h], rax                                                ; +0x4e, 0x1401294fe\nxorps   xmm0, xmm0                                                     ; +0x55, 0x140129505\nmovups  xmmword ptr [r14+208h], xmm0                                   ; +0x58, 0x140129508\nmov     qword ptr [r14+218h], 0                                        ; +0x60, 0x140129510\nmov     qword ptr [r14+220h], 0Fh                                      ; +0x6b, 0x14012951b\nmov     byte ptr [r14+208h], 0                                         ; +0x76, 0x140129526\nmov     qword ptr [r14+22Ch], 0                                        ; +0x7e, 0x14012952e\nmov     [rsp+38h+var_18], rbx                                          ; +0x89, 0x140129539\nmov     r9, rdi                                                        ; +0x8e, 0x14012953e\nxor     r8d, r8d                                                       ; +0x91, 0x140129541\nmov     rdx, rsi                                                       ; +0x94, 0x140129544\nmov     rcx, r14                                                       ; +0x97, 0x140129547\ncall    CCMenuItemSpriteExtra__init                                    ; +0x9a, 0x14012954a\nmov     rcx, r14                                                       ; +0x9f, 0x14012954f\ntest    al, al                                                         ; +0xa2, 0x140129552\njz      short loc_140129561                                            ; +0xa4, 0x140129554\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0xa6, 0x140129556\nmov     rax, r14                                                       ; +0xac, 0x14012955c\njmp     short loc_14012956F                                            ; +0xaf, 0x14012955f\nmov     r8, [r14]                                                      ; +0xb1, 0x140129561\nmov     edx, 1                                                         ; +0xb4, 0x140129564\ncall    qword ptr [r8+8]                                               ; +0xb9, 0x140129569\nxor     eax, eax                                                       ; +0xbd, 0x14012956d\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xbf, 0x14012956f\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xc4, 0x140129574\nmov     rdi, [rsp+38h+arg_18]                                          ; +0xc9, 0x140129579\nadd     rsp, 30h                                                       ; +0xce, 0x14012957e\npop     r14                                                            ; +0xd2, 0x140129582\nretn                                                                   ; +0xd4, 0x140129584", "xrefs": ["EditorUI::createCustomItems @ 0x1400e49d5", "EditorUI::createCustomItems @ 0x1400e4a87", "EditorUI::createCustomItems @ 0x1400e4b38", "EditorUI::createCustomItems @ 0x1400e4bea", "EditorUI::menuItemFromObjectString @ 0x14010e90e", "EditorUI::getCreateBtn @ 0x14010ed6a", "<???> @ 0x1406c9a20"], "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"}