{"type": "func", "start": 6443037872, "end": 6443038085, "name": "cocos2d::CCSpriteBatchNode::updateQuadFromSprite", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::updateQuadFromSprite from 0x18008f4b0 to 0x18008f585 (213 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b61bc\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\nvoid __fastcall cocos2d::CCSpriteBatchNode::updateQuadFromSprite(\n        cocos2d::CCSpriteBatchNode *this,\n        struct cocos2d::CCSprite *a2,\n        unsigned int a3)\n{\n  int v6; // edi\n  unsigned int v7; // edi\n  cocos2d::CCSprite_vtbl *v8; // rax\n  __int64 v9; // rdx\n\n  while ( 1 )\n  {\n    if ( a3 < ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getCapacity)(this->m_pobTextureAtlas) )\n    {\n      v6 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getCapacity)(this->m_pobTextureAtlas);\n      if ( v6 != ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getTotalQuads)(this->m_pobTextureAtlas) )\n        break;\n    }\n    v7 = (4\n        * ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getCapacity)(this->m_pobTextureAtlas)\n        + 4)\n       / 3;\n    if ( ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getCapacity)(this->m_pobTextureAtlas) < v7 )\n      cocos2d::CCTextureAtlas::resizeCapacity(this->m_pobTextureAtlas, v7);\n  }\n  ((void (__fastcall *)(struct cocos2d::CCSprite *, cocos2d::CCSpriteBatchNode *))a2->setBatchNode)(a2, this);\n  v8 = a2->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  LOBYTE(v9) = 1;\n  a2->m_uAtlasIndex = a3;\n  ((void (__fastcall *)(struct cocos2d::CCSprite *, __int64))v8->setDirty)(a2, v9);\n  ((void (__fastcall *)(struct cocos2d::CCSprite *))a2->updateTransform)(a2);\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::updateQuadFromSprite from 0x18008f4b0 to 0x18008f585 (213 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b61bc\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, 0x18008f4b0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18008f4b5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18008f4ba\npush    rdi                                                            ; +0xf, 0x18008f4bf\nsub     rsp, 20h                                                       ; +0x10, 0x18008f4c0\nmov     ebp, r8d                                                       ; +0x14, 0x18008f4c4\nmov     rsi, rdx                                                       ; +0x17, 0x18008f4c7\nmov     rbx, rcx                                                       ; +0x1a, 0x18008f4ca\nnop     dword ptr [rax]                                                ; +0x1d, 0x18008f4cd\nmov     rcx, [rbx+148h]                                                ; +0x20, 0x18008f4d0\nmov     rax, [rcx]                                                     ; +0x27, 0x18008f4d7\ncall    qword ptr [rax+50h]                                            ; +0x2a, 0x18008f4da\ncmp     ebp, eax                                                       ; +0x2d, 0x18008f4dd\njnb     short loc_18008F501                                            ; +0x2f, 0x18008f4df\nmov     rcx, [rbx+148h]                                                ; +0x31, 0x18008f4e1\nmov     rax, [rcx]                                                     ; +0x38, 0x18008f4e8\ncall    qword ptr [rax+50h]                                            ; +0x3b, 0x18008f4eb\nmov     rcx, [rbx+148h]                                                ; +0x3e, 0x18008f4ee\nmov     edi, eax                                                       ; +0x45, 0x18008f4f5\nmov     rdx, [rcx]                                                     ; +0x47, 0x18008f4f7\ncall    qword ptr [rdx+48h]                                            ; +0x4a, 0x18008f4fa\ncmp     edi, eax                                                       ; +0x4d, 0x18008f4fd\njnz     short loc_18008F541                                            ; +0x4f, 0x18008f4ff\nmov     rcx, [rbx+148h]                                                ; +0x51, 0x18008f501\nmov     rax, [rcx]                                                     ; +0x58, 0x18008f508\ncall    qword ptr [rax+50h]                                            ; +0x5b, 0x18008f50b\nlea     ecx, ds:4[rax*4]                                               ; +0x5e, 0x18008f50e\nmov     eax, 0AAAAAAABh                                                ; +0x65, 0x18008f515\nmul     ecx                                                            ; +0x6a, 0x18008f51a\nmov     rcx, [rbx+148h]                                                ; +0x6c, 0x18008f51c\nmov     edi, edx                                                       ; +0x73, 0x18008f523\nshr     edi, 1                                                         ; +0x75, 0x18008f525\nmov     rax, [rcx]                                                     ; +0x77, 0x18008f527\ncall    qword ptr [rax+50h]                                            ; +0x7a, 0x18008f52a\ncmp     eax, edi                                                       ; +0x7d, 0x18008f52d\njnb     short loc_18008F4D0                                            ; +0x7f, 0x18008f52f\nmov     rcx, [rbx+148h]; this                                          ; +0x81, 0x18008f531\nmov     edx, edi; unsigned int                                         ; +0x88, 0x18008f538\ncall    ?resizeCapacity@CCTextureAtlas@cocos2d@@QEAA_NI@Z; cocos2d::CCTextureAtlas::resizeCapacity(uint) ; +0x8a, 0x18008f53a\njmp     short loc_18008F4D0                                            ; +0x8f, 0x18008f53f\nmov     rax, [rsi]                                                     ; +0x91, 0x18008f541\nmov     rdx, rbx                                                       ; +0x94, 0x18008f544\nmov     rcx, rsi                                                       ; +0x97, 0x18008f547\ncall    qword ptr [rax+3B8h]                                           ; +0x9a, 0x18008f54a\nmov     rax, [rsi]                                                     ; +0xa0, 0x18008f550\nmov     dl, 1                                                          ; +0xa3, 0x18008f553\nmov     rcx, rsi                                                       ; +0xa5, 0x18008f555\nmov     [rsi+168h], ebp                                                ; +0xa8, 0x18008f558\ncall    qword ptr [rax+408h]                                           ; +0xae, 0x18008f55e\nmov     rax, [rsi]                                                     ; +0xb4, 0x18008f564\nmov     rcx, rsi                                                       ; +0xb7, 0x18008f567\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xba, 0x18008f56a\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xbf, 0x18008f56f\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xc4, 0x18008f574\nadd     rsp, 20h                                                       ; +0xc9, 0x18008f579\npop     rdi                                                            ; +0xcd, 0x18008f57d\njmp     qword ptr [rax+300h]                                           ; +0xce, 0x18008f57e", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b61bc"], "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"}