//
// CreateParticlePopup::onSelectParticleTexture from 0x100469060 to 0x10046918e (302 bytes)
//
// 1 xrefs:
// > CreateParticlePopup::init @ 0x100466c2f
//
// 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 12:30:30 +0000
//
__int64 __fastcall CreateParticlePopup::onSelectParticleTexture(__int64 a1, __int64 a2)
{
int v2; // ecx
int v3; // eax
__int64 v4; // r15
__int64 v5; // r12
__int64 v6; // rax
const char *CString; // rax
__int64 v8; // rax
__int64 v9; // r14
__int64 v10; // r15
__int64 v11; // r12
unsigned int *v12; // rax
double v14; // [rsp+0h] [rbp-30h] BYREF
double v15[5]; // [rsp+8h] [rbp-28h] BYREF
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) <= 0
|| (v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2), v3 = 361, v2 <= 361) )
{
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) <= 0 )
v3 = 0;
else
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
}
*(_DWORD *)(a1 + 992) = v3;
v4 = *(_QWORD *)(a1 + 712);
v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v6 = sub_10088E820("particle_%02d_001.png", SLOBYTE(v14));
CString = (const char *)cocos2d::CCString::getCString(v6);
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v5, CString);
cocos2d::CCParticleSystemQuad::setDisplayFrame(v4, v8);
CreateParticlePopup::updateParticleValueForType(a1, 63, 0, (float)*(int *)(a1 + 992));
CreateParticlePopup::applyTexturePage(a1);
v9 = *(_QWORD *)(a1 + 888);
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 512LL))(v9);
v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 512LL))(a2);
v12 = (unsigned int *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 192LL))(a2);
cocos2d::CCNode::convertToWorldSpace(v15, v11, v12);
cocos2d::CCNode::convertToNodeSpace(&v14, v10, (unsigned int *)v15);
return (*(__int64 (__fastcall **)(__int64, double *))(*(_QWORD *)v9 + 184LL))(v9, &v14);
}