//
// ColorSelectPopup::updateCustomColorIdx from 0x4df0ca to 0x4df114 (74 bytes)
//
// 3 xrefs:
// > ColorSelectPopup::onUpdateCustomColor @ 0x4df800
// > ColorSelectPopup::colorSelectClosed @ 0x4df8a0
// > ColorSelectPopup::textChanged @ 0x4e21b0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:50:59 +0000
//
_DWORD *__fastcall ColorSelectPopup::updateCustomColorIdx(_DWORD *this)
{
_DWORD *v1; // r5
int v2; // r3
unsigned int v3; // r4
int v4; // r0
v1 = this;
v2 = *(this + 200);
v3 = *(this + 132);
if ( v2 < 1 )
v2 = 1;
*(this + 200) = v2;
if ( v3 )
{
*(_DWORD *)(v3 + 888) = v2;
}
else if ( *(this + 133) )
{
while ( 1 )
{
this = (_DWORD *)cocos2d::CCArray::count((cocos2d::CCArray *)v1[133]);
if ( v3 >= (unsigned int)this )
break;
v4 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)v1[133], v3++);
*(_DWORD *)(v4 + 888) = v1[200];
}
}
return this;
}