{"type": "func", "start": 6443131232, "end": 6443131463, "name": "cocos2d::CCTextureAtlas::create", "pseudocode": "// \n// cocos2d::CCTextureAtlas::create from 0x1800a6160 to 0x1800a6247 (231 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7ce0\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::CCTextureAtlas *__fastcall cocos2d::CCTextureAtlas::create(const char *a1, unsigned int a2)\n{\n  cocos2d::CCObject *v4; // rax\n  cocos2d::CCTextureAtlas *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 *)operator new(0x70u);\n  v5 = (cocos2d::CCTextureAtlas *)v4;\n  if ( v4 )\n  {\n    cocos2d::CCObject::CCObject(v4);\n    v5->__vftable = (cocos2d::CCTextureAtlas_vtbl *)&cocos2d::CCTextureAtlas::`vftable';\n    v5->m_pIndices = nullptr;\n    v5->m_bDirty = 0;\n    v5->m_pTexture = nullptr;\n    v5->m_pQuads = nullptr;\n    v5->m_uMaxQuads = 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))v5->~CCTextureAtlas;\n    if ( v9 == sub_1800A60D0 )\n    {\n      sub_1800A60D0(v5, 1);\n      return nullptr;\n    }\n    v9(v5, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::create from 0x1800a6160 to 0x1800a6247 (231 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7ce0\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, 0x1800a6160\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a6165\npush    rdi                                                            ; +0xa, 0x1800a616a\nsub     rsp, 20h                                                       ; +0xb, 0x1800a616b\nmov     esi, edx                                                       ; +0xf, 0x1800a616f\nmov     rdi, rcx                                                       ; +0x11, 0x1800a6171\nmov     ecx, 70h ; 'p'; Size                                           ; +0x14, 0x1800a6174\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x19, 0x1800a6179\nmov     rbx, rax                                                       ; +0x1e, 0x1800a617e\nmov     [rsp+28h+arg_10], rax                                          ; +0x21, 0x1800a6181\ntest    rax, rax                                                       ; +0x26, 0x1800a6186\njz      short loc_1800A61B3                                            ; +0x29, 0x1800a6189\nmov     rcx, rax; this                                                 ; +0x2b, 0x1800a618b\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x2e, 0x1800a618e\nlea     rax, ??_7CCTextureAtlas@cocos2d@@6B@; const cocos2d::CCTextureAtlas::`vftable' ; +0x33, 0x1800a6193\nmov     [rbx], rax                                                     ; +0x3a, 0x1800a619a\nxor     eax, eax                                                       ; +0x3d, 0x1800a619d\nmov     [rbx+38h], rax                                                 ; +0x3f, 0x1800a619f\nmov     [rbx+48h], al                                                  ; +0x43, 0x1800a61a3\nmov     [rbx+58h], rax                                                 ; +0x46, 0x1800a61a6\nmov     [rbx+60h], rax                                                 ; +0x4a, 0x1800a61aa\nmov     [rbx+68h], eax                                                 ; +0x4e, 0x1800a61ae\njmp     short loc_1800A61B6                                            ; +0x51, 0x1800a61b1\nmov     rbx, rax                                                       ; +0x53, 0x1800a61b3\ntest    rbx, rbx                                                       ; +0x56, 0x1800a61b6\njz      short loc_1800A6235                                            ; +0x59, 0x1800a61b9\ncall    ?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x5b, 0x1800a61bb\nmov     rcx, rax; this                                                 ; +0x60, 0x1800a61c0\nxor     r8d, r8d; bool                                                 ; +0x63, 0x1800a61c3\nmov     rdx, rdi; char *                                               ; +0x66, 0x1800a61c6\ncall    ?addImage@CCTextureCache@cocos2d@@QEAAPEAVCCTexture2D@2@PEBD_N@Z; cocos2d::CCTextureCache::addImage(char const *,bool) ; +0x69, 0x1800a61c9\ntest    rax, rax                                                       ; +0x6e, 0x1800a61ce\njz      short loc_1800A6200                                            ; +0x71, 0x1800a61d1\nmov     r8d, esi; unsigned int                                         ; +0x73, 0x1800a61d3\nmov     rdx, rax; struct cocos2d::CCTexture2D *                        ; +0x76, 0x1800a61d6\nmov     rcx, rbx; this                                                 ; +0x79, 0x1800a61d9\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x7c, 0x1800a61dc\ntest    al, al                                                         ; +0x81, 0x1800a61e1\njz      short loc_1800A6200                                            ; +0x83, 0x1800a61e3\nmov     rcx, rbx; this                                                 ; +0x85, 0x1800a61e5\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x88, 0x1800a61e8\nmov     rax, rbx                                                       ; +0x8d, 0x1800a61ed\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x90, 0x1800a61f0\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x95, 0x1800a61f5\nadd     rsp, 20h                                                       ; +0x9a, 0x1800a61fa\npop     rdi                                                            ; +0x9e, 0x1800a61fe\nretn                                                                   ; +0x9f, 0x1800a61ff\nmov     rax, [rbx]                                                     ; +0xa0, 0x1800a6200\nmov     r8, [rax+8]                                                    ; +0xa3, 0x1800a6203\nlea     rax, sub_1800A60D0                                             ; +0xa7, 0x1800a6207\nmov     edx, 1                                                         ; +0xae, 0x1800a620e\nmov     rcx, rbx; Block                                                ; +0xb3, 0x1800a6213\ncmp     r8, rax                                                        ; +0xb6, 0x1800a6216\njnz     short loc_1800A6232                                            ; +0xb9, 0x1800a6219\ncall    sub_1800A60D0                                                  ; +0xbb, 0x1800a621b\nxor     eax, eax                                                       ; +0xc0, 0x1800a6220\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xc2, 0x1800a6222\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc7, 0x1800a6227\nadd     rsp, 20h                                                       ; +0xcc, 0x1800a622c\npop     rdi                                                            ; +0xd0, 0x1800a6230\nretn                                                                   ; +0xd1, 0x1800a6231\ncall    r8                                                             ; +0xd2, 0x1800a6232\nxor     eax, eax                                                       ; +0xd5, 0x1800a6235\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xd7, 0x1800a6237\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xdc, 0x1800a623c\nadd     rsp, 20h                                                       ; +0xe1, 0x1800a6241\npop     rdi                                                            ; +0xe5, 0x1800a6245\nretn                                                                   ; +0xe6, 0x1800a6246", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b7ce0"], "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"}