//
// CreateParticlePopup::onCopySettings from 0x1004677d0 to 0x1004678a1 (209 bytes)
//
// 1 xrefs:
// > CreateParticlePopup::init @ 0x1004633b8
//
// 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:29 +0000
//
void __fastcall CreateParticlePopup::onCopySettings(__int64 a1)
{
__int64 v1; // r14
__int64 v2; // rax
std::string v3; // [rsp+0h] [rbp-40h] BYREF
__int128 v4; // [rsp+18h] [rbp-28h] BYREF
void *v5; // [rsp+28h] [rbp-18h]
if ( *(_QWORD *)(a1 + 680) )
{
GameToolbox::saveParticleToString(&v4, *(_QWORD *)(a1 + 712));
v1 = *(_QWORD *)(a1 + 680);
if ( (v4 & 1) != 0 )
{
sub_10001AD30(&v3, v5, *((unsigned __int64 *)&v4 + 1));
}
else
{
v3.__r_.__value_.__r.__words[2] = (std::string::size_type)v5;
*(_OWORD *)&v3.__r_.__value_.__l.0 = v4;
}
ParticleGameObject::setParticleString(v1, &v3);
if ( (*(_BYTE *)&v3.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v3.__r_.__value_.__l.__data_);
*(_BYTE *)(*(_QWORD *)(a1 + 680) + 1768LL) = *(_BYTE *)(*(_QWORD *)(a1 + 712) + 740LL);
if ( *(_QWORD *)(GameManager::sharedState() + 552) )
{
v2 = GameManager::sharedState();
LevelEditorLayer::copyParticleState(*(_QWORD *)(v2 + 552), *(_QWORD *)(a1 + 680));
}
if ( (v4 & 1) != 0 )
operator delete(v5);
}
}