{"type": "func", "start": 6443035216, "end": 6443035559, "name": "cocos2d::CCSpriteBatchNode::insertQuadFromSprite", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::insertQuadFromSprite from 0x18008ea50 to 0x18008eba7 (343 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abf0a\n// > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac564\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b603c\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::insertQuadFromSprite(\n        cocos2d::CCSpriteBatchNode *this,\n        struct cocos2d::CCSprite *a2,\n        unsigned int a3)\n{\n  int v6; // edi\n  unsigned int v7; // edi\n  __int128 v8; // xmm0\n  __int128 v9; // xmm1\n  cocos2d::CCTextureAtlas *m_pobTextureAtlas; // rcx\n  __int128 v11; // xmm0\n  __int128 v12; // xmm1\n  __int128 v13; // xmm0\n  __int128 v14; // xmm1\n  __int64 v15; // rdx\n  struct cocos2d::_ccV3F_C4B_T2F_Quad v16; // [rsp+20h] [rbp-88h] BYREF\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 = *(_OWORD *)&a2->m_sQuad.tl.vertices.x;\n  a2->m_uAtlasIndex = a3;\n  v9 = *(_OWORD *)&a2->m_sQuad.tl.texCoords.u;\n  m_pobTextureAtlas = this->m_pobTextureAtlas;\n  *(_OWORD *)&v16.tl.vertices.x = v8;\n  v11 = *(_OWORD *)&a2->m_sQuad.bl.vertices.z;\n  *(_OWORD *)&v16.tl.texCoords.u = v9;\n  v12 = *(_OWORD *)&a2->m_sQuad.tr.vertices.x;\n  *(_OWORD *)&v16.bl.vertices.z = v11;\n  v13 = *(_OWORD *)&a2->m_sQuad.tr.texCoords.u;\n  *(_OWORD *)&v16.tr.vertices.x = v12;\n  v14 = *(_OWORD *)&a2->m_sQuad.br.vertices.z;\n  *(_OWORD *)&v16.tr.texCoords.u = v13;\n  *(_OWORD *)&v16.br.vertices.z = v14;\n  cocos2d::CCTextureAtlas::insertQuad(m_pobTextureAtlas, &v16, a3);\n  LOBYTE(v15) = 1;\n  ((void (__fastcall *)(struct cocos2d::CCSprite *, __int64))a2->setDirty)(a2, v15);\n  ((void (__fastcall *)(struct cocos2d::CCSprite *))a2->updateTransform)(a2);\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::insertQuadFromSprite from 0x18008ea50 to 0x18008eba7 (343 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abf0a\n; > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac564\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b603c\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_18], rbx                                              ; +0x0, 0x18008ea50\npush    rsi                                                            ; +0x5, 0x18008ea55\npush    rdi                                                            ; +0x6, 0x18008ea56\npush    r14                                                            ; +0x7, 0x18008ea57\nsub     rsp, 90h                                                       ; +0x9, 0x18008ea59\nmov     rax, cs:__security_cookie                                      ; +0x10, 0x18008ea60\nxor     rax, rsp                                                       ; +0x17, 0x18008ea67\nmov     [rsp+0A8h+var_28], rax                                         ; +0x1a, 0x18008ea6a\nmov     esi, r8d                                                       ; +0x22, 0x18008ea72\nmov     r14, rdx                                                       ; +0x25, 0x18008ea75\nmov     rbx, rcx                                                       ; +0x28, 0x18008ea78\nnop     dword ptr [rax+rax+00h]                                        ; +0x2b, 0x18008ea7b\nmov     rcx, [rbx+148h]                                                ; +0x30, 0x18008ea80\nmov     rax, [rcx]                                                     ; +0x37, 0x18008ea87\ncall    qword ptr [rax+50h]                                            ; +0x3a, 0x18008ea8a\ncmp     esi, eax                                                       ; +0x3d, 0x18008ea8d\njnb     short loc_18008EAB1                                            ; +0x3f, 0x18008ea8f\nmov     rcx, [rbx+148h]                                                ; +0x41, 0x18008ea91\nmov     rax, [rcx]                                                     ; +0x48, 0x18008ea98\ncall    qword ptr [rax+50h]                                            ; +0x4b, 0x18008ea9b\nmov     rcx, [rbx+148h]                                                ; +0x4e, 0x18008ea9e\nmov     edi, eax                                                       ; +0x55, 0x18008eaa5\nmov     rdx, [rcx]                                                     ; +0x57, 0x18008eaa7\ncall    qword ptr [rdx+48h]                                            ; +0x5a, 0x18008eaaa\ncmp     edi, eax                                                       ; +0x5d, 0x18008eaad\njnz     short loc_18008EAF1                                            ; +0x5f, 0x18008eaaf\nmov     rcx, [rbx+148h]                                                ; +0x61, 0x18008eab1\nmov     rax, [rcx]                                                     ; +0x68, 0x18008eab8\ncall    qword ptr [rax+50h]                                            ; +0x6b, 0x18008eabb\nlea     ecx, ds:4[rax*4]                                               ; +0x6e, 0x18008eabe\nmov     eax, 0AAAAAAABh                                                ; +0x75, 0x18008eac5\nmul     ecx                                                            ; +0x7a, 0x18008eaca\nmov     rcx, [rbx+148h]                                                ; +0x7c, 0x18008eacc\nmov     edi, edx                                                       ; +0x83, 0x18008ead3\nshr     edi, 1                                                         ; +0x85, 0x18008ead5\nmov     rax, [rcx]                                                     ; +0x87, 0x18008ead7\ncall    qword ptr [rax+50h]                                            ; +0x8a, 0x18008eada\ncmp     eax, edi                                                       ; +0x8d, 0x18008eadd\njnb     short loc_18008EA80                                            ; +0x8f, 0x18008eadf\nmov     rcx, [rbx+148h]; this                                          ; +0x91, 0x18008eae1\nmov     edx, edi; unsigned int                                         ; +0x98, 0x18008eae8\ncall    ?resizeCapacity@CCTextureAtlas@cocos2d@@QEAA_NI@Z; cocos2d::CCTextureAtlas::resizeCapacity(uint) ; +0x9a, 0x18008eaea\njmp     short loc_18008EA80                                            ; +0x9f, 0x18008eaef\nmov     rax, [r14]                                                     ; +0xa1, 0x18008eaf1\nmov     rdx, rbx                                                       ; +0xa4, 0x18008eaf4\nmov     rcx, r14                                                       ; +0xa7, 0x18008eaf7\ncall    qword ptr [rax+3B8h]                                           ; +0xaa, 0x18008eafa\nmovups  xmm0, xmmword ptr [r14+1CCh]                                   ; +0xb0, 0x18008eb00\nmov     [r14+168h], esi                                                ; +0xb8, 0x18008eb08\nmov     r8d, esi; unsigned int                                         ; +0xbf, 0x18008eb0f\nmovups  xmm1, xmmword ptr [r14+1DCh]                                   ; +0xc2, 0x18008eb12\nmov     rcx, [rbx+148h]; this                                          ; +0xca, 0x18008eb1a\nlea     rdx, [rsp+0A8h+var_88]; struct cocos2d::_ccV3F_C4B_T2F_Quad *  ; +0xd1, 0x18008eb21\nmovaps  [rsp+0A8h+var_88], xmm0                                        ; +0xd6, 0x18008eb26\nmovups  xmm0, xmmword ptr [r14+1ECh]                                   ; +0xdb, 0x18008eb2b\nmovaps  [rsp+0A8h+var_78], xmm1                                        ; +0xe3, 0x18008eb33\nmovups  xmm1, xmmword ptr [r14+1FCh]                                   ; +0xe8, 0x18008eb38\nmovaps  [rsp+0A8h+var_68], xmm0                                        ; +0xf0, 0x18008eb40\nmovups  xmm0, xmmword ptr [r14+20Ch]                                   ; +0xf5, 0x18008eb45\nmovaps  [rsp+0A8h+var_58], xmm1                                        ; +0xfd, 0x18008eb4d\nmovups  xmm1, xmmword ptr [r14+21Ch]                                   ; +0x102, 0x18008eb52\nmovaps  [rsp+0A8h+var_48], xmm0                                        ; +0x10a, 0x18008eb5a\nmovaps  [rsp+0A8h+var_38], xmm1                                        ; +0x10f, 0x18008eb5f\ncall    ?insertQuad@CCTextureAtlas@cocos2d@@QEAAXPEAU_ccV3F_C4B_T2F_Quad@2@I@Z; cocos2d::CCTextureAtlas::insertQuad(cocos2d::_ccV3F_C4B_T2F_Quad *,uint) ; +0x114, 0x18008eb64\nmov     rax, [r14]                                                     ; +0x119, 0x18008eb69\nmov     dl, 1                                                          ; +0x11c, 0x18008eb6c\nmov     rcx, r14                                                       ; +0x11e, 0x18008eb6e\ncall    qword ptr [rax+408h]                                           ; +0x121, 0x18008eb71\nmov     rax, [r14]                                                     ; +0x127, 0x18008eb77\nmov     rcx, r14                                                       ; +0x12a, 0x18008eb7a\ncall    qword ptr [rax+300h]                                           ; +0x12d, 0x18008eb7d\nmov     rcx, [rsp+0A8h+var_28]                                         ; +0x133, 0x18008eb83\nxor     rcx, rsp; StackCookie                                          ; +0x13b, 0x18008eb8b\ncall    __security_check_cookie                                        ; +0x13e, 0x18008eb8e\nmov     rbx, [rsp+0A8h+arg_18]                                         ; +0x143, 0x18008eb93\nadd     rsp, 90h                                                       ; +0x14b, 0x18008eb9b\npop     r14                                                            ; +0x152, 0x18008eba2\npop     rdi                                                            ; +0x154, 0x18008eba4\npop     rsi                                                            ; +0x155, 0x18008eba5\nretn                                                                   ; +0x156, 0x18008eba6", "xrefs": ["cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abf0a", "cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac564", "<???> @ 0x1801438a8", "<???> @ 0x1801b603c"], "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"}