//
// ParticleGameObject::setParticleString from 0x1001b2310 to 0x1001b239f (143 bytes)
//
// 6 xrefs:
// > LevelEditorLayer::copyParticleState @ 0x1000f4026
// > LevelEditorLayer::pasteParticleState @ 0x1000f41bc
// > LevelEditorLayer::pasteParticleState @ 0x1000f41f7
// > CreateParticlePopup::onClose @ 0x10047308c
// > CreateParticlePopup::onClose @ 0x100473181
// > CreateParticlePopup::onCopySettings @ 0x100473233
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall ParticleGameObject::setParticleString(__int64 a1, const std::string *a2)
{
unsigned int v4; // r15d
unsigned int v5; // r12d
size_t v6; // r12
const void *v7; // rdi
size_t size; // r15
std::string::pointer data; // rsi
size_t v10; // rdx
int result; // eax
v4 = (unsigned int)a2->__r_.__value_.__l.0;
v5 = *(unsigned __int8 *)(a1 + 1448);
if ( (v5 & 1) != 0 )
{
v6 = *(_QWORD *)(a1 + 1456);
v7 = *(const void **)(a1 + 1464);
if ( (v4 & 1) == 0 )
{
LABEL_3:
size = v4 >> 1;
data = a2->__r_.__value_.__s.__data_;
goto LABEL_6;
}
}
else
{
v6 = v5 >> 1;
v7 = (const void *)(a1 + 1449);
if ( (v4 & 1) == 0 )
goto LABEL_3;
}
size = a2->__r_.__value_.__l.__size_;
data = a2->__r_.__value_.__l.__data_;
LABEL_6:
v10 = v6;
if ( size < v6 )
v10 = size;
result = memcmp(v7, data, v10);
if ( result || size != v6 )
{
result = (unsigned int)std::string::operator=((std::string *)(a1 + 1448), a2);
*(_BYTE *)(a1 + 1472) = 1;
}
return result;
}