//
// ColorSelectPopup::onUpdateCopyColor from 0x14012c400 to 0x14012c470 (112 bytes)
//
// 3 xrefs:
// > ColorSelectPopup::init @ 0x140128b59
// > ColorSelectPopup::init @ 0x140128c0b
// > ??> @ 0x140916c64
//
// 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:01 +0000
//
__int64 __fastcall ColorSelectPopup::onUpdateCopyColor(__int64 a1, __int64 a2)
{
int v2; // edi
int v4; // eax
int v5; // ecx
int v6; // edx
int v7; // eax
v2 = 0;
if ( *(int *)(a1 + 1160) >= 1000 )
*(_DWORD *)(a1 + 1160) = 0;
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v5 = -1;
if ( v4 != 1 )
v5 = 1;
v6 = v5 + *(_DWORD *)(a1 + 1160);
if ( v6 < 0 || (v7 = 999, v2 = v5 + *(_DWORD *)(a1 + 1160), v6 <= 999) )
v7 = v2;
*(_DWORD *)(a1 + 1160) = v7;
ColorSelectPopup::updateCopyColor(a1);
return ColorSelectPopup::updateCopyColorTextInputLabel(a1);
}