{"type": "func", "start": 6443132624, "end": 6443132801, "name": "cocos2d::CCTextureAtlas::insertQuad", "pseudocode": "// \n// cocos2d::CCTextureAtlas::insertQuad from 0x1800a66d0 to 0x1800a6781 (177 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCSpriteBatchNode::appendChild @ 0x18008e043\n// > cocos2d::CCSpriteBatchNode::insertChild @ 0x18008e888\n// > cocos2d::CCSpriteBatchNode::insertQuadFromSprite @ 0x18008eb64\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7d28\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::CCTextureAtlas::insertQuad(\n        cocos2d::CCTextureAtlas *this,\n        struct cocos2d::_ccV3F_C4B_T2F_Quad *a2,\n        unsigned int a3)\n{\n  unsigned int v5; // ecx\n  unsigned int m_uMaxQuads; // eax\n  unsigned int v7; // ecx\n  unsigned __int64 v8; // rbx\n  cocos2d::ccV3F_C4B_T2F_Quad *m_pQuads; // rax\n\n  v5 = this->m_uTotalQuads + 1;\n  m_uMaxQuads = this->m_uMaxQuads;\n  this->m_uTotalQuads = v5;\n  if ( m_uMaxQuads <= v5 )\n    m_uMaxQuads = v5;\n  this->m_uMaxQuads = m_uMaxQuads;\n  v7 = v5 - a3 - 1;\n  v8 = a3;\n  if ( v7 )\n    memmove(&this->m_pQuads[a3 + 1], &this->m_pQuads[v8], 96LL * v7);\n  m_pQuads = this->m_pQuads;\n  *(_OWORD *)&m_pQuads[v8].tl.vertices.x = *(_OWORD *)&a2->tl.vertices.x;\n  *(_OWORD *)&m_pQuads[v8].tl.texCoords.u = *(_OWORD *)&a2->tl.texCoords.u;\n  *(_OWORD *)&m_pQuads[v8].bl.vertices.z = *(_OWORD *)&a2->bl.vertices.z;\n  *(_OWORD *)&m_pQuads[v8].tr.vertices.x = *(_OWORD *)&a2->tr.vertices.x;\n  *(_OWORD *)&m_pQuads[v8].tr.texCoords.u = *(_OWORD *)&a2->tr.texCoords.u;\n  *(_OWORD *)&m_pQuads[v8].br.vertices.z = *(_OWORD *)&a2->br.vertices.z;\n  this->m_bDirty = 1;\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::insertQuad from 0x1800a66d0 to 0x1800a6781 (177 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCSpriteBatchNode::appendChild @ 0x18008e043\n; > cocos2d::CCSpriteBatchNode::insertChild @ 0x18008e888\n; > cocos2d::CCSpriteBatchNode::insertQuadFromSprite @ 0x18008eb64\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7d28\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, 0x1800a66d0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a66d5\npush    rdi                                                            ; +0xa, 0x1800a66da\nsub     rsp, 20h                                                       ; +0xb, 0x1800a66db\nmov     rsi, rcx                                                       ; +0xf, 0x1800a66df\nmov     r10d, r8d                                                      ; +0x12, 0x1800a66e2\nmov     ecx, [rcx+4Ch]                                                 ; +0x15, 0x1800a66e5\nmov     rdi, rdx                                                       ; +0x18, 0x1800a66e8\ninc     ecx                                                            ; +0x1b, 0x1800a66eb\nmov     eax, [rsi+68h]                                                 ; +0x1d, 0x1800a66ed\nlea     rbx, [r10+r10*2]                                               ; +0x20, 0x1800a66f0\ncmp     eax, ecx                                                       ; +0x24, 0x1800a66f4\nmov     [rsi+4Ch], ecx                                                 ; +0x26, 0x1800a66f6\ncmovbe  eax, ecx                                                       ; +0x29, 0x1800a66f9\nsub     ecx, r8d                                                       ; +0x2c, 0x1800a66fc\nmov     [rsi+68h], eax                                                 ; +0x2f, 0x1800a66ff\nsub     ecx, 1                                                         ; +0x32, 0x1800a6702\njz      short loc_1800A6731                                            ; +0x35, 0x1800a6705\nmov     r9, [rsi+60h]                                                  ; +0x37, 0x1800a6707\nlea     r8, [rcx+rcx*2]                                                ; +0x3b, 0x1800a670b\nlea     eax, [r10+1]                                                   ; +0x3f, 0x1800a670f\nshl     rbx, 5                                                         ; +0x43, 0x1800a6713\nlea     rcx, [rax+rax*2]                                               ; +0x47, 0x1800a6717\nshl     r8, 5; Size                                                    ; +0x4b, 0x1800a671b\nshl     rcx, 5                                                         ; +0x4f, 0x1800a671f\nadd     rcx, r9; void *                                                ; +0x53, 0x1800a6723\nlea     rdx, [rbx+r9]; Src                                             ; +0x56, 0x1800a6726\ncall    memmove                                                        ; +0x5a, 0x1800a672a\njmp     short loc_1800A6735                                            ; +0x5f, 0x1800a672f\nshl     rbx, 5                                                         ; +0x61, 0x1800a6731\nmovups  xmm0, xmmword ptr [rdi]                                        ; +0x65, 0x1800a6735\nmov     rax, [rsi+60h]                                                 ; +0x68, 0x1800a6738\nmovups  xmmword ptr [rbx+rax], xmm0                                    ; +0x6c, 0x1800a673c\nmovups  xmm1, xmmword ptr [rdi+10h]                                    ; +0x70, 0x1800a6740\nmovups  xmmword ptr [rbx+rax+10h], xmm1                                ; +0x74, 0x1800a6744\nmovups  xmm0, xmmword ptr [rdi+20h]                                    ; +0x79, 0x1800a6749\nmovups  xmmword ptr [rbx+rax+20h], xmm0                                ; +0x7d, 0x1800a674d\nmovups  xmm1, xmmword ptr [rdi+30h]                                    ; +0x82, 0x1800a6752\nmovups  xmmword ptr [rbx+rax+30h], xmm1                                ; +0x86, 0x1800a6756\nmovups  xmm0, xmmword ptr [rdi+40h]                                    ; +0x8b, 0x1800a675b\nmovups  xmmword ptr [rbx+rax+40h], xmm0                                ; +0x8f, 0x1800a675f\nmovups  xmm1, xmmword ptr [rdi+50h]                                    ; +0x94, 0x1800a6764\nmovups  xmmword ptr [rbx+rax+50h], xmm1                                ; +0x98, 0x1800a6768\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9d, 0x1800a676d\nmov     byte ptr [rsi+48h], 1                                          ; +0xa2, 0x1800a6772\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xa6, 0x1800a6776\nadd     rsp, 20h                                                       ; +0xab, 0x1800a677b\npop     rdi                                                            ; +0xaf, 0x1800a677f\nretn                                                                   ; +0xb0, 0x1800a6780", "xrefs": ["cocos2d::CCSpriteBatchNode::appendChild @ 0x18008e043", "cocos2d::CCSpriteBatchNode::insertChild @ 0x18008e888", "cocos2d::CCSpriteBatchNode::insertQuadFromSprite @ 0x18008eb64", "<???> @ 0x1801438a8", "<???> @ 0x1801b7d28"], "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"}