//
// CreateParticlePopup::onDuplicateColor from 0x100473a40 to 0x100473b6d (301 bytes)
//
// 1 xrefs:
// > CreateParticlePopup::init @ 0x1004707dd
//
// 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
//
void __fastcall CreateParticlePopup::onDuplicateColor(CreateParticlePopup *a1, cocos2d::CCObject *a2)
{
__int64 v2; // rax
float *v4; // rax
__int64 v5; // rax
__int64 v6; // rax
float *v7; // rax
__m128 v8; // xmm0
cocos2d::CCSprite *m_endColorSprite; // rdi
int v10; // [rsp+0h] [rbp-Ch] BYREF
v10 = HIDWORD(v2);
v4 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *, cocos2d::CCObject *))a1->m_particle->getStartColor)(
a1->m_particle,
a2);
CreateParticlePopup::updateParticleValueForType(a1, *v4, EndR, nullptr);
v5 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);
CreateParticlePopup::updateParticleValueForType(a1, *(float *)(v5 + 4), EndG, nullptr);
v6 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);
CreateParticlePopup::updateParticleValueForType(a1, *(float *)(v6 + 8), EndB, nullptr);
CreateParticlePopup::updateInputNodeStringForType(a1, EndR);
CreateParticlePopup::updateInputNodeStringForType(a1, EndG);
CreateParticlePopup::updateInputNodeStringForType(a1, EndB);
CreateParticlePopup::updateSliderForType(a1, EndR);
CreateParticlePopup::updateSliderForType(a1, EndG);
CreateParticlePopup::updateSliderForType(a1, EndB);
v7 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);
v8 = (__m128)*(unsigned __int64 *)v7;
m_endColorSprite = a1->m_endColorSprite;
BYTE2(v10) = (int)(float)(255.0 * v7[2]);
LOWORD(v10) = ((unsigned __int8)(int)(float)(_mm_movehdup_ps(v8).f32[0] * 255.0) << 8)
| (unsigned __int8)(int)(float)(v8.f32[0] * 255.0);
((void (__fastcall *)(cocos2d::CCSprite *, int *))m_endColorSprite->setColor)(m_endColorSprite, &v10);
}