//
// CreateParticlePopup::onSelectParticleTexture from 0x1405c78c0 to 0x1405c79f1 (305 bytes)
//
// 3 xrefs:
// > CreateParticlePopup::init @ 0x1405c59e8
// > CreateParticlePopup::init @ 0x1405c5bcf
// > ??> @ 0x14092e2ec
//
// 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:34:51 +0000
//
__int64 __fastcall CreateParticlePopup::onSelectParticleTexture(__int64 a1, __int64 a2)
{
int v4; // eax
int v5; // edx
cocos2d::CCParticleSystemQuad *v6; // rdi
cocos2d::CCString *v7; // rax
const char *CString; // rbx
__int64 v9; // rdx
__int64 v10; // rcx
cocos2d::CCSpriteFrameCache *v11; // rax
struct cocos2d::CCSpriteFrame *v12; // rax
__int64 v13; // rdx
__int64 *v14; // r14
__int64 v15; // rbp
__int64 (__fastcall *v16)(__int64); // rdi
__int64 (__fastcall *v17)(__int64 *); // rsi
__int64 v18; // rbx
__int64 v19; // rax
__int64 v20; // rax
__int64 v21; // rbx
__int64 v22; // rax
__int64 v23; // rax
char v25; // [rsp+50h] [rbp+8h] BYREF
char v26; // [rsp+58h] [rbp+10h] BYREF
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) < 0
|| (v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2), v5 = 361, v4 < 361) )
{
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) >= 0 )
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
else
v5 = 0;
}
v6 = *(cocos2d::CCParticleSystemQuad **)(a1 + 712);
*(_DWORD *)(a1 + 992) = v5;
v7 = cocos2d::CCString::createWithFormat("particle_%02d_001.png", v5);
CString = cocos2d::CCString::getCString(v7);
v11 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v10, v9);
v12 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, CString);
cocos2d::CCParticleSystemQuad::setDisplayFrame(v6, v12);
CreateParticlePopup::updateParticleValueForType(a1, v13, 63, 0);
CreateParticlePopup::applyTexturePage(a1);
v14 = *(__int64 **)(a1 + 888);
v15 = *v14;
v16 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 504LL);
v17 = *(__int64 (__fastcall **)(__int64 *))(*v14 + 504);
v18 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 200LL))(a2);
v19 = v16(a2);
cocos2d::CCNode::convertToWorldSpace(v19, &v25, v18);
v21 = v20;
v22 = v17(v14);
cocos2d::CCNode::convertToNodeSpace(v22, &v26, v21);
return (*(__int64 (__fastcall **)(__int64 *, __int64))(v15 + 184))(v14, v23);
}