{"type": "func", "start": 6443132816, "end": 6443133088, "name": "cocos2d::CCTextureAtlas::insertQuadFromIndex", "pseudocode": "// \n// cocos2d::CCTextureAtlas::insertQuadFromIndex from 0x1800a6790 to 0x1800a68a0 (272 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7d34\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::insertQuadFromIndex(\n        cocos2d::CCTextureAtlas *this,\n        unsigned int a2,\n        unsigned int a3)\n{\n  __int64 v3; // rbx\n  unsigned int v4; // r11d\n  unsigned int v5; // eax\n  __int64 v7; // r8\n  unsigned int v8; // r10d\n  cocos2d::ccV3F_C4B_T2F_Quad *m_pQuads; // r9\n  __int64 v10; // rcx\n  cocos2d::ccV3F_C4B_T2F_Quad *v11; // rax\n  __int64 v12; // rcx\n  __int128 v13; // [rsp+20h] [rbp-68h]\n  __int128 v14; // [rsp+30h] [rbp-58h]\n  __int128 v15; // [rsp+40h] [rbp-48h]\n  __int128 v16; // [rsp+50h] [rbp-38h]\n  __int128 v17; // [rsp+60h] [rbp-28h]\n  __int128 v18; // [rsp+70h] [rbp-18h]\n\n  if ( a2 != a3 )\n  {\n    v3 = a3;\n    v4 = a2 + 1;\n    v5 = a3 - a2;\n    v7 = a2 - a3;\n    v8 = a2;\n    if ( !(_DWORD)v7 )\n      v7 = v5;\n    if ( a2 > (unsigned int)v3 )\n    {\n      v8 = v3 + 1;\n      v4 = v3;\n    }\n    m_pQuads = this->m_pQuads;\n    v10 = a2;\n    v13 = *(_OWORD *)&m_pQuads[v10].tl.vertices.x;\n    v14 = *(_OWORD *)&m_pQuads[v10].tl.texCoords.u;\n    v15 = *(_OWORD *)&m_pQuads[v10].bl.vertices.z;\n    v16 = *(_OWORD *)&m_pQuads[v10].tr.vertices.x;\n    v17 = *(_OWORD *)&m_pQuads[v10].tr.texCoords.u;\n    v18 = *(_OWORD *)&m_pQuads[v10].br.vertices.z;\n    memmove(&m_pQuads[v8], &m_pQuads[v4], 96 * v7);\n    v11 = this->m_pQuads;\n    v12 = v3;\n    *(_OWORD *)&v11[v12].tl.vertices.x = v13;\n    *(_OWORD *)&v11[v12].tl.texCoords.u = v14;\n    *(_OWORD *)&v11[v12].bl.vertices.z = v15;\n    *(_OWORD *)&v11[v12].tr.vertices.x = v16;\n    *(_OWORD *)&v11[v12].tr.texCoords.u = v17;\n    *(_OWORD *)&v11[v12].br.vertices.z = v18;\n    this->m_bDirty = 1;\n  }\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::insertQuadFromIndex from 0x1800a6790 to 0x1800a68a0 (272 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7d34\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\ncmp     edx, r8d                                                       ; +0x0, 0x1800a6790\njz      locret_1800A689F                                               ; +0x3, 0x1800a6793\nmov     [rsp+arg_0], rbx                                               ; +0x9, 0x1800a6799\npush    rdi                                                            ; +0xe, 0x1800a679e\nsub     rsp, 80h                                                       ; +0xf, 0x1800a679f\nmov     ebx, r8d                                                       ; +0x16, 0x1800a67a6\nlea     r11d, [rdx+1]                                                  ; +0x19, 0x1800a67a9\nmov     eax, ebx                                                       ; +0x1d, 0x1800a67ad\nmov     r8d, edx                                                       ; +0x1f, 0x1800a67af\nsub     eax, edx                                                       ; +0x22, 0x1800a67b2\nmov     rdi, rcx                                                       ; +0x24, 0x1800a67b4\nsub     r8d, ebx                                                       ; +0x27, 0x1800a67b7\nmov     r10d, edx                                                      ; +0x2a, 0x1800a67ba\ncmovz   r8d, eax                                                       ; +0x2d, 0x1800a67bd\ncmp     edx, ebx                                                       ; +0x31, 0x1800a67c1\njbe     short loc_1800A67CC                                            ; +0x33, 0x1800a67c3\nlea     r10d, [rbx+1]                                                  ; +0x35, 0x1800a67c5\nmov     r11d, ebx                                                      ; +0x39, 0x1800a67c9\nmov     r9, [rcx+60h]                                                  ; +0x3c, 0x1800a67cc\nlea     r8, [r8+r8*2]                                                  ; +0x40, 0x1800a67d0\nmov     eax, edx                                                       ; +0x44, 0x1800a67d4\nshl     r8, 5; Size                                                    ; +0x46, 0x1800a67d6\nlea     rcx, [rax+rax*2]                                               ; +0x4a, 0x1800a67da\nmov     eax, r11d                                                      ; +0x4e, 0x1800a67de\nshl     rcx, 5                                                         ; +0x51, 0x1800a67e1\nlea     rdx, [rax+rax*2]                                               ; +0x55, 0x1800a67e5\nmov     eax, r10d                                                      ; +0x59, 0x1800a67e9\nmovups  xmm0, xmmword ptr [rcx+r9]                                     ; +0x5c, 0x1800a67ec\nshl     rdx, 5                                                         ; +0x61, 0x1800a67f1\nadd     rdx, r9; Src                                                   ; +0x65, 0x1800a67f5\nmovups  [rsp+88h+var_68], xmm0                                         ; +0x68, 0x1800a67f8\nmovups  xmm0, xmmword ptr [rcx+r9+10h]                                 ; +0x6d, 0x1800a67fd\nmovups  [rsp+88h+var_58], xmm0                                         ; +0x73, 0x1800a6803\nmovups  xmm0, xmmword ptr [rcx+r9+20h]                                 ; +0x78, 0x1800a6808\nmovups  [rsp+88h+var_48], xmm0                                         ; +0x7e, 0x1800a680e\nmovups  xmm0, xmmword ptr [rcx+r9+30h]                                 ; +0x83, 0x1800a6813\nmovups  [rsp+88h+var_38], xmm0                                         ; +0x89, 0x1800a6819\nmovups  xmm0, xmmword ptr [rcx+r9+40h]                                 ; +0x8e, 0x1800a681e\nmovups  [rsp+88h+var_28], xmm0                                         ; +0x94, 0x1800a6824\nmovups  xmm0, xmmword ptr [rcx+r9+50h]                                 ; +0x99, 0x1800a6829\nlea     rcx, [rax+rax*2]                                               ; +0x9f, 0x1800a682f\nshl     rcx, 5                                                         ; +0xa3, 0x1800a6833\nadd     rcx, r9; void *                                                ; +0xa7, 0x1800a6837\nmovups  [rsp+88h+var_18], xmm0                                         ; +0xaa, 0x1800a683a\ncall    memmove                                                        ; +0xaf, 0x1800a683f\nmov     rax, [rdi+60h]                                                 ; +0xb4, 0x1800a6844\nlea     rcx, [rbx+rbx*2]                                               ; +0xb8, 0x1800a6848\nmovups  xmm0, [rsp+88h+var_68]                                         ; +0xbc, 0x1800a684c\nmov     rbx, [rsp+88h+arg_0]                                           ; +0xc1, 0x1800a6851\nmovups  xmm1, [rsp+88h+var_58]                                         ; +0xc9, 0x1800a6859\nshl     rcx, 5                                                         ; +0xce, 0x1800a685e\nmovups  xmmword ptr [rcx+rax], xmm0                                    ; +0xd2, 0x1800a6862\nmovups  xmm0, [rsp+88h+var_48]                                         ; +0xd6, 0x1800a6866\nmovups  xmmword ptr [rcx+rax+10h], xmm1                                ; +0xdb, 0x1800a686b\nmovups  xmm1, [rsp+88h+var_38]                                         ; +0xe0, 0x1800a6870\nmovups  xmmword ptr [rcx+rax+20h], xmm0                                ; +0xe5, 0x1800a6875\nmovups  xmm0, [rsp+88h+var_28]                                         ; +0xea, 0x1800a687a\nmovups  xmmword ptr [rcx+rax+30h], xmm1                                ; +0xef, 0x1800a687f\nmovups  xmm1, [rsp+88h+var_18]                                         ; +0xf4, 0x1800a6884\nmovups  xmmword ptr [rcx+rax+40h], xmm0                                ; +0xf9, 0x1800a6889\nmovups  xmmword ptr [rcx+rax+50h], xmm1                                ; +0xfe, 0x1800a688e\nmov     byte ptr [rdi+48h], 1                                          ; +0x103, 0x1800a6893\nadd     rsp, 80h                                                       ; +0x107, 0x1800a6897\npop     rdi                                                            ; +0x10e, 0x1800a689e\nretn                                                                   ; +0x10f, 0x1800a689f", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b7d34"], "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"}