{"type": "func", "start": 6442458048, "end": 6442458394, "name": "cocos2d::CCAtlasNode::initWithTexture", "pseudocode": "// \n// cocos2d::CCAtlasNode::initWithTexture from 0x180001bc0 to 0x180001d1a (346 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCAtlasNode::create @ 0x1800019db\n// > cocos2d::CCAtlasNode::initWithTileFile @ 0x180001d73\n// > cocos2d::CCLabelAtlas::initWithString @ 0x180047e10\n// > cocos2d::CCLabelAtlas::initWithString @ 0x180047e8a\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b70f0\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:21:15 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::CCAtlasNode::initWithTexture(\n        cocos2d::CCAtlasNode *this,\n        struct cocos2d::CCTexture2D *a2,\n        int a3,\n        int a4,\n        unsigned int a5)\n{\n  cocos2d::CCTextureAtlas *v7; // rax\n  __int64 v8; // rcx\n  cocos2d::CCCamera *v10; // rax\n  cocos2d::CCCamera *v11; // rax\n  __int64 v12; // rbx\n  cocos2d::CCShaderCache *v13; // rax\n  struct cocos2d::CCGLProgram *v14; // rax\n  __int64 v15; // rax\n\n  *((_DWORD *)this + 90) = a3;\n  *((_DWORD *)this + 91) = a4;\n  *((_WORD *)this + 184) = -1;\n  *((_BYTE *)this + 370) = -1;\n  *((_BYTE *)this + 384) = 1;\n  *((_DWORD *)this + 97) = 1;\n  *((_DWORD *)this + 98) = 771;\n  v7 = (cocos2d::CCTextureAtlas *)sub_1800E4AC0(0x70u);\n  if ( v7 )\n    v7 = (cocos2d::CCTextureAtlas *)cocos2d::CCTextureAtlas::CCTextureAtlas(v7);\n  *((_QWORD *)this + 47) = v7;\n  cocos2d::CCTextureAtlas::initWithTexture(v7, a2, a5);\n  v8 = *((_QWORD *)this + 47);\n  if ( !v8 )\n    return 0;\n  v10 = (cocos2d::CCCamera *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 88LL))(v8);\n  if ( !cocos2d::CCCamera::isDirty(v10) )\n  {\n    *((_DWORD *)this + 97) = 770;\n    *((_DWORD *)this + 98) = 771;\n  }\n  v11 = (cocos2d::CCCamera *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 47) + 88LL))(*((_QWORD *)this + 47));\n  *((_BYTE *)this + 384) = cocos2d::CCCamera::isDirty(v11);\n  cocos2d::CCAtlasNode::calculateMaxItems(this);\n  *((_DWORD *)this + 99) = a5;\n  v12 = *(_QWORD *)this;\n  v13 = cocos2d::CCShaderCache::sharedShaderCache();\n  v14 = cocos2d::CCShaderCache::programForKey(v13, \"ShaderPositionTexture_uColor\");\n  (*(void (__fastcall **)(cocos2d::CCAtlasNode *, struct cocos2d::CCGLProgram *))(v12 + 656))(this, v14);\n  v15 = (*(__int64 (__fastcall **)(cocos2d::CCAtlasNode *))(*(_QWORD *)this + 648LL))(this);\n  *((_DWORD *)this + 100) = _glewGetUniformLocation(*(unsigned int *)(v15 + 56), \"u_color\");\n  return 1;\n}", "assembly": "; \n; cocos2d::CCAtlasNode::initWithTexture from 0x180001bc0 to 0x180001d1a (346 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCAtlasNode::create @ 0x1800019db\n; > cocos2d::CCAtlasNode::initWithTileFile @ 0x180001d73\n; > cocos2d::CCLabelAtlas::initWithString @ 0x180047e10\n; > cocos2d::CCLabelAtlas::initWithString @ 0x180047e8a\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b70f0\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:21:15 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180001bc0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x180001bc5\npush    rdi                                                            ; +0xa, 0x180001bca\nsub     rsp, 20h                                                       ; +0xb, 0x180001bcb\nmov     rsi, rdx                                                       ; +0xf, 0x180001bcf\nmov     rdi, rcx                                                       ; +0x12, 0x180001bd2\nmov     [rcx+168h], r8d                                                ; +0x15, 0x180001bd5\nmov     [rcx+16Ch], r9d                                                ; +0x1c, 0x180001bdc\nmovzx   eax, cs:word_1800EB3C0                                         ; +0x23, 0x180001be3\nmov     [rcx+170h], ax                                                 ; +0x2a, 0x180001bea\nmovzx   eax, cs:byte_1800EB3C2                                         ; +0x31, 0x180001bf1\nmov     [rcx+172h], al                                                 ; +0x38, 0x180001bf8\nmov     byte ptr [rcx+180h], 1                                         ; +0x3e, 0x180001bfe\nmov     dword ptr [rcx+184h], 1                                        ; +0x45, 0x180001c05\nmov     dword ptr [rcx+188h], 303h                                     ; +0x4f, 0x180001c0f\nmov     ecx, 70h ; 'p'; Size                                           ; +0x59, 0x180001c19\ncall    sub_1800E4AC0                                                  ; +0x5e, 0x180001c1e\nmov     [rsp+28h+arg_0], rax                                           ; +0x63, 0x180001c23\ntest    rax, rax                                                       ; +0x68, 0x180001c28\njz      short loc_180001C36                                            ; +0x6b, 0x180001c2b\nmov     rcx, rax; this                                                 ; +0x6d, 0x180001c2d\ncall    ??0CCTextureAtlas@cocos2d@@QEAA@XZ; cocos2d::CCTextureAtlas::CCTextureAtlas(void) ; +0x70, 0x180001c30\nnop                                                                    ; +0x75, 0x180001c35\nmov     [rdi+178h], rax                                                ; +0x76, 0x180001c36\nmov     ebx, [rsp+28h+arg_20]                                          ; +0x7d, 0x180001c3d\nmov     r8d, ebx; unsigned int                                         ; +0x81, 0x180001c41\nmov     rdx, rsi; struct cocos2d::CCTexture2D *                        ; +0x84, 0x180001c44\nmov     rcx, rax; this                                                 ; +0x87, 0x180001c47\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x8a, 0x180001c4a\nmov     rcx, [rdi+178h]                                                ; +0x8f, 0x180001c4f\ntest    rcx, rcx                                                       ; +0x96, 0x180001c56\njnz     short loc_180001C6D                                            ; +0x99, 0x180001c59\nxor     al, al                                                         ; +0x9b, 0x180001c5b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x9d, 0x180001c5d\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xa2, 0x180001c62\nadd     rsp, 20h                                                       ; +0xa7, 0x180001c67\npop     rdi                                                            ; +0xab, 0x180001c6b\nretn                                                                   ; +0xac, 0x180001c6c\nmov     rax, [rcx]                                                     ; +0xad, 0x180001c6d\ncall    qword ptr [rax+58h]                                            ; +0xb0, 0x180001c70\nmov     rcx, rax; this                                                 ; +0xb3, 0x180001c73\ncall    ?isDirty@CCCamera@cocos2d@@QEAA_NXZ; cocos2d::CCCamera::isDirty(void) ; +0xb6, 0x180001c76\ntest    al, al                                                         ; +0xbb, 0x180001c7b\njnz     short loc_180001C93                                            ; +0xbd, 0x180001c7d\nmov     dword ptr [rdi+184h], 302h                                     ; +0xbf, 0x180001c7f\nmov     dword ptr [rdi+188h], 303h                                     ; +0xc9, 0x180001c89\nmov     rcx, [rdi+178h]                                                ; +0xd3, 0x180001c93\nmov     rax, [rcx]                                                     ; +0xda, 0x180001c9a\ncall    qword ptr [rax+58h]                                            ; +0xdd, 0x180001c9d\nmov     rcx, rax; this                                                 ; +0xe0, 0x180001ca0\ncall    ?isDirty@CCCamera@cocos2d@@QEAA_NXZ; cocos2d::CCCamera::isDirty(void) ; +0xe3, 0x180001ca3\nmov     [rdi+180h], al                                                 ; +0xe8, 0x180001ca8\nmov     rcx, rdi; this                                                 ; +0xee, 0x180001cae\ncall    ?calculateMaxItems@CCAtlasNode@cocos2d@@AEAAXXZ; cocos2d::CCAtlasNode::calculateMaxItems(void) ; +0xf1, 0x180001cb1\nmov     [rdi+18Ch], ebx                                                ; +0xf6, 0x180001cb6\nmov     rbx, [rdi]                                                     ; +0xfc, 0x180001cbc\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0xff, 0x180001cbf\nmov     rcx, rax; this                                                 ; +0x104, 0x180001cc4\nlea     rdx, aShaderposition; \"ShaderPositionTexture_uColor\"           ; +0x107, 0x180001cc7\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x10e, 0x180001cce\nmov     rdx, rax                                                       ; +0x113, 0x180001cd3\nmov     rcx, rdi                                                       ; +0x116, 0x180001cd6\ncall    qword ptr [rbx+290h]                                           ; +0x119, 0x180001cd9\nmov     rax, [rdi]                                                     ; +0x11f, 0x180001cdf\nmov     rcx, rdi                                                       ; +0x122, 0x180001ce2\ncall    qword ptr [rax+288h]                                           ; +0x125, 0x180001ce5\nmov     rcx, cs:__glewGetUniformLocation                               ; +0x12b, 0x180001ceb\nmov     r8, [rcx]                                                      ; +0x132, 0x180001cf2\nlea     rdx, aUColor; \"u_color\"                                        ; +0x135, 0x180001cf5\nmov     ecx, [rax+38h]                                                 ; +0x13c, 0x180001cfc\ncall    r8                                                             ; +0x13f, 0x180001cff\nmov     [rdi+190h], eax                                                ; +0x142, 0x180001d02\nmov     al, 1                                                          ; +0x148, 0x180001d08\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x14a, 0x180001d0a\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x14f, 0x180001d0f\nadd     rsp, 20h                                                       ; +0x154, 0x180001d14\npop     rdi                                                            ; +0x158, 0x180001d18\nretn                                                                   ; +0x159, 0x180001d19", "xrefs": ["cocos2d::CCAtlasNode::create @ 0x1800019db", "cocos2d::CCAtlasNode::initWithTileFile @ 0x180001d73", "cocos2d::CCLabelAtlas::initWithString @ 0x180047e10", "cocos2d::CCLabelAtlas::initWithString @ 0x180047e8a", "<???> @ 0x18014cf68", "<???> @ 0x1801b70f0"], "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"}