//
// ColorSelectPopup::closeColorSelect from 0x8632b8 to 0x863450 (408 bytes)
//
// 4 xrefs:
// > ColorSelectPopup::keyBackClicked @ 0x863454
// > ??> @ 0x67a80
// > ColorSelectPopup::init @ 0x863ffc
// > ??> @ 0x1542868
//
// 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:55:37 +0000
//
__int64 __fastcall ColorSelectPopup::closeColorSelect(ColorSelectPopup *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
__int64 v4; // x0
__int64 updated; // x0
__int64 v6; // x0
long double v7; // q0
void (__fastcall ***v8)(_QWORD, ColorSelectPopup *); // x0
int v10; // w3
int v11; // w2
char v12; // w4
int v13; // w1
v3 = *((_QWORD *)this + 144);
if ( v3 )
{
*(_QWORD *)(v3 + 584) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 144) + 1160LL))(*((_QWORD *)this + 144), 0);
}
v4 = *((_QWORD *)this + 154);
if ( v4 )
{
*(_QWORD *)(v4 + 584) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 154) + 1160LL))(*((_QWORD *)this + 154), 0);
}
*(_QWORD *)(*((_QWORD *)this + 153) + 584LL) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 153) + 1160LL))(*((_QWORD *)this + 153), 0);
*(_QWORD *)(*((_QWORD *)this + 158) + 584LL) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 158) + 1160LL))(*((_QWORD *)this + 158), 0);
*(_QWORD *)(*((_QWORD *)this + 159) + 584LL) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 159) + 1160LL))(*((_QWORD *)this + 159), 0);
*(_QWORD *)(*((_QWORD *)this + 160) + 584LL) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 160) + 1160LL))(*((_QWORD *)this + 160), 0);
*(_QWORD *)(*((_QWORD *)this + 161) + 584LL) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 161) + 1160LL))(*((_QWORD *)this + 161), 0);
updated = *((_QWORD *)this + 148);
if ( !*(_BYTE *)(updated + 392) )
{
v10 = *(_DWORD *)(updated + 376);
v11 = *(_DWORD *)(updated + 380);
v12 = *(_BYTE *)(updated + 389);
v13 = *(_DWORD *)(updated + 384);
*((_BYTE *)this + 1204) = *(_BYTE *)(updated + 388);
*((_BYTE *)this + 1205) = v12;
*((_DWORD *)this + 298) = v10;
*((_DWORD *)this + 299) = v11;
*((_DWORD *)this + 300) = v13;
updated = ColorSelectPopup::updateHSVValue(this);
}
v6 = GameManager::sharedState((GameManager *)updated);
*(__n128 *)&v7 = LevelEditorLayer::resetEffectTriggerOptim(
(LevelEditorLayer *)*(_QWORD *)(v6 + 552),
(GameObject *)*((_QWORD *)this + 85),
(cocos2d::CCArray *)*((_QWORD *)this + 86));
(*(void (__fastcall **)(ColorSelectPopup *, _QWORD, long double))(*(_QWORD *)this + 1072LL))(this, 0, v7);
v8 = *((void (__fastcall ****)(_QWORD, ColorSelectPopup *))this + 140);
if ( v8 )
(**v8)(v8, this);
return (*(__int64 (__fastcall **)(ColorSelectPopup *, __int64))(*(_QWORD *)this + 528LL))(this, 1);
}