{"type": "func", "start": 6442821744, "end": 6442821914, "name": "cocos2d::CCMenuItemImage::create", "pseudocode": "// \n// cocos2d::CCMenuItemImage::create from 0x18005a870 to 0x18005a91a (170 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2cdc\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\nstruct cocos2d::CCMenuItemImage *__fastcall cocos2d::CCMenuItemImage::create()\n{\n  cocos2d::CCMenuItemSprite *v0; // rax\n  cocos2d::CCMenuItemImage *v1; // rbx\n  bool (__stdcall *init)(cocos2d::CCMenuItemImage *__hidden); // rdx\n  char v3; // al\n  cocos2d::CCNodeRGBA *(__fastcall *v5)(cocos2d::CCNodeRGBA *, char); // r8\n\n  v0 = (cocos2d::CCMenuItemSprite *)operator new(0x190u);\n  v1 = (cocos2d::CCMenuItemImage *)v0;\n  if ( v0 )\n  {\n    cocos2d::CCMenuItemSprite::CCMenuItemSprite(v0);\n    v1->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCMenuItemImage_vtbl *)&cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCNode'};\n    v1->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCRGBAProtocol'};\n  }\n  else\n  {\n    v1 = nullptr;\n  }\n  if ( v1 )\n  {\n    init = v1->init;\n    if ( (char *)init == (char *)cocos2d::CCMenuItemImage::init )\n      v3 = cocos2d::CCMenuItemImage::init(v1);\n    else\n      v3 = ((__int64 (__fastcall *)(cocos2d::CCMenuItemImage *))init)(v1);\n    if ( v3 )\n    {\n      cocos2d::CCObject::autorelease(v1);\n      return v1;\n    }\n    v5 = (cocos2d::CCNodeRGBA *(__fastcall *)(cocos2d::CCNodeRGBA *, char))v1->~CCMenuItemImage;\n    if ( v5 == sub_180059F50 )\n    {\n      sub_180059F50(v1, 1);\n      return nullptr;\n    }\n    v5(v1, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCMenuItemImage::create from 0x18005a870 to 0x18005a91a (170 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2cdc\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\npush    rbx                                                            ; +0x0, 0x18005a870\nsub     rsp, 20h                                                       ; +0x2, 0x18005a872\nmov     ecx, 190h; Size                                                ; +0x6, 0x18005a876\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb, 0x18005a87b\nmov     rbx, rax                                                       ; +0x10, 0x18005a880\nmov     [rsp+28h+arg_0], rax                                           ; +0x13, 0x18005a883\ntest    rax, rax                                                       ; +0x18, 0x18005a888\njz      short loc_18005A8AF                                            ; +0x1b, 0x18005a88b\nmov     rcx, rax; this                                                 ; +0x1d, 0x18005a88d\ncall    ??0CCMenuItemSprite@cocos2d@@QEAA@XZ; cocos2d::CCMenuItemSprite::CCMenuItemSprite(void) ; +0x20, 0x18005a890\nlea     rax, ??_7CCMenuItemImage@cocos2d@@6BCCNode@1@@; const cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCNode'} ; +0x25, 0x18005a895\nmov     [rbx], rax                                                     ; +0x2c, 0x18005a89c\nlea     rax, ??_7CCMenuItemImage@cocos2d@@6BCCRGBAProtocol@1@@; const cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCRGBAProtocol'} ; +0x2f, 0x18005a89f\nmov     [rbx+140h], rax                                                ; +0x36, 0x18005a8a6\njmp     short loc_18005A8B1                                            ; +0x3d, 0x18005a8ad\nxor     ebx, ebx                                                       ; +0x3f, 0x18005a8af\ntest    rbx, rbx                                                       ; +0x41, 0x18005a8b1\njz      short loc_18005A912                                            ; +0x44, 0x18005a8b4\nmov     rax, [rbx]                                                     ; +0x46, 0x18005a8b6\nmov     rdx, [rax+48h]                                                 ; +0x49, 0x18005a8b9\nlea     rax, ?init@CCMenuItemImage@cocos2d@@UEAA_NXZ; cocos2d::CCMenuItemImage::init(void) ; +0x4d, 0x18005a8bd\nmov     rcx, rbx; this                                                 ; +0x54, 0x18005a8c4\ncmp     rdx, rax                                                       ; +0x57, 0x18005a8c7\njnz     short loc_18005A8D3                                            ; +0x5a, 0x18005a8ca\ncall    ?init@CCMenuItemImage@cocos2d@@UEAA_NXZ; cocos2d::CCMenuItemImage::init(void) ; +0x5c, 0x18005a8cc\njmp     short loc_18005A8D5                                            ; +0x61, 0x18005a8d1\ncall    rdx                                                            ; +0x63, 0x18005a8d3\nmov     rcx, rbx; this                                                 ; +0x65, 0x18005a8d5\ntest    al, al                                                         ; +0x68, 0x18005a8d8\njz      short loc_18005A8EA                                            ; +0x6a, 0x18005a8da\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x6c, 0x18005a8dc\nmov     rax, rbx                                                       ; +0x71, 0x18005a8e1\nadd     rsp, 20h                                                       ; +0x74, 0x18005a8e4\npop     rbx                                                            ; +0x78, 0x18005a8e8\nretn                                                                   ; +0x79, 0x18005a8e9\nmov     rax, [rbx]                                                     ; +0x7a, 0x18005a8ea\nmov     r8, [rax+8]                                                    ; +0x7d, 0x18005a8ed\nlea     rax, sub_180059F50                                             ; +0x81, 0x18005a8f1\nmov     edx, 1                                                         ; +0x88, 0x18005a8f8\ncmp     r8, rax                                                        ; +0x8d, 0x18005a8fd\njnz     short loc_18005A90F                                            ; +0x90, 0x18005a900\ncall    sub_180059F50                                                  ; +0x92, 0x18005a902\nxor     eax, eax                                                       ; +0x97, 0x18005a907\nadd     rsp, 20h                                                       ; +0x99, 0x18005a909\npop     rbx                                                            ; +0x9d, 0x18005a90d\nretn                                                                   ; +0x9e, 0x18005a90e\ncall    r8                                                             ; +0x9f, 0x18005a90f\nxor     eax, eax                                                       ; +0xa2, 0x18005a912\nadd     rsp, 20h                                                       ; +0xa4, 0x18005a914\npop     rbx                                                            ; +0xa8, 0x18005a918\nretn                                                                   ; +0xa9, 0x18005a919", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b2cdc"], "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"}