//
// CreateParticlePopup::applyTexturePage from 0xafd2c0 to 0xafd504 (580 bytes)
//
// 4 xrefs:
// > CreateParticlePopup::onTexturePage @ 0xafd568
// > CreateParticlePopup::onSelectParticleTexture @ 0xafeb4c
// > CreateParticlePopup::onPage @ 0xaff26c
// > ??> @ 0xa47d0
//
// 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:01:18 +0000
//
__int64 __fastcall CreateParticlePopup::applyTexturePage(CreateParticlePopup *this)
{
cocos2d::CCDirector *v2; // x0
__int64 v3; // x22
int i; // w19
__int64 v5; // x0
int v6; // w1
cocos2d::CCDirector *v7; // x0
int v8; // w2
int v9; // w19
__int64 v10; // x25
void (__fastcall *v11)(__int64, __int64 *); // x26
__int64 v12; // x19
const char *v13; // x1
void (__fastcall *v14)(__int64, __int64); // x21
cocos2d::CCString *v15; // x0
__int64 CString; // x0
__int64 v18; // [xsp+68h] [xbp+68h] BYREF
_BYTE v19[8]; // [xsp+70h] [xbp+70h] BYREF
_BYTE v20[8]; // [xsp+78h] [xbp+78h] BYREF
__int64 v21; // [xsp+80h] [xbp+80h] BYREF
if ( *((_DWORD *)this + 232) > 4u )
*((_DWORD *)this + 232) = 0;
v2 = *((cocos2d::CCDirector **)this + 112);
v3 = 0;
for ( i = 0; i < (int)((__int64)(*((_QWORD *)this + 113) - (_QWORD)v2) >> 3); v2 = *((cocos2d::CCDirector **)this + 112) )
{
v5 = *(_QWORD *)((char *)v2 + v3);
v3 += 8;
v6 = i / 88;
++i;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v5 + 344LL))(v5, v6 == *((_DWORD *)this + 232));
}
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize(&v18, v7);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v19,
(float)(*(float *)&v18 * 0.5) + -56.0,
(float)(*((float *)&v18 + 1) * 0.5) + 75.0);
v8 = *((_DWORD *)this + 248);
v9 = v8 % 88;
(*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 111) + 344LL))(
*((_QWORD *)this + 111),
v8 / 88 == *((_DWORD *)this + 232));
v10 = *((_QWORD *)this + 111);
v11 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v10 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, (float)(v9 % 11) * 24.0, (float)(v9 / 11) * -24.0);
cocos2d::CCPoint::operator+(&v21, v19);
v11(v10, &v21);
v12 = *((_QWORD *)this + 115);
if ( v12 )
{
v13 = (const char *)(unsigned int)(*((_DWORD *)this + 232) + 1);
v14 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 928LL);
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/%i", v13, 5);
CString = cocos2d::CCString::getCString(v15);
v14(v12, CString);
}
return _stack_chk_guard;
}