{"type": "func", "start": 6443133088, "end": 6443133313, "name": "cocos2d::CCTextureAtlas::insertQuads", "pseudocode": "// \n// cocos2d::CCTextureAtlas::insertQuads from 0x1800a68a0 to 0x1800a6981 (225 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7d34\n// > <???> @ 0x1801b7d40\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::insertQuads(\n        cocos2d::CCTextureAtlas *this,\n        struct cocos2d::_ccV3F_C4B_T2F_Quad *a2,\n        unsigned int a3,\n        int a4)\n{\n  __int64 v5; // rbx\n  unsigned int v7; // ecx\n  unsigned int m_uMaxQuads; // eax\n  __int64 v9; // rsi\n  int v10; // ecx\n  __int64 i; // r8\n  cocos2d::ccV3F_C4B_T2F_Quad *m_pQuads; // rax\n  __int64 v13; // rdx\n  __int64 v14; // rcx\n\n  v5 = a3;\n  v7 = a4 + this->m_uTotalQuads;\n  m_uMaxQuads = this->m_uMaxQuads;\n  v9 = a3 + a4;\n  this->m_uTotalQuads = v7;\n  if ( m_uMaxQuads <= v7 )\n    m_uMaxQuads = v7;\n  this->m_uMaxQuads = m_uMaxQuads;\n  v10 = v7 - a3 - a4 - 1;\n  if ( v10 > 0 )\n    memmove(&this->m_pQuads[v9], &this->m_pQuads[a3], 96LL * v10);\n  for ( i = 0;\n        (unsigned int)v5 < (unsigned int)v9;\n        *(_OWORD *)&m_pQuads[v14].br.vertices.z = *(_OWORD *)&a2[v13].br.vertices.z )\n  {\n    m_pQuads = this->m_pQuads;\n    v13 = i;\n    v14 = v5;\n    i = (unsigned int)(i + 1);\n    v5 = (unsigned int)(v5 + 1);\n    *(_OWORD *)&m_pQuads[v14].tl.vertices.x = *(_OWORD *)&a2[v13].tl.vertices.x;\n    *(_OWORD *)&m_pQuads[v14].tl.texCoords.u = *(_OWORD *)&a2[v13].tl.texCoords.u;\n    *(_OWORD *)&m_pQuads[v14].bl.vertices.z = *(_OWORD *)&a2[v13].bl.vertices.z;\n    *(_OWORD *)&m_pQuads[v14].tr.vertices.x = *(_OWORD *)&a2[v13].tr.vertices.x;\n    *(_OWORD *)&m_pQuads[v14].tr.texCoords.u = *(_OWORD *)&a2[v13].tr.texCoords.u;\n  }\n  this->m_bDirty = 1;\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::insertQuads from 0x1800a68a0 to 0x1800a6981 (225 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7d34\n; > <???> @ 0x1801b7d40\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, 0x1800a68a0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800a68a5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800a68aa\npush    rdi                                                            ; +0xf, 0x1800a68af\nsub     rsp, 20h                                                       ; +0x10, 0x1800a68b0\nmov     rdi, rcx                                                       ; +0x14, 0x1800a68b4\nmov     ebx, r8d                                                       ; +0x17, 0x1800a68b7\nmov     ecx, [rcx+4Ch]                                                 ; +0x1a, 0x1800a68ba\nmov     rbp, rdx                                                       ; +0x1d, 0x1800a68bd\nadd     ecx, r9d                                                       ; +0x20, 0x1800a68c0\nmov     eax, [rdi+68h]                                                 ; +0x23, 0x1800a68c3\nlea     esi, [rbx+r9]                                                  ; +0x26, 0x1800a68c6\ncmp     eax, ecx                                                       ; +0x2a, 0x1800a68ca\nmov     [rdi+4Ch], ecx                                                 ; +0x2c, 0x1800a68cc\ncmovbe  eax, ecx                                                       ; +0x2f, 0x1800a68cf\nsub     ecx, r8d                                                       ; +0x32, 0x1800a68d2\nsub     ecx, r9d                                                       ; +0x35, 0x1800a68d5\nmov     [rdi+68h], eax                                                 ; +0x38, 0x1800a68d8\ndec     ecx                                                            ; +0x3b, 0x1800a68db\ntest    ecx, ecx                                                       ; +0x3d, 0x1800a68dd\njle     short loc_1800A6909                                            ; +0x3f, 0x1800a68df\nmovsxd  rax, ecx                                                       ; +0x41, 0x1800a68e1\nlea     rdx, [rbx+rbx*2]                                               ; +0x44, 0x1800a68e4\nshl     rdx, 5                                                         ; +0x48, 0x1800a68e8\nlea     rcx, [rsi+rsi*2]                                               ; +0x4c, 0x1800a68ec\nadd     rdx, [rdi+60h]; Src                                            ; +0x50, 0x1800a68f0\nshl     rcx, 5                                                         ; +0x54, 0x1800a68f4\nadd     rcx, [rdi+60h]; void *                                         ; +0x58, 0x1800a68f8\nlea     r8, [rax+rax*2]                                                ; +0x5c, 0x1800a68fc\nshl     r8, 5; Size                                                    ; +0x60, 0x1800a6900\ncall    memmove                                                        ; +0x64, 0x1800a6904\nxor     r8d, r8d                                                       ; +0x69, 0x1800a6909\ncmp     ebx, esi                                                       ; +0x6c, 0x1800a690c\njnb     short loc_1800A6968                                            ; +0x6e, 0x1800a690e\nmov     rax, [rdi+60h]                                                 ; +0x70, 0x1800a6910\nlea     rdx, [r8+r8*2]                                                 ; +0x74, 0x1800a6914\nshl     rdx, 5                                                         ; +0x78, 0x1800a6918\nlea     rcx, [rbx+rbx*2]                                               ; +0x7c, 0x1800a691c\nshl     rcx, 5                                                         ; +0x80, 0x1800a6920\nlea     r8d, [r8+1]                                                    ; +0x84, 0x1800a6924\ninc     ebx                                                            ; +0x88, 0x1800a6928\nmovups  xmm0, xmmword ptr [rdx+rbp]                                    ; +0x8a, 0x1800a692a\nmovups  xmmword ptr [rcx+rax], xmm0                                    ; +0x8e, 0x1800a692e\nmovups  xmm1, xmmword ptr [rdx+rbp+10h]                                ; +0x92, 0x1800a6932\nmovups  xmmword ptr [rcx+rax+10h], xmm1                                ; +0x97, 0x1800a6937\nmovups  xmm0, xmmword ptr [rdx+rbp+20h]                                ; +0x9c, 0x1800a693c\nmovups  xmmword ptr [rcx+rax+20h], xmm0                                ; +0xa1, 0x1800a6941\nmovups  xmm1, xmmword ptr [rdx+rbp+30h]                                ; +0xa6, 0x1800a6946\nmovups  xmmword ptr [rcx+rax+30h], xmm1                                ; +0xab, 0x1800a694b\nmovups  xmm0, xmmword ptr [rdx+rbp+40h]                                ; +0xb0, 0x1800a6950\nmovups  xmmword ptr [rcx+rax+40h], xmm0                                ; +0xb5, 0x1800a6955\nmovups  xmm1, xmmword ptr [rdx+rbp+50h]                                ; +0xba, 0x1800a695a\nmovups  xmmword ptr [rcx+rax+50h], xmm1                                ; +0xbf, 0x1800a695f\ncmp     ebx, esi                                                       ; +0xc4, 0x1800a6964\njb      short loc_1800A6910                                            ; +0xc6, 0x1800a6966\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xc8, 0x1800a6968\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xcd, 0x1800a696d\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xd2, 0x1800a6972\nmov     byte ptr [rdi+48h], 1                                          ; +0xd7, 0x1800a6977\nadd     rsp, 20h                                                       ; +0xdb, 0x1800a697b\npop     rdi                                                            ; +0xdf, 0x1800a697f\nretn                                                                   ; +0xe0, 0x1800a6980", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b7d34", "<???> @ 0x1801b7d40"], "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"}