{"type": "func", "start": 6443131472, "end": 6443131676, "name": "cocos2d::CCTextureAtlas::createWithTexture", "pseudocode": "// \n// cocos2d::CCTextureAtlas::createWithTexture from 0x1800a6250 to 0x1800a631c (204 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7cec\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::createWithTexture(\n        struct cocos2d::CCTexture2D *a1,\n        unsigned int a2)\n{\n  cocos2d::CCObject *v4; // rax\n  cocos2d::CCTextureAtlas *v5; // rbx\n  cocos2d::CCTextureAtlas *(__fastcall *v7)(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    if ( cocos2d::CCTextureAtlas::initWithTexture(v5, a1, a2) )\n    {\n      cocos2d::CCObject::autorelease(v5);\n      return v5;\n    }\n    v7 = (cocos2d::CCTextureAtlas *(__fastcall *)(cocos2d::CCTextureAtlas *, char))v5->~CCTextureAtlas;\n    if ( v7 == sub_1800A60D0 )\n    {\n      sub_1800A60D0(v5, 1);\n      return nullptr;\n    }\n    v7(v5, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::createWithTexture from 0x1800a6250 to 0x1800a631c (204 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7cec\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, 0x1800a6250\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a6255\npush    rdi                                                            ; +0xa, 0x1800a625a\nsub     rsp, 20h                                                       ; +0xb, 0x1800a625b\nmov     edi, edx                                                       ; +0xf, 0x1800a625f\nmov     rsi, rcx                                                       ; +0x11, 0x1800a6261\nmov     ecx, 70h ; 'p'; Size                                           ; +0x14, 0x1800a6264\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x19, 0x1800a6269\nmov     rbx, rax                                                       ; +0x1e, 0x1800a626e\nmov     [rsp+28h+arg_10], rax                                          ; +0x21, 0x1800a6271\ntest    rax, rax                                                       ; +0x26, 0x1800a6276\njz      short loc_1800A62A3                                            ; +0x29, 0x1800a6279\nmov     rcx, rax; this                                                 ; +0x2b, 0x1800a627b\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x2e, 0x1800a627e\nlea     rax, ??_7CCTextureAtlas@cocos2d@@6B@; const cocos2d::CCTextureAtlas::`vftable' ; +0x33, 0x1800a6283\nmov     [rbx], rax                                                     ; +0x3a, 0x1800a628a\nxor     eax, eax                                                       ; +0x3d, 0x1800a628d\nmov     [rbx+38h], rax                                                 ; +0x3f, 0x1800a628f\nmov     [rbx+48h], al                                                  ; +0x43, 0x1800a6293\nmov     [rbx+58h], rax                                                 ; +0x46, 0x1800a6296\nmov     [rbx+60h], rax                                                 ; +0x4a, 0x1800a629a\nmov     [rbx+68h], eax                                                 ; +0x4e, 0x1800a629e\njmp     short loc_1800A62A6                                            ; +0x51, 0x1800a62a1\nmov     rbx, rax                                                       ; +0x53, 0x1800a62a3\ntest    rbx, rbx                                                       ; +0x56, 0x1800a62a6\njz      short loc_1800A630A                                            ; +0x59, 0x1800a62a9\nmov     r8d, edi; unsigned int                                         ; +0x5b, 0x1800a62ab\nmov     rdx, rsi; struct cocos2d::CCTexture2D *                        ; +0x5e, 0x1800a62ae\nmov     rcx, rbx; this                                                 ; +0x61, 0x1800a62b1\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x64, 0x1800a62b4\nmov     rcx, rbx; Block                                                ; +0x69, 0x1800a62b9\ntest    al, al                                                         ; +0x6c, 0x1800a62bc\njz      short loc_1800A62D8                                            ; +0x6e, 0x1800a62be\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x70, 0x1800a62c0\nmov     rax, rbx                                                       ; +0x75, 0x1800a62c5\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x1800a62c8\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7d, 0x1800a62cd\nadd     rsp, 20h                                                       ; +0x82, 0x1800a62d2\npop     rdi                                                            ; +0x86, 0x1800a62d6\nretn                                                                   ; +0x87, 0x1800a62d7\nmov     rax, [rbx]                                                     ; +0x88, 0x1800a62d8\nmov     r8, [rax+8]                                                    ; +0x8b, 0x1800a62db\nlea     rax, sub_1800A60D0                                             ; +0x8f, 0x1800a62df\nmov     edx, 1                                                         ; +0x96, 0x1800a62e6\ncmp     r8, rax                                                        ; +0x9b, 0x1800a62eb\njnz     short loc_1800A6307                                            ; +0x9e, 0x1800a62ee\ncall    sub_1800A60D0                                                  ; +0xa0, 0x1800a62f0\nxor     eax, eax                                                       ; +0xa5, 0x1800a62f5\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa7, 0x1800a62f7\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xac, 0x1800a62fc\nadd     rsp, 20h                                                       ; +0xb1, 0x1800a6301\npop     rdi                                                            ; +0xb5, 0x1800a6305\nretn                                                                   ; +0xb6, 0x1800a6306\ncall    r8                                                             ; +0xb7, 0x1800a6307\nxor     eax, eax                                                       ; +0xba, 0x1800a630a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbc, 0x1800a630c\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc1, 0x1800a6311\nadd     rsp, 20h                                                       ; +0xc6, 0x1800a6316\npop     rdi                                                            ; +0xca, 0x1800a631a\nretn                                                                   ; +0xcb, 0x1800a631b", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b7cec"], "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"}