//
// CreateParticlePopup::colorSelectClosed from 0x10046a880 to 0x10046ab33 (691 bytes)
//
// 2 xrefs:
// > sub_10046AB40 @ 0x10046ab4c
// > ??> @ 0x100b44640
//
// 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:31 +0000
//
_OWORD *__fastcall CreateParticlePopup::colorSelectClosed(__int64 a1, __int64 a2, __m128 a3)
{
_OWORD *result; // rax
__int64 v4; // rdi
__int16 v5; // [rsp+0h] [rbp-20h] BYREF
char v6; // [rsp+2h] [rbp-1Eh]
float v7; // [rsp+4h] [rbp-1Ch]
float v8; // [rsp+8h] [rbp-18h]
unsigned __int16 v9; // [rsp+Ch] [rbp-14h] BYREF
unsigned __int8 v10; // [rsp+Eh] [rbp-12h]
result = (_OWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v10 = *(_BYTE *)(a2 + 1114);
v9 = *(_WORD *)(a2 + 1112);
switch ( (_DWORD)result )
{
case 2:
a3.f32[0] = (float)(unsigned __int8)v9 / 255.0;
v8 = (float)HIBYTE(v9) / 255.0;
v7 = (float)v10 / 255.0;
CreateParticlePopup::updateParticleValueForType(a1, 0x22u, nullptr, a3);
CreateParticlePopup::updateParticleValueForType(a1, 0x24u, nullptr, (__m128)LODWORD(v8));
CreateParticlePopup::updateParticleValueForType(a1, 0x26u, nullptr, (__m128)LODWORD(v7));
CreateParticlePopup::updateInputNodeStringForType(a1, 0x22u);
CreateParticlePopup::updateInputNodeStringForType(a1, 0x24u);
CreateParticlePopup::updateInputNodeStringForType(a1, 0x26u);
CreateParticlePopup::updateSliderForType(a1, 0x22u, v7);
CreateParticlePopup::updateSliderForType(a1, 0x24u, v7);
CreateParticlePopup::updateSliderForType(a1, 0x26u, v7);
return (_OWORD *)(*(__int64 (__fastcall **)(_QWORD, unsigned __int16 *))(**(_QWORD **)(a1 + 952) + 960LL))(
*(_QWORD *)(a1 + 952),
&v9);
case 1:
a3.f32[0] = (float)(unsigned __int8)v9 / 255.0;
v8 = (float)HIBYTE(v9) / 255.0;
v7 = (float)v10 / 255.0;
CreateParticlePopup::updateParticleValueForType(a1, 0x1Au, nullptr, a3);
CreateParticlePopup::updateParticleValueForType(a1, 0x1Cu, nullptr, (__m128)LODWORD(v8));
CreateParticlePopup::updateParticleValueForType(a1, 0x1Eu, nullptr, (__m128)LODWORD(v7));
CreateParticlePopup::updateInputNodeStringForType(a1, 0x1Au);
CreateParticlePopup::updateInputNodeStringForType(a1, 0x1Cu);
CreateParticlePopup::updateInputNodeStringForType(a1, 0x1Eu);
CreateParticlePopup::updateSliderForType(a1, 0x1Au, v7);
CreateParticlePopup::updateSliderForType(a1, 0x1Cu, v7);
CreateParticlePopup::updateSliderForType(a1, 0x1Eu, v7);
(*(void (__fastcall **)(_QWORD, unsigned __int16 *))(**(_QWORD **)(a1 + 944) + 960LL))(*(_QWORD *)(a1 + 944), &v9);
*(_OWORD *)(*(_QWORD *)(a1 + 712) + 708LL) = *(_OWORD *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712)
+ 1352LL))(*(_QWORD *)(a1 + 712));
result = (_OWORD *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 1384LL))(*(_QWORD *)(a1 + 712));
*(_OWORD *)(*(_QWORD *)(a1 + 712) + 724LL) = *result;
break;
case 0:
(*(void (__fastcall **)(_QWORD, unsigned __int16 *))(**(_QWORD **)(a1 + 792) + 1216LL))(
*(_QWORD *)(a1 + 792),
&v9);
(*(void (__fastcall **)(_QWORD, unsigned __int16 *))(**(_QWORD **)(a1 + 936) + 960LL))(*(_QWORD *)(a1 + 936), &v9);
v4 = *(_QWORD *)(a1 + 984);
v6 = ~v10;
v5 = ((HIBYTE(v9) ^ 0xFF) << 8) | (unsigned __int8)v9 ^ 0xFF;
return (_OWORD *)(*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v4 + 1072LL))(v4, &v5);
}
return result;
}