{"type": "func", "start": 6442784512, "end": 6442784670, "name": "cocos2d::CCLayerGradient::create", "pseudocode": "// \n// cocos2d::CCLayerGradient::create from 0x180051700 to 0x18005179e (158 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc0dc\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:45 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCLayerGradient *__fastcall cocos2d::CCLayerGradient::create(\n        const struct cocos2d::_ccColor4B *a1,\n        const struct cocos2d::_ccColor4B *a2)\n{\n  cocos2d::CCLayerGradient *v4; // rax\n  cocos2d::CCLayerGradient *v5; // rbx\n  cocos2d::CCObject *v6; // rbx\n\n  v4 = (cocos2d::CCLayerGradient *)sub_1800E4AC0(0x238u);\n  v5 = v4;\n  if ( v4 )\n  {\n    memset(v4, 0, 0x238u);\n    v6 = cocos2d::CCLayerGradient::CCLayerGradient(v5);\n  }\n  else\n  {\n    v6 = nullptr;\n  }\n  if ( v6 )\n  {\n    if ( (*(unsigned __int8 (__fastcall **)(cocos2d::CCObject *, const struct cocos2d::_ccColor4B *, const struct cocos2d::_ccColor4B *))(*(_QWORD *)v6 + 1064LL))(\n           v6,\n           a1,\n           a2) )\n    {\n      cocos2d::CCObject::autorelease(v6);\n      return v6;\n    }\n    (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 8LL))(v6, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCLayerGradient::create from 0x180051700 to 0x18005179e (158 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc0dc\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:45 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180051700\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180051705\npush    rdi                                                            ; +0xa, 0x18005170a\nsub     rsp, 20h                                                       ; +0xb, 0x18005170b\nmov     rdi, rdx                                                       ; +0xf, 0x18005170f\nmov     rsi, rcx                                                       ; +0x12, 0x180051712\nmov     ecx, 238h; Size                                                ; +0x15, 0x180051715\ncall    sub_1800E4AC0                                                  ; +0x1a, 0x18005171a\nmov     rbx, rax                                                       ; +0x1f, 0x18005171f\nmov     [rsp+28h+arg_10], rax                                          ; +0x22, 0x180051722\ntest    rax, rax                                                       ; +0x27, 0x180051727\njz      short loc_180051749                                            ; +0x2a, 0x18005172a\nxor     edx, edx; Val                                                  ; +0x2c, 0x18005172c\nmov     r8d, 238h; Size                                                ; +0x2e, 0x18005172e\nmov     rcx, rax; void *                                               ; +0x34, 0x180051734\ncall    memset                                                         ; +0x37, 0x180051737\nmov     rcx, rbx; this                                                 ; +0x3c, 0x18005173c\ncall    ??0CCLayerGradient@cocos2d@@QEAA@XZ; cocos2d::CCLayerGradient::CCLayerGradient(void) ; +0x3f, 0x18005173f\nmov     rbx, rax                                                       ; +0x44, 0x180051744\njmp     short loc_18005174B                                            ; +0x47, 0x180051747\nxor     ebx, ebx                                                       ; +0x49, 0x180051749\ntest    rbx, rbx                                                       ; +0x4b, 0x18005174b\njz      short loc_18005178C                                            ; +0x4e, 0x18005174e\nmov     rax, [rbx]                                                     ; +0x50, 0x180051750\nmov     r8, rdi                                                        ; +0x53, 0x180051753\nmov     rdx, rsi                                                       ; +0x56, 0x180051756\nmov     rcx, rbx                                                       ; +0x59, 0x180051759\ncall    qword ptr [rax+428h]                                           ; +0x5c, 0x18005175c\nmov     rcx, rbx; this                                                 ; +0x62, 0x180051762\ntest    al, al                                                         ; +0x65, 0x180051765\njz      short loc_180051781                                            ; +0x67, 0x180051767\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x69, 0x180051769\nmov     rax, rbx                                                       ; +0x6e, 0x18005176e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x71, 0x180051771\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x76, 0x180051776\nadd     rsp, 20h                                                       ; +0x7b, 0x18005177b\npop     rdi                                                            ; +0x7f, 0x18005177f\nretn                                                                   ; +0x80, 0x180051780\nmov     rax, [rbx]                                                     ; +0x81, 0x180051781\nmov     edx, 1                                                         ; +0x84, 0x180051784\ncall    qword ptr [rax+8]                                              ; +0x89, 0x180051789\nxor     eax, eax                                                       ; +0x8c, 0x18005178c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8e, 0x18005178e\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x93, 0x180051793\nadd     rsp, 20h                                                       ; +0x98, 0x180051798\npop     rdi                                                            ; +0x9c, 0x18005179c\nretn                                                                   ; +0x9d, 0x18005179d", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801bc0dc"], "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"}