{"type": "func", "start": 6443146368, "end": 6443146599, "name": "cocos2d::CCTextureAtlas::create", "pseudocode": "// \n// cocos2d::CCTextureAtlas::create from 0x1800a9c80 to 0x1800a9d67 (231 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1f98\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:22:17 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCTextureAtlas *__fastcall cocos2d::CCTextureAtlas::create(const char *a1, unsigned int a2)\n{\n  cocos2d::CCObject *v4; // rax\n  cocos2d::CCObject *v5; // rbx\n  cocos2d::CCTextureCache *v6; // rax\n  struct cocos2d::CCTexture2D *v7; // rax\n  cocos2d::CCTextureAtlas *(__fastcall *v9)(cocos2d::CCTextureAtlas *, char); // r8\n\n  v4 = (cocos2d::CCObject *)sub_1800E4AC0(0x70u);\n  v5 = v4;\n  if ( v4 )\n  {\n    cocos2d::CCObject::CCObject(v4);\n    *(_QWORD *)v5 = &cocos2d::CCTextureAtlas::`vftable';\n    *((_QWORD *)v5 + 7) = 0;\n    *((_BYTE *)v5 + 72) = 0;\n    *((_QWORD *)v5 + 11) = 0;\n    *((_QWORD *)v5 + 12) = 0;\n    *((_DWORD *)v5 + 26) = 0;\n  }\n  else\n  {\n    v5 = nullptr;\n  }\n  if ( v5 )\n  {\n    v6 = cocos2d::CCTextureCache::sharedTextureCache();\n    v7 = cocos2d::CCTextureCache::addImage(v6, a1, 0);\n    if ( v7 && cocos2d::CCTextureAtlas::initWithTexture(v5, v7, a2) )\n    {\n      cocos2d::CCObject::autorelease(v5);\n      return v5;\n    }\n    v9 = *(cocos2d::CCTextureAtlas *(__fastcall **)(cocos2d::CCTextureAtlas *, char))(*(_QWORD *)v5 + 8LL);\n    if ( v9 == sub_1800A9BF0 )\n    {\n      sub_1800A9BF0(v5, 1);\n      return nullptr;\n    }\n    v9(v5, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::create from 0x1800a9c80 to 0x1800a9d67 (231 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1f98\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:22:17 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800a9c80\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a9c85\npush    rdi                                                            ; +0xa, 0x1800a9c8a\nsub     rsp, 20h                                                       ; +0xb, 0x1800a9c8b\nmov     esi, edx                                                       ; +0xf, 0x1800a9c8f\nmov     rdi, rcx                                                       ; +0x11, 0x1800a9c91\nmov     ecx, 70h ; 'p'; Size                                           ; +0x14, 0x1800a9c94\ncall    sub_1800E4AC0                                                  ; +0x19, 0x1800a9c99\nmov     rbx, rax                                                       ; +0x1e, 0x1800a9c9e\nmov     [rsp+28h+arg_10], rax                                          ; +0x21, 0x1800a9ca1\ntest    rax, rax                                                       ; +0x26, 0x1800a9ca6\njz      short loc_1800A9CD3                                            ; +0x29, 0x1800a9ca9\nmov     rcx, rax; this                                                 ; +0x2b, 0x1800a9cab\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x2e, 0x1800a9cae\nlea     rax, ??_7CCTextureAtlas@cocos2d@@6B@; const cocos2d::CCTextureAtlas::`vftable' ; +0x33, 0x1800a9cb3\nmov     [rbx], rax                                                     ; +0x3a, 0x1800a9cba\nxor     eax, eax                                                       ; +0x3d, 0x1800a9cbd\nmov     [rbx+38h], rax                                                 ; +0x3f, 0x1800a9cbf\nmov     [rbx+48h], al                                                  ; +0x43, 0x1800a9cc3\nmov     [rbx+58h], rax                                                 ; +0x46, 0x1800a9cc6\nmov     [rbx+60h], rax                                                 ; +0x4a, 0x1800a9cca\nmov     [rbx+68h], eax                                                 ; +0x4e, 0x1800a9cce\njmp     short loc_1800A9CD6                                            ; +0x51, 0x1800a9cd1\nmov     rbx, rax                                                       ; +0x53, 0x1800a9cd3\ntest    rbx, rbx                                                       ; +0x56, 0x1800a9cd6\njz      short loc_1800A9D55                                            ; +0x59, 0x1800a9cd9\ncall    ?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x5b, 0x1800a9cdb\nmov     rcx, rax; this                                                 ; +0x60, 0x1800a9ce0\nxor     r8d, r8d; bool                                                 ; +0x63, 0x1800a9ce3\nmov     rdx, rdi; char *                                               ; +0x66, 0x1800a9ce6\ncall    ?addImage@CCTextureCache@cocos2d@@QEAAPEAVCCTexture2D@2@PEBD_N@Z; cocos2d::CCTextureCache::addImage(char const *,bool) ; +0x69, 0x1800a9ce9\ntest    rax, rax                                                       ; +0x6e, 0x1800a9cee\njz      short loc_1800A9D20                                            ; +0x71, 0x1800a9cf1\nmov     r8d, esi; unsigned int                                         ; +0x73, 0x1800a9cf3\nmov     rdx, rax; struct cocos2d::CCTexture2D *                        ; +0x76, 0x1800a9cf6\nmov     rcx, rbx; this                                                 ; +0x79, 0x1800a9cf9\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x7c, 0x1800a9cfc\ntest    al, al                                                         ; +0x81, 0x1800a9d01\njz      short loc_1800A9D20                                            ; +0x83, 0x1800a9d03\nmov     rcx, rbx; this                                                 ; +0x85, 0x1800a9d05\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x88, 0x1800a9d08\nmov     rax, rbx                                                       ; +0x8d, 0x1800a9d0d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x90, 0x1800a9d10\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x95, 0x1800a9d15\nadd     rsp, 20h                                                       ; +0x9a, 0x1800a9d1a\npop     rdi                                                            ; +0x9e, 0x1800a9d1e\nretn                                                                   ; +0x9f, 0x1800a9d1f\nmov     rax, [rbx]                                                     ; +0xa0, 0x1800a9d20\nmov     r8, [rax+8]                                                    ; +0xa3, 0x1800a9d23\nlea     rax, sub_1800A9BF0                                             ; +0xa7, 0x1800a9d27\nmov     edx, 1                                                         ; +0xae, 0x1800a9d2e\nmov     rcx, rbx; Block                                                ; +0xb3, 0x1800a9d33\ncmp     r8, rax                                                        ; +0xb6, 0x1800a9d36\njnz     short loc_1800A9D52                                            ; +0xb9, 0x1800a9d39\ncall    sub_1800A9BF0                                                  ; +0xbb, 0x1800a9d3b\nxor     eax, eax                                                       ; +0xc0, 0x1800a9d40\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xc2, 0x1800a9d42\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc7, 0x1800a9d47\nadd     rsp, 20h                                                       ; +0xcc, 0x1800a9d4c\npop     rdi                                                            ; +0xd0, 0x1800a9d50\nretn                                                                   ; +0xd1, 0x1800a9d51\ncall    r8                                                             ; +0xd2, 0x1800a9d52\nxor     eax, eax                                                       ; +0xd5, 0x1800a9d55\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xd7, 0x1800a9d57\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xdc, 0x1800a9d5c\nadd     rsp, 20h                                                       ; +0xe1, 0x1800a9d61\npop     rdi                                                            ; +0xe5, 0x1800a9d65\nretn                                                                   ; +0xe6, 0x1800a9d66", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c1f98"], "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"}