{"type": "func", "start": 6443022192, "end": 6443022331, "name": "cocos2d::CCSprite::createWithTexture", "pseudocode": "// \n// cocos2d::CCSprite::createWithTexture from 0x18008b770 to 0x18008b7fb (139 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b5b5c\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\nstruct cocos2d::CCSprite *__fastcall cocos2d::CCSprite::createWithTexture(\n        struct cocos2d::CCTexture2D *a1,\n        const struct cocos2d::CCRect *a2)\n{\n  cocos2d::CCSprite *v4; // rax\n  cocos2d::CCSprite *v5; // rbx\n\n  v4 = (cocos2d::CCSprite *)operator new(0x258u);\n  if ( v4 )\n    v5 = cocos2d::CCSprite::CCSprite(v4);\n  else\n    v5 = nullptr;\n  if ( v5 )\n  {\n    if ( ((unsigned __int8 (__fastcall *)(cocos2d::CCSprite *, struct cocos2d::CCTexture2D *, const struct cocos2d::CCRect *))v5->initWithTexture_0)(\n           v5,\n           a1,\n           a2) )\n    {\n      cocos2d::CCObject::autorelease(v5);\n      return v5;\n    }\n    ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v5->~CCSprite)(v5, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCSprite::createWithTexture from 0x18008b770 to 0x18008b7fb (139 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b5b5c\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, 0x18008b770\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18008b775\npush    rdi                                                            ; +0xa, 0x18008b77a\nsub     rsp, 20h                                                       ; +0xb, 0x18008b77b\nmov     rdi, rdx                                                       ; +0xf, 0x18008b77f\nmov     rsi, rcx                                                       ; +0x12, 0x18008b782\nmov     ecx, 258h; Size                                                ; +0x15, 0x18008b785\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a, 0x18008b78a\nmov     [rsp+28h+arg_10], rax                                          ; +0x1f, 0x18008b78f\ntest    rax, rax                                                       ; +0x24, 0x18008b794\njz      short loc_18008B7A6                                            ; +0x27, 0x18008b797\nmov     rcx, rax; this                                                 ; +0x29, 0x18008b799\ncall    ??0CCSprite@cocos2d@@QEAA@XZ; cocos2d::CCSprite::CCSprite(void) ; +0x2c, 0x18008b79c\nmov     rbx, rax                                                       ; +0x31, 0x18008b7a1\njmp     short loc_18008B7A8                                            ; +0x34, 0x18008b7a4\nxor     ebx, ebx                                                       ; +0x36, 0x18008b7a6\ntest    rbx, rbx                                                       ; +0x38, 0x18008b7a8\njz      short loc_18008B7E9                                            ; +0x3b, 0x18008b7ab\nmov     rax, [rbx]                                                     ; +0x3d, 0x18008b7ad\nmov     r8, rdi                                                        ; +0x40, 0x18008b7b0\nmov     rdx, rsi                                                       ; +0x43, 0x18008b7b3\nmov     rcx, rbx                                                       ; +0x46, 0x18008b7b6\ncall    qword ptr [rax+370h]                                           ; +0x49, 0x18008b7b9\nmov     rcx, rbx; this                                                 ; +0x4f, 0x18008b7bf\ntest    al, al                                                         ; +0x52, 0x18008b7c2\njz      short loc_18008B7DE                                            ; +0x54, 0x18008b7c4\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x56, 0x18008b7c6\nmov     rax, rbx                                                       ; +0x5b, 0x18008b7cb\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5e, 0x18008b7ce\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x63, 0x18008b7d3\nadd     rsp, 20h                                                       ; +0x68, 0x18008b7d8\npop     rdi                                                            ; +0x6c, 0x18008b7dc\nretn                                                                   ; +0x6d, 0x18008b7dd\nmov     rax, [rbx]                                                     ; +0x6e, 0x18008b7de\nmov     edx, 1                                                         ; +0x71, 0x18008b7e1\ncall    qword ptr [rax+8]                                              ; +0x76, 0x18008b7e6\nxor     eax, eax                                                       ; +0x79, 0x18008b7e9\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x7b, 0x18008b7eb\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x80, 0x18008b7f0\nadd     rsp, 20h                                                       ; +0x85, 0x18008b7f5\npop     rdi                                                            ; +0x89, 0x18008b7f9\nretn                                                                   ; +0x8a, 0x18008b7fa", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b5b5c"], "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"}