//
// cocos2d::CCTextureAtlas::insertQuadFromIndex from 0x1800aa2e0 to 0x1800aa3f0 (272 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1fec
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:22:17 +0000
//
void __fastcall cocos2d::CCTextureAtlas::insertQuadFromIndex(
cocos2d::CCTextureAtlas *this,
unsigned int a2,
unsigned int a3)
{
__int64 v3; // rbx
unsigned int v4; // r11d
unsigned int v5; // eax
__int64 v7; // r8
unsigned int v8; // r10d
__int64 v9; // r9
__int64 v10; // rcx
__int64 v11; // rax
__int64 v12; // rcx
__int128 v13; // [rsp+20h] [rbp-68h]
__int128 v14; // [rsp+30h] [rbp-58h]
__int128 v15; // [rsp+40h] [rbp-48h]
__int128 v16; // [rsp+50h] [rbp-38h]
__int128 v17; // [rsp+60h] [rbp-28h]
__int128 v18; // [rsp+70h] [rbp-18h]
if ( a2 != a3 )
{
v3 = a3;
v4 = a2 + 1;
v5 = a3 - a2;
v7 = a2 - a3;
v8 = a2;
if ( !(_DWORD)v7 )
v7 = v5;
if ( a2 > (unsigned int)v3 )
{
v8 = v3 + 1;
v4 = v3;
}
v9 = *((_QWORD *)this + 12);
v10 = 96LL * a2;
v13 = *(_OWORD *)(v10 + v9);
v14 = *(_OWORD *)(v10 + v9 + 16);
v15 = *(_OWORD *)(v10 + v9 + 32);
v16 = *(_OWORD *)(v10 + v9 + 48);
v17 = *(_OWORD *)(v10 + v9 + 64);
v18 = *(_OWORD *)(v10 + v9 + 80);
memmove((void *)(v9 + 96LL * v8), (const void *)(v9 + 96LL * v4), 96 * v7);
v11 = *((_QWORD *)this + 12);
v12 = 96 * v3;
*(_OWORD *)(v12 + v11) = v13;
*(_OWORD *)(v12 + v11 + 16) = v14;
*(_OWORD *)(v12 + v11 + 32) = v15;
*(_OWORD *)(v12 + v11 + 48) = v16;
*(_OWORD *)(v12 + v11 + 64) = v17;
*(_OWORD *)(v12 + v11 + 80) = v18;
*((_BYTE *)this + 72) = 1;
}
}