//
// LevelEditorLayer::copyParticleState from 0x7938a4 to 0x793a54 (432 bytes)
//
// 2 xrefs:
// > CreateParticlePopup::onCopySettings @ 0xaffe08
// > ??> @ 0xa2bf8
//
// 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 12:53:31 +0000
//
__int64 __fastcall LevelEditorLayer::copyParticleState(LevelEditorLayer *this, ParticleGameObject *a2)
{
__int64 v4; // x22
char v5; // w0
__int64 v6; // x0
__int64 v7; // x1
__int64 v9; // x0
cocos2d::CCObject **v10; // x22
__int64 v11; // x22
void (__fastcall *v12)(__int64, __int64 *); // x24
__int64 v13; // [xsp+40h] [xbp+40h] BYREF
__int64 v14; // [xsp+48h] [xbp+48h]
void *v15; // [xsp+50h] [xbp+50h]
if ( a2 )
{
v4 = *((_QWORD *)this + 1766);
if ( !v4 )
{
v9 = ParticleGameObject::create(_stack_chk_guard);
*((_QWORD *)this + 1766) = v9;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 1264LL))(v9);
v10 = *((cocos2d::CCObject ***)this + 1766);
v13 = 0;
v14 = 0;
v15 = nullptr;
std::string::__init(&v13, "edit_eCParticleBtn_001.png", 0x1Au);
GameObject::addColorSprite(v10, (unsigned __int8 *)&v13);
if ( (v13 & 1) != 0 )
operator delete(v15);
v11 = *((_QWORD *)this + 1766);
v12 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 1272LL);
v13 = 0;
v14 = 0;
v15 = nullptr;
std::string::__init(&v13, "edit_eCParticleBtn_001.png", 0x1Au);
v12(v11, &v13);
if ( (v13 & 1) != 0 )
operator delete(v15);
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 1766));
v4 = *((_QWORD *)this + 1766);
}
v5 = *((_BYTE *)a2 + 1448);
v13 = 0;
v14 = 0;
v15 = nullptr;
if ( (v5 & 1) != 0 )
{
std::string::__init(&v13, *((void **)a2 + 183), *((_QWORD *)a2 + 182));
}
else
{
v6 = *((_QWORD *)a2 + 181);
v7 = *((_QWORD *)a2 + 182);
v15 = *((void **)a2 + 183);
v13 = v6;
v14 = v7;
}
ParticleGameObject::setParticleString(v4, &v13);
if ( (v13 & 1) != 0 )
operator delete(v15);
*(_BYTE *)(*((_QWORD *)this + 1766) + 1768LL) = *((_BYTE *)a2 + 1768);
*(_BYTE *)(*((_QWORD *)this + 1766) + 1417LL) = *((_BYTE *)a2 + 1417);
}
return _stack_chk_guard;
}