{"type": "func", "start": 6443034192, "end": 6443034530, "name": "cocos2d::CCSpriteBatchNode::initWithTexture", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::initWithTexture from 0x18008e650 to 0x18008e7a2 (338 bytes)\n// \n// 8 xrefs:\n// > cocos2d::CCLabelBMFont::initWithString @ 0x180048bb2\n// > cocos2d::CCSpriteBatchNode::create @ 0x18008e2d8\n// > cocos2d::CCSpriteBatchNode::createWithTexture @ 0x18008e375\n// > cocos2d::CCSpriteBatchNode::init @ 0x18008e5fb\n// > cocos2d::CCSpriteBatchNode::initWithFile @ 0x18008e643\n// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800ac1eb\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b6024\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=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  bool isDirty; // al\n  GLenum v12; // ecx\n  cocos2d::CCArray *v13; // rax\n  cocos2d::CCArray *v14; // rax\n  cocos2d::CCArray *v15; // rax\n  cocos2d::CCSpriteBatchNode_vtbl *v16; // rbx\n  cocos2d::CCShaderCache *v17; // rax\n  struct cocos2d::CCGLProgram *v18; // rax\n\n  this->m_blendFunc.src = 1;\n  this->m_blendFunc.dst = 771;\n  v6 = (cocos2d::CCTextureAtlas *)operator new(0x70u);\n  v7 = nullptr;\n  if ( v6 )\n    v8 = (cocos2d::CCTextureAtlas *)cocos2d::CCTextureAtlas::CCTextureAtlas(v6);\n  else\n    v8 = nullptr;\n  this->m_pobTextureAtlas = v8;\n  v9 = 29;\n  if ( a3 )\n    v9 = a3;\n  cocos2d::CCTextureAtlas::initWithTexture(v8, a2, v9);\n  v10 = (cocos2d::CCCamera *)((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getTexture)(this->m_pobTextureAtlas);\n  isDirty = cocos2d::CCCamera::isDirty(v10);\n  v12 = 770;\n  if ( isDirty )\n    v12 = 1;\n  this->m_blendFunc.src = v12;\n  this->m_blendFunc.dst = 771;\n  v13 = (cocos2d::CCArray *)operator new(0x40u);\n  if ( v13 )\n    v14 = cocos2d::CCArray::CCArray(v13);\n  else\n    v14 = nullptr;\n  this->m_pChildren = v14;\n  cocos2d::CCArray::initWithCapacity(v14, v9);\n  v15 = (cocos2d::CCArray *)operator new(0x40u);\n  if ( v15 )\n    v7 = cocos2d::CCArray::CCArray(v15);\n  this->m_pobDescendants = v7;\n  cocos2d::CCArray::initWithCapacity(v7, v9);\n  *(_WORD *)&this->m_bManualSortChildren = 0;\n  v16 = this->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v17 = cocos2d::CCShaderCache::sharedShaderCache();\n  v18 = cocos2d::CCShaderCache::programForKey(v17, \"ShaderPositionTextureColor\");\n  ((void (__fastcall *)(cocos2d::CCSpriteBatchNode *, struct cocos2d::CCGLProgram *))v16->setShaderProgram)(this, v18);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::initWithTexture from 0x18008e650 to 0x18008e7a2 (338 bytes)\n; \n; 8 xrefs:\n; > cocos2d::CCLabelBMFont::initWithString @ 0x180048bb2\n; > cocos2d::CCSpriteBatchNode::create @ 0x18008e2d8\n; > cocos2d::CCSpriteBatchNode::createWithTexture @ 0x18008e375\n; > cocos2d::CCSpriteBatchNode::init @ 0x18008e5fb\n; > cocos2d::CCSpriteBatchNode::initWithFile @ 0x18008e643\n; > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800ac1eb\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b6024\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_8], rbx                                               ; +0x0, 0x18008e650\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18008e655\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18008e65a\npush    rdi                                                            ; +0xf, 0x18008e65f\npush    r14                                                            ; +0x10, 0x18008e660\npush    r15                                                            ; +0x12, 0x18008e662\nsub     rsp, 20h                                                       ; +0x14, 0x18008e664\nmov     ebp, r8d                                                       ; +0x18, 0x18008e668\nmov     r14, rdx                                                       ; +0x1b, 0x18008e66b\nmov     rdi, rcx                                                       ; +0x1e, 0x18008e66e\nmov     r15d, 1                                                        ; +0x21, 0x18008e671\nmov     [rcx+150h], r15d                                               ; +0x27, 0x18008e677\nmov     dword ptr [rcx+154h], 303h                                     ; +0x2e, 0x18008e67e\nlea     ecx, [r15+6Fh]; Size                                           ; +0x38, 0x18008e688\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3c, 0x18008e68c\nmov     [rsp+38h+arg_0], rax                                           ; +0x41, 0x18008e691\nxor     ebx, ebx                                                       ; +0x46, 0x18008e696\ntest    rax, rax                                                       ; +0x48, 0x18008e698\njz      short loc_18008E6A7                                            ; +0x4b, 0x18008e69b\nmov     rcx, rax; this                                                 ; +0x4d, 0x18008e69d\ncall    ??0CCTextureAtlas@cocos2d@@QEAA@XZ; cocos2d::CCTextureAtlas::CCTextureAtlas(void) ; +0x50, 0x18008e6a0\njmp     short loc_18008E6AA                                            ; +0x55, 0x18008e6a5\nmov     rax, rbx                                                       ; +0x57, 0x18008e6a7\nmov     [rdi+148h], rax                                                ; +0x5a, 0x18008e6aa\nmov     esi, 1Dh                                                       ; +0x61, 0x18008e6b1\ntest    ebp, ebp                                                       ; +0x66, 0x18008e6b6\ncmovnz  esi, ebp                                                       ; +0x68, 0x18008e6b8\nmov     r8d, esi; unsigned int                                         ; +0x6b, 0x18008e6bb\nmov     rdx, r14; struct cocos2d::CCTexture2D *                        ; +0x6e, 0x18008e6be\nmov     rcx, rax; this                                                 ; +0x71, 0x18008e6c1\ncall    ?initWithTexture@CCTextureAtlas@cocos2d@@QEAA_NPEAVCCTexture2D@2@I@Z; cocos2d::CCTextureAtlas::initWithTexture(cocos2d::CCTexture2D *,uint) ; +0x74, 0x18008e6c4\nmov     rcx, [rdi+148h]                                                ; +0x79, 0x18008e6c9\nmov     rax, [rcx]                                                     ; +0x80, 0x18008e6d0\ncall    qword ptr [rax+58h]                                            ; +0x83, 0x18008e6d3\nmov     rcx, rax; this                                                 ; +0x86, 0x18008e6d6\ncall    ?isDirty@CCCamera@cocos2d@@QEAA_NXZ; cocos2d::CCCamera::isDirty(void) ; +0x89, 0x18008e6d9\nmov     ecx, 302h                                                      ; +0x8e, 0x18008e6de\ntest    al, al                                                         ; +0x93, 0x18008e6e3\ncmovnz  ecx, r15d                                                      ; +0x95, 0x18008e6e5\nmov     [rdi+150h], ecx                                                ; +0x99, 0x18008e6e9\nmov     dword ptr [rdi+154h], 303h                                     ; +0x9f, 0x18008e6ef\nmov     ecx, 40h ; '@'; Size                                           ; +0xa9, 0x18008e6f9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xae, 0x18008e6fe\nmov     [rsp+38h+arg_0], rax                                           ; +0xb3, 0x18008e703\ntest    rax, rax                                                       ; +0xb8, 0x18008e708\njz      short loc_18008E717                                            ; +0xbb, 0x18008e70b\nmov     rcx, rax; this                                                 ; +0xbd, 0x18008e70d\ncall    ??0CCArray@cocos2d@@QEAA@XZ; cocos2d::CCArray::CCArray(void)   ; +0xc0, 0x18008e710\njmp     short loc_18008E71A                                            ; +0xc5, 0x18008e715\nmov     rax, rbx                                                       ; +0xc7, 0x18008e717\nmov     [rdi+0D0h], rax                                                ; +0xca, 0x18008e71a\nmov     edx, esi; unsigned int                                         ; +0xd1, 0x18008e721\nmov     rcx, rax; this                                                 ; +0xd3, 0x18008e723\ncall    ?initWithCapacity@CCArray@cocos2d@@QEAA_NI@Z; cocos2d::CCArray::initWithCapacity(uint) ; +0xd6, 0x18008e726\nmov     ecx, 40h ; '@'; Size                                           ; +0xdb, 0x18008e72b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xe0, 0x18008e730\nmov     [rsp+38h+arg_0], rax                                           ; +0xe5, 0x18008e735\ntest    rax, rax                                                       ; +0xea, 0x18008e73a\njz      short loc_18008E74A                                            ; +0xed, 0x18008e73d\nmov     rcx, rax; this                                                 ; +0xef, 0x18008e73f\ncall    ??0CCArray@cocos2d@@QEAA@XZ; cocos2d::CCArray::CCArray(void)   ; +0xf2, 0x18008e742\nmov     rbx, rax                                                       ; +0xf7, 0x18008e747\nmov     [rdi+158h], rbx                                                ; +0xfa, 0x18008e74a\nmov     edx, esi; unsigned int                                         ; +0x101, 0x18008e751\nmov     rcx, rbx; this                                                 ; +0x103, 0x18008e753\ncall    ?initWithCapacity@CCArray@cocos2d@@QEAA_NI@Z; cocos2d::CCArray::initWithCapacity(uint) ; +0x106, 0x18008e756\nmov     word ptr [rdi+160h], 0                                         ; +0x10b, 0x18008e75b\nmov     rbx, [rdi]                                                     ; +0x114, 0x18008e764\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0x117, 0x18008e767\nmov     rcx, rax; this                                                 ; +0x11c, 0x18008e76c\nlea     rdx, aShaderposition_3; \"ShaderPositionTextureColor\"           ; +0x11f, 0x18008e76f\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x126, 0x18008e776\nmov     rdx, rax                                                       ; +0x12b, 0x18008e77b\nmov     rcx, rdi                                                       ; +0x12e, 0x18008e77e\ncall    qword ptr [rbx+280h]                                           ; +0x131, 0x18008e781\nmov     al, 1                                                          ; +0x137, 0x18008e787\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x139, 0x18008e789\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x13e, 0x18008e78e\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x143, 0x18008e793\nadd     rsp, 20h                                                       ; +0x148, 0x18008e798\npop     r15                                                            ; +0x14c, 0x18008e79c\npop     r14                                                            ; +0x14e, 0x18008e79e\npop     rdi                                                            ; +0x150, 0x18008e7a0\nretn                                                                   ; +0x151, 0x18008e7a1", "xrefs": ["cocos2d::CCLabelBMFont::initWithString @ 0x180048bb2", "cocos2d::CCSpriteBatchNode::create @ 0x18008e2d8", "cocos2d::CCSpriteBatchNode::createWithTexture @ 0x18008e375", "cocos2d::CCSpriteBatchNode::init @ 0x18008e5fb", "cocos2d::CCSpriteBatchNode::initWithFile @ 0x18008e643", "cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800ac1eb", "<???> @ 0x1801438a8", "<???> @ 0x1801b6024"], "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"}