//
// cocos2d::CCParticleSystemQuad::initTexCoordsWithRect from 0xd7390c to 0xd73ae8 (476 bytes)
//
// 3 xrefs:
// > cocos2d::CCParticleSystemQuad::updateTexCoords @ 0xd73af4
// > cocos2d::CCParticleSystemQuad::setTextureWithRect @ 0xd74060
// > ??> @ 0x622d8
//
// This function is hookable on this platform (idp: arm, 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 13:08:01 +0000
//
__int64 __fastcall cocos2d::CCParticleSystemQuad::initTexCoordsWithRect(
cocos2d::CCParticleSystemQuad *this,
const cocos2d::CCRect *a2)
{
float *v4; // x0
float v5; // s0
float v6; // s0
float v7; // s10
cocos2d::CCDirector *v8; // x0
float ContentScaleFactor; // s0
float v10; // s8
float v11; // s10
cocos2d::CCDirector *v12; // x0
cocos2d::CCDirector *v13; // x0
float v14; // s0
float v15; // s9
cocos2d::CCDirector *v16; // x0
cocos2d::CCDirector *v17; // x0
float v18; // s0
float v19; // s8
cocos2d::CCDirector *v20; // x0
cocos2d::CCDirector *v21; // x0
float v22; // s0
__int64 v23; // x0
float v24; // s9
float v25; // s1
__int64 v26; // x0
float v27; // s10
float v28; // s11
float v29; // s8
float v30; // s9
__int64 v31; // x0
unsigned int v32; // w1
unsigned int v33; // w2
unsigned __int64 v34; // x2
__int64 v35; // x1
unsigned __int64 v36; // x0
float v38; // [xsp+50h] [xbp+50h]
float v39; // [xsp+60h] [xbp+60h]
float v40; // [xsp+78h] [xbp+78h] BYREF
float v41; // [xsp+7Ch] [xbp+7Ch]
float v42; // [xsp+80h] [xbp+80h]
float v43; // [xsp+84h] [xbp+84h]
v4 = cocos2d::CCRect::operator=((float *)this + 202, (float *)a2);
v5 = *((float *)a2 + 3);
if ( v5 <= 0.0 )
v6 = 1.0;
else
v6 = *((float *)a2 + 2) / v5;
*((float *)this + 206) = v6;
v7 = *(float *)a2;
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v4);
ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v8);
v10 = *((float *)a2 + 1);
v11 = v7 * ContentScaleFactor;
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
v14 = cocos2d::CCDirector::getContentScaleFactor(v13);
v15 = *((float *)a2 + 2);
v38 = v10 * v14;
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16);
v18 = cocos2d::CCDirector::getContentScaleFactor(v17);
v19 = *((float *)a2 + 3);
v39 = v15 * v18;
v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v20);
v22 = cocos2d::CCDirector::getContentScaleFactor(v21);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v40, v11, v38, v39, v19 * v22);
v23 = *((_QWORD *)this + 83);
v24 = *((float *)a2 + 2);
v25 = *((float *)a2 + 3);
if ( v23 )
{
v24 = (float)(*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v23 + 88LL))(v23);
v25 = (float)(*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 83) + 96LL))(*((_QWORD *)this + 83));
}
v26 = *((_QWORD *)this + 54);
v27 = v40 / v24;
v28 = v41 / v25;
v29 = (float)(v42 / v24) + (float)(v40 / v24);
v30 = (float)(v43 / v25) + (float)(v41 / v25);
if ( v26 )
{
v31 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v26 + 328) + 112LL))(*(_QWORD *)(v26 + 328));
v32 = *((_DWORD *)this + 110);
v33 = v32 + *((_DWORD *)this + 165);
}
else
{
v31 = *((_QWORD *)this + 98);
v32 = 0;
v33 = *((_DWORD *)this + 165);
}
if ( v32 < v33 )
{
v34 = v33 - 1 - v32 + (unsigned __int64)v32;
v35 = v31 + 96LL * v32 + 16;
v36 = v31 + 96 * v34 + 112;
do
{
*(float *)(v35 + 24) = v27;
v35 += 96;
*(float *)(v35 - 68) = v30;
*(float *)(v35 - 24) = v29;
*(float *)(v35 - 20) = v30;
*(float *)(v35 - 96) = v27;
*(float *)(v35 - 92) = v28;
*(float *)(v35 - 48) = v29;
*(float *)(v35 - 44) = v28;
}
while ( v35 != v36 );
}
return _stack_chk_guard;
}