{"type": "func", "start": 6443047040, "end": 6443047379, "name": "cocos2d::CCSpriteBatchNode::initWithTexture", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::initWithTexture from 0x180091880 to 0x1800919d3 (339 bytes)\n// \n// 8 xrefs:\n// > cocos2d::CCLabelBMFont::initWithString @ 0x18004a1c5\n// > cocos2d::CCSpriteBatchNode::create @ 0x180091508\n// > cocos2d::CCSpriteBatchNode::createWithTexture @ 0x1800915a5\n// > cocos2d::CCSpriteBatchNode::init @ 0x18009182b\n// > cocos2d::CCSpriteBatchNode::initWithFile @ 0x180091873\n// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800af9d6\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c02dc\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:08 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nchar __fastcall cocos2d::CCSpriteBatchNode::initWithTexture(\n        cocos2d::CCSpriteBatchNode *this,\n        struct cocos2d::CCTexture2D *a2,\n        unsigned int a3)\n{\n  cocos2d::CCTextureAtlas *v6; // rax\n  cocos2d::CCArray *v7; // rbx\n  cocos2d::CCTextureAtlas *v8; // rax\n  unsigned int v9; // esi\n  cocos2d::CCCamera *v10; // rax\n  char isDirty; // al\n  int v12; // ecx\n  cocos2d::CCArray *v13; // rax\n  cocos2d::CCArray *v14; // rax\n  cocos2d::CCArray *v15; // rax\n  __int64 v16; // rbx\n  cocos2d::CCShaderCache *v17; // rax\n  struct cocos2d::CCGLProgram *v18; // rax\n\n  *((_DWORD *)this + 84) = 1;\n  *((_DWORD *)this + 85) = 771;\n  v6 = (cocos2d::CCTextureAtlas *)sub_1800E4AC0(0x70u);\n  v7 = nullptr;\n  if ( v6 )\n    v8 = (cocos2d::CCTextureAtlas *)cocos2d::CCTextureAtlas::CCTextureAtlas(v6);\n  else\n    v8 = nullptr;\n  *((_QWORD *)this + 41) = v8;\n  v9 = 29;\n  if ( a3 )\n    v9 = a3;\n  cocos2d::CCTextureAtlas::initWithTexture(v8, a2, v9);\n  v10 = (cocos2d::CCCamera *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 88LL))(*((_QWORD *)this + 41));\n  isDirty = cocos2d::CCCamera::isDirty(v10);\n  v12 = 770;\n  if ( isDirty )\n    v12 = 1;\n  *((_DWORD *)this + 84) = v12;\n  *((_DWORD *)this + 85) = 771;\n  v13 = (cocos2d::CCArray *)sub_1800E4AC0(0x40u);\n  if ( v13 )\n    v14 = cocos2d::CCArray::CCArray(v13);\n  else\n    v14 = nullptr;\n  *((_QWORD *)this + 26) = v14;\n  cocos2d::CCArray::initWithCapacity(v14, v9);\n  v15 = (cocos2d::CCArray *)sub_1800E4AC0(0x40u);\n  if ( v15 )\n    v7 = cocos2d::CCArray::CCArray(v15);\n  *((_QWORD *)this + 43) = v7;\n  cocos2d::CCArray::initWithCapacity(v7, v9);\n  *((_WORD *)this + 176) = 0;\n  v16 = *(_QWORD *)this;\n  v17 = cocos2d::CCShaderCache::sharedShaderCache();\n  v18 = cocos2d::CCShaderCache::programForKey(v17, \"ShaderPositionTextureColor\");\n  (*(void (__fastcall **)(cocos2d::CCSpriteBatchNode *, struct cocos2d::CCGLProgram *))(v16 + 656))(this, v18);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::initWithTexture from 0x180091880 to 0x1800919d3 (339 bytes)\n; \n; 8 xrefs:\n; > cocos2d::CCLabelBMFont::initWithString @ 0x18004a1c5\n; > cocos2d::CCSpriteBatchNode::create @ 0x180091508\n; > cocos2d::CCSpriteBatchNode::createWithTexture @ 0x1800915a5\n; > cocos2d::CCSpriteBatchNode::init @ 0x18009182b\n; > cocos2d::CCSpriteBatchNode::initWithFile @ 0x180091873\n; > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800af9d6\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c02dc\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:08 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180091880\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x180091885\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18009188a\npush    rdi                                                            ; +0xf, 0x18009188f\npush    r14                                                            ; +0x10, 0x180091890\npush    r15                                                            ; +0x12, 0x180091892\nsub     rsp, 20h                                                       ; +0x14, 0x180091894\nmov     ebp, r8d                                                       ; +0x18, 0x180091898\nmov     r14, rdx                                                       ; +0x1b, 0x18009189b\nmov     rdi, rcx                                                       ; +0x1e, 0x18009189e\nmov     r15d, 1                                                        ; +0x21, 0x1800918a1\nmov     [rcx+150h], r15d                                               ; +0x27, 0x1800918a7\nmov     dword ptr [rcx+154h], 303h                                     ; +0x2e, 0x1800918ae\nmov     ecx, 70h ; 'p'; Size                                           ; +0x38, 0x1800918b8\ncall    sub_1800E4AC0                                                  ; +0x3d, 0x1800918bd\nmov     [rsp+38h+arg_0], rax                                           ; +0x42, 0x1800918c2\nxor     ebx, ebx                                                       ; +0x47, 0x1800918c7\ntest    rax, rax                                                       ; +0x49, 0x1800918c9\njz      short loc_1800918D8                                            ; +0x4c, 0x1800918cc\nmov     rcx, rax; this                                                 ; +0x4e, 0x1800918ce\ncall    ??0CCTextureAtlas@cocos2d@@QEAA@XZ; cocos2d::CCTextureAtlas::CCTextureAtlas(void) ; +0x51, 0x1800918d1\njmp     short loc_1800918DB                                            ; +0x56, 0x1800918d6\nmov     rax, rbx                                                       ; +0x58, 0x1800918d8\nmov     [rdi+148h], rax                                                ; +0x5b, 0x1800918db\nmov     esi, 1Dh                                                       ; +0x62, 0x1800918e2\ntest    ebp, ebp                                                       ; +0x67, 0x1800918e7\ncmovnz  esi, ebp                                                       ; +0x69, 0x1800918e9\nmov     r8d, esi; unsigned int                                         ; +0x6c, 0x1800918ec\nmov     rdx, r14; struct cocos2d::CCTexture2D *                        ; +0x6f, 0x1800918ef\nmov     rcx, rax; this                                                 ; +0x72, 0x1800918f2\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x75, 0x1800918f5\nmov     rcx, [rdi+148h]                                                ; +0x7a, 0x1800918fa\nmov     rax, [rcx]                                                     ; +0x81, 0x180091901\ncall    qword ptr [rax+58h]                                            ; +0x84, 0x180091904\nmov     rcx, rax; this                                                 ; +0x87, 0x180091907\ncall    ?isDirty@CCCamera@cocos2d@@QEAA_NXZ; cocos2d::CCCamera::isDirty(void) ; +0x8a, 0x18009190a\nmov     ecx, 302h                                                      ; +0x8f, 0x18009190f\ntest    al, al                                                         ; +0x94, 0x180091914\ncmovnz  ecx, r15d                                                      ; +0x96, 0x180091916\nmov     [rdi+150h], ecx                                                ; +0x9a, 0x18009191a\nmov     dword ptr [rdi+154h], 303h                                     ; +0xa0, 0x180091920\nmov     ecx, 40h ; '@'; Size                                           ; +0xaa, 0x18009192a\ncall    sub_1800E4AC0                                                  ; +0xaf, 0x18009192f\nmov     [rsp+38h+arg_0], rax                                           ; +0xb4, 0x180091934\ntest    rax, rax                                                       ; +0xb9, 0x180091939\njz      short loc_180091948                                            ; +0xbc, 0x18009193c\nmov     rcx, rax; this                                                 ; +0xbe, 0x18009193e\ncall    ??0CCArray@cocos2d@@QEAA@XZ; cocos2d::CCArray::CCArray(void)   ; +0xc1, 0x180091941\njmp     short loc_18009194B                                            ; +0xc6, 0x180091946\nmov     rax, rbx                                                       ; +0xc8, 0x180091948\nmov     [rdi+0D0h], rax                                                ; +0xcb, 0x18009194b\nmov     edx, esi; unsigned int                                         ; +0xd2, 0x180091952\nmov     rcx, rax; this                                                 ; +0xd4, 0x180091954\ncall    ?initWithCapacity@CCArray@cocos2d@@QEAA_NI@Z; cocos2d::CCArray::initWithCapacity(uint) ; +0xd7, 0x180091957\nmov     ecx, 40h ; '@'; Size                                           ; +0xdc, 0x18009195c\ncall    sub_1800E4AC0                                                  ; +0xe1, 0x180091961\nmov     [rsp+38h+arg_0], rax                                           ; +0xe6, 0x180091966\ntest    rax, rax                                                       ; +0xeb, 0x18009196b\njz      short loc_18009197B                                            ; +0xee, 0x18009196e\nmov     rcx, rax; this                                                 ; +0xf0, 0x180091970\ncall    ??0CCArray@cocos2d@@QEAA@XZ; cocos2d::CCArray::CCArray(void)   ; +0xf3, 0x180091973\nmov     rbx, rax                                                       ; +0xf8, 0x180091978\nmov     [rdi+158h], rbx                                                ; +0xfb, 0x18009197b\nmov     edx, esi; unsigned int                                         ; +0x102, 0x180091982\nmov     rcx, rbx; this                                                 ; +0x104, 0x180091984\ncall    ?initWithCapacity@CCArray@cocos2d@@QEAA_NI@Z; cocos2d::CCArray::initWithCapacity(uint) ; +0x107, 0x180091987\nmov     word ptr [rdi+160h], 0                                         ; +0x10c, 0x18009198c\nmov     rbx, [rdi]                                                     ; +0x115, 0x180091995\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0x118, 0x180091998\nmov     rcx, rax; this                                                 ; +0x11d, 0x18009199d\nlea     rdx, aShaderposition_3; \"ShaderPositionTextureColor\"           ; +0x120, 0x1800919a0\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x127, 0x1800919a7\nmov     rdx, rax                                                       ; +0x12c, 0x1800919ac\nmov     rcx, rdi                                                       ; +0x12f, 0x1800919af\ncall    qword ptr [rbx+290h]                                           ; +0x132, 0x1800919b2\nmov     al, 1                                                          ; +0x138, 0x1800919b8\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x13a, 0x1800919ba\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x13f, 0x1800919bf\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x144, 0x1800919c4\nadd     rsp, 20h                                                       ; +0x149, 0x1800919c9\npop     r15                                                            ; +0x14d, 0x1800919cd\npop     r14                                                            ; +0x14f, 0x1800919cf\npop     rdi                                                            ; +0x151, 0x1800919d1\nretn                                                                   ; +0x152, 0x1800919d2", "xrefs": ["cocos2d::CCLabelBMFont::initWithString @ 0x18004a1c5", "cocos2d::CCSpriteBatchNode::create @ 0x180091508", "cocos2d::CCSpriteBatchNode::createWithTexture @ 0x1800915a5", "cocos2d::CCSpriteBatchNode::init @ 0x18009182b", "cocos2d::CCSpriteBatchNode::initWithFile @ 0x180091873", "cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800af9d6", "<???> @ 0x18014cf68", "<???> @ 0x1801c02dc"], "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"}