//
// CustomizeObjectLayer::onEditColor from 0x140142530 to 0x1401425dd (173 bytes)
//
// 3 xrefs:
// > CustomizeObjectLayer::init @ 0x140140b22
// > ??> @ 0x140917360
// > ??> @ 0x14091736c
//
// 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 11:27:10 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall CustomizeObjectLayer::onEditColor(__int64 a1, __int64 a2)
{
unsigned int ActiveMode; // edi
__int64 v4; // rax
__int64 ColorAction; // rax
char *v6; // rax
__int64 v7; // rcx
void *v9; // [rsp+30h] [rbp+8h]
LOBYTE(a2) = 1;
ActiveMode = CustomizeObjectLayer::getActiveMode(a1, a2);
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v9 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
ColorAction = GJEffectManager::getColorAction(
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v4 + 568) + 3528LL) + 320LL),
ActiveMode);
v6 = ColorSelectPopup::create(0, 0, ColorAction);
v7 = a1 + 672;
if ( !a1 )
v7 = 0;
*((_QWORD *)v6 + 138) = v7;
return (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v6 + 1064LL))(v6);
}