{"type": "func", "start": 6442829936, "end": 6442830106, "name": "cocos2d::CCMenuItemImage::create", "pseudocode": "// \n// cocos2d::CCMenuItemImage::create from 0x18005c870 to 0x18005c91a (170 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bcf94\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:21:49 +0000\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 (__fastcall *v2)(cocos2d::CCMenuItemImage *__hidden); // rdx\n  bool v3; // al\n  cocos2d::CCNodeRGBA *(__fastcall *v5)(cocos2d::CCNodeRGBA *, char); // r8\n\n  v0 = (cocos2d::CCMenuItemSprite *)sub_1800E4AC0(0x190u);\n  v1 = v0;\n  if ( v0 )\n  {\n    cocos2d::CCMenuItemSprite::CCMenuItemSprite(v0);\n    *(_QWORD *)v1 = &cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCNode'};\n    *((_QWORD *)v1 + 40) = &cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCRGBAProtocol'};\n  }\n  else\n  {\n    v1 = nullptr;\n  }\n  if ( v1 )\n  {\n    v2 = *(bool (__fastcall **)(cocos2d::CCMenuItemImage *__hidden))(*(_QWORD *)v1 + 72LL);\n    if ( v2 == cocos2d::CCMenuItemImage::init )\n      v3 = cocos2d::CCMenuItemImage::init(v1);\n    else\n      v3 = v2(v1);\n    if ( v3 )\n    {\n      cocos2d::CCObject::autorelease(v1);\n      return v1;\n    }\n    v5 = *(cocos2d::CCNodeRGBA *(__fastcall **)(cocos2d::CCNodeRGBA *, char))(*(_QWORD *)v1 + 8LL);\n    if ( v5 == sub_18005BF40 )\n    {\n      sub_18005BF40(v1, 1);\n      return nullptr;\n    }\n    v5(v1, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCMenuItemImage::create from 0x18005c870 to 0x18005c91a (170 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bcf94\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:21:49 +0000\n; \npush    rbx                                                            ; +0x0, 0x18005c870\nsub     rsp, 20h                                                       ; +0x2, 0x18005c872\nmov     ecx, 190h; Size                                                ; +0x6, 0x18005c876\ncall    sub_1800E4AC0                                                  ; +0xb, 0x18005c87b\nmov     rbx, rax                                                       ; +0x10, 0x18005c880\nmov     [rsp+28h+arg_0], rax                                           ; +0x13, 0x18005c883\ntest    rax, rax                                                       ; +0x18, 0x18005c888\njz      short loc_18005C8AF                                            ; +0x1b, 0x18005c88b\nmov     rcx, rax; this                                                 ; +0x1d, 0x18005c88d\ncall    ??0CCMenuItemSprite@cocos2d@@QEAA@XZ; cocos2d::CCMenuItemSprite::CCMenuItemSprite(void) ; +0x20, 0x18005c890\nlea     rax, ??_7CCMenuItemImage@cocos2d@@6BCCNode@1@@; const cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCNode'} ; +0x25, 0x18005c895\nmov     [rbx], rax                                                     ; +0x2c, 0x18005c89c\nlea     rax, ??_7CCMenuItemImage@cocos2d@@6BCCRGBAProtocol@1@@; const cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCRGBAProtocol'} ; +0x2f, 0x18005c89f\nmov     [rbx+140h], rax                                                ; +0x36, 0x18005c8a6\njmp     short loc_18005C8B1                                            ; +0x3d, 0x18005c8ad\nxor     ebx, ebx                                                       ; +0x3f, 0x18005c8af\ntest    rbx, rbx                                                       ; +0x41, 0x18005c8b1\njz      short loc_18005C912                                            ; +0x44, 0x18005c8b4\nmov     rax, [rbx]                                                     ; +0x46, 0x18005c8b6\nmov     rdx, [rax+48h]                                                 ; +0x49, 0x18005c8b9\nlea     rax, ?init@CCMenuItemImage@cocos2d@@UEAA_NXZ; cocos2d::CCMenuItemImage::init(void) ; +0x4d, 0x18005c8bd\nmov     rcx, rbx; this                                                 ; +0x54, 0x18005c8c4\ncmp     rdx, rax                                                       ; +0x57, 0x18005c8c7\njnz     short loc_18005C8D3                                            ; +0x5a, 0x18005c8ca\ncall    ?init@CCMenuItemImage@cocos2d@@UEAA_NXZ; cocos2d::CCMenuItemImage::init(void) ; +0x5c, 0x18005c8cc\njmp     short loc_18005C8D5                                            ; +0x61, 0x18005c8d1\ncall    rdx                                                            ; +0x63, 0x18005c8d3\nmov     rcx, rbx; this                                                 ; +0x65, 0x18005c8d5\ntest    al, al                                                         ; +0x68, 0x18005c8d8\njz      short loc_18005C8EA                                            ; +0x6a, 0x18005c8da\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x6c, 0x18005c8dc\nmov     rax, rbx                                                       ; +0x71, 0x18005c8e1\nadd     rsp, 20h                                                       ; +0x74, 0x18005c8e4\npop     rbx                                                            ; +0x78, 0x18005c8e8\nretn                                                                   ; +0x79, 0x18005c8e9\nmov     rax, [rbx]                                                     ; +0x7a, 0x18005c8ea\nmov     r8, [rax+8]                                                    ; +0x7d, 0x18005c8ed\nlea     rax, sub_18005BF40                                             ; +0x81, 0x18005c8f1\nmov     edx, 1                                                         ; +0x88, 0x18005c8f8\ncmp     r8, rax                                                        ; +0x8d, 0x18005c8fd\njnz     short loc_18005C90F                                            ; +0x90, 0x18005c900\ncall    sub_18005BF40                                                  ; +0x92, 0x18005c902\nxor     eax, eax                                                       ; +0x97, 0x18005c907\nadd     rsp, 20h                                                       ; +0x99, 0x18005c909\npop     rbx                                                            ; +0x9d, 0x18005c90d\nretn                                                                   ; +0x9e, 0x18005c90e\ncall    r8                                                             ; +0x9f, 0x18005c90f\nxor     eax, eax                                                       ; +0xa2, 0x18005c912\nadd     rsp, 20h                                                       ; +0xa4, 0x18005c914\npop     rbx                                                            ; +0xa8, 0x18005c918\nretn                                                                   ; +0xa9, 0x18005c919", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801bcf94"], "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"}