{"type": "func", "start": 6443146608, "end": 6443146812, "name": "cocos2d::CCTextureAtlas::createWithTexture", "pseudocode": "// \n// cocos2d::CCTextureAtlas::createWithTexture from 0x1800a9d70 to 0x1800a9e3c (204 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1fa4\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::createWithTexture(\n        struct cocos2d::CCTexture2D *a1,\n        unsigned int a2)\n{\n  cocos2d::CCObject *v4; // rax\n  cocos2d::CCObject *v5; // rbx\n  cocos2d::CCTextureAtlas *(__fastcall *v7)(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    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))(*(_QWORD *)v5 + 8LL);\n    if ( v7 == sub_1800A9BF0 )\n    {\n      sub_1800A9BF0(v5, 1);\n      return nullptr;\n    }\n    v7(v5, 1);\n  }\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::createWithTexture from 0x1800a9d70 to 0x1800a9e3c (204 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1fa4\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, 0x1800a9d70\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a9d75\npush    rdi                                                            ; +0xa, 0x1800a9d7a\nsub     rsp, 20h                                                       ; +0xb, 0x1800a9d7b\nmov     edi, edx                                                       ; +0xf, 0x1800a9d7f\nmov     rsi, rcx                                                       ; +0x11, 0x1800a9d81\nmov     ecx, 70h ; 'p'; Size                                           ; +0x14, 0x1800a9d84\ncall    sub_1800E4AC0                                                  ; +0x19, 0x1800a9d89\nmov     rbx, rax                                                       ; +0x1e, 0x1800a9d8e\nmov     [rsp+28h+arg_10], rax                                          ; +0x21, 0x1800a9d91\ntest    rax, rax                                                       ; +0x26, 0x1800a9d96\njz      short loc_1800A9DC3                                            ; +0x29, 0x1800a9d99\nmov     rcx, rax; this                                                 ; +0x2b, 0x1800a9d9b\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x2e, 0x1800a9d9e\nlea     rax, ??_7CCTextureAtlas@cocos2d@@6B@; const cocos2d::CCTextureAtlas::`vftable' ; +0x33, 0x1800a9da3\nmov     [rbx], rax                                                     ; +0x3a, 0x1800a9daa\nxor     eax, eax                                                       ; +0x3d, 0x1800a9dad\nmov     [rbx+38h], rax                                                 ; +0x3f, 0x1800a9daf\nmov     [rbx+48h], al                                                  ; +0x43, 0x1800a9db3\nmov     [rbx+58h], rax                                                 ; +0x46, 0x1800a9db6\nmov     [rbx+60h], rax                                                 ; +0x4a, 0x1800a9dba\nmov     [rbx+68h], eax                                                 ; +0x4e, 0x1800a9dbe\njmp     short loc_1800A9DC6                                            ; +0x51, 0x1800a9dc1\nmov     rbx, rax                                                       ; +0x53, 0x1800a9dc3\ntest    rbx, rbx                                                       ; +0x56, 0x1800a9dc6\njz      short loc_1800A9E2A                                            ; +0x59, 0x1800a9dc9\nmov     r8d, edi; unsigned int                                         ; +0x5b, 0x1800a9dcb\nmov     rdx, rsi; struct cocos2d::CCTexture2D *                        ; +0x5e, 0x1800a9dce\nmov     rcx, rbx; this                                                 ; +0x61, 0x1800a9dd1\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x64, 0x1800a9dd4\nmov     rcx, rbx; Block                                                ; +0x69, 0x1800a9dd9\ntest    al, al                                                         ; +0x6c, 0x1800a9ddc\njz      short loc_1800A9DF8                                            ; +0x6e, 0x1800a9dde\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x70, 0x1800a9de0\nmov     rax, rbx                                                       ; +0x75, 0x1800a9de5\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x1800a9de8\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7d, 0x1800a9ded\nadd     rsp, 20h                                                       ; +0x82, 0x1800a9df2\npop     rdi                                                            ; +0x86, 0x1800a9df6\nretn                                                                   ; +0x87, 0x1800a9df7\nmov     rax, [rbx]                                                     ; +0x88, 0x1800a9df8\nmov     r8, [rax+8]                                                    ; +0x8b, 0x1800a9dfb\nlea     rax, sub_1800A9BF0                                             ; +0x8f, 0x1800a9dff\nmov     edx, 1                                                         ; +0x96, 0x1800a9e06\ncmp     r8, rax                                                        ; +0x9b, 0x1800a9e0b\njnz     short loc_1800A9E27                                            ; +0x9e, 0x1800a9e0e\ncall    sub_1800A9BF0                                                  ; +0xa0, 0x1800a9e10\nxor     eax, eax                                                       ; +0xa5, 0x1800a9e15\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa7, 0x1800a9e17\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xac, 0x1800a9e1c\nadd     rsp, 20h                                                       ; +0xb1, 0x1800a9e21\npop     rdi                                                            ; +0xb5, 0x1800a9e25\nretn                                                                   ; +0xb6, 0x1800a9e26\ncall    r8                                                             ; +0xb7, 0x1800a9e27\nxor     eax, eax                                                       ; +0xba, 0x1800a9e2a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbc, 0x1800a9e2c\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc1, 0x1800a9e31\nadd     rsp, 20h                                                       ; +0xc6, 0x1800a9e36\npop     rdi                                                            ; +0xca, 0x1800a9e3a\nretn                                                                   ; +0xcb, 0x1800a9e3b", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c1fa4"], "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"}