//
// ColorSelectPopup::updateCustomColorIdx from 0x862f84 to 0x863000 (124 bytes)
//
// 4 xrefs:
// > ColorSelectPopup::onUpdateCustomColor @ 0x8638fc
// > ColorSelectPopup::colorSelectClosed @ 0x863ae8
// > ColorSelectPopup::textChanged @ 0x867d3c
// > ??> @ 0x905b0
//
// 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::updateCustomColorIdx(__int64 this)
{
__int64 v1; // x19
__int64 v2; // x1
unsigned int v3; // w20
bool v4; // cf
unsigned int v5; // w1
v1 = this;
LODWORD(this) = *(_DWORD *)(this + 1168);
v2 = *(_QWORD *)(v1 + 680);
if ( (int)this <= 0 )
this = 1;
else
this = (unsigned int)this;
*(_DWORD *)(v1 + 1168) = this;
if ( v2 )
{
*(_DWORD *)(v2 + 1024) = this;
}
else
{
this = *(_QWORD *)(v1 + 688);
if ( this )
{
v3 = 0;
while ( 1 )
{
this = cocos2d::CCArray::count((cocos2d::CCArray *)this);
v4 = v3 >= (unsigned int)this;
v5 = v3++;
if ( v4 )
break;
*(_DWORD *)(cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v1 + 688), v5) + 1024) = *(_DWORD *)(v1 + 1168);
this = *(_QWORD *)(v1 + 688);
}
}
}
return this;
}