//
// ColorSelectPopup::determineStartValues from 0x4de850 to 0x4dec36 (998 bytes)
//
// 0 xrefs:
//
// 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
//
cocos2d::CCArray *__fastcall ColorSelectPopup::determineStartValues(cocos2d::CCObject **this)
{
cocos2d::CCArray *result; // r0
cocos2d::CCArray *v3; // r7
float v4; // s16
int v5; // r6
unsigned int v6; // r11
int v7; // r10
int v8; // r8
int v9; // r9
int v10; // r0
int v11; // r1
int v12; // r2
cocos2d::CCObject *v13; // r3
float v14; // s17
int v15; // r0
int v16; // r3
int v17; // r3
int v18; // r3
bool v19; // r3
float *v20; // r3
float *v21; // r3
int v22; // r1
int v23; // r2
int v24; // r3
cocos2d::CCObject *v25; // r1
cocos2d::CCObject *v26; // r2
cocos2d::CCObject *v27; // r3
int v28; // r3
cocos2d::CCObject *v29; // r2
cocos2d::CCObject *v30; // r3
cocos2d::CCObject *v31; // r2
cocos2d::CCObject *v32; // r3
int v33; // r3
int v34; // r2
bool v35; // r1
int v36; // r3
char v37; // r0
char v38; // r1
int v39; // [sp+0h] [bp-2Ch]
cocos2d::CCObject *v40; // [sp+1Ch] [bp-10h]
cocos2d::CCObject *v41; // [sp+20h] [bp-Ch]
cocos2d::CCObject *v42; // [sp+24h] [bp-8h]
result = (cocos2d::CCArray *)SetupTriggerPopup::determineStartValues((SetupTriggerPopup *)this);
if ( *(this + 132) )
{
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(result);
result = (cocos2d::CCArray *)cocos2d::CCArray::addObject(v3, *(this + 132));
}
else
{
v3 = *(this + 133);
}
if ( v3 )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(v3);
if ( result )
{
v4 = -1.0;
*(this + 195) = (cocos2d::CCObject *)1065353216;
*(this + 193) = (cocos2d::CCObject *)-1;
v5 = 1;
*(this + 200) = (cocos2d::CCObject *)-1;
*(this + 202) = (cocos2d::CCObject *)-1;
v6 = 0;
v7 = 0;
v8 = 0;
v9 = 0;
*((_WORD *)this + 380) = -1;
*((_BYTE *)this + 762) = -1;
v10 = dword_D2BBA0;
v11 = dword_D2BBA4;
v12 = dword_D2BBA8;
v13 = *(cocos2d::CCObject **)&byte_D2BBAC;
v14 = -1.0;
*(this + 194) = (cocos2d::CCObject *)(&dword_0 + 1);
*((_BYTE *)this + 812) = 1;
*((_BYTE *)this + 792) = 1;
*((_BYTE *)this + 793) = 1;
*((_BYTE *)this + 794) = 1;
*(this + 205) = (cocos2d::CCObject *)v10;
*(this + 206) = (cocos2d::CCObject *)v11;
*(this + 207) = (cocos2d::CCObject *)v12;
*(this + 208) = v13;
v39 = 1;
while ( 1 )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(v3);
if ( v6 >= (unsigned int)result )
{
if ( v14 >= 0.0 )
*((float *)this + 192) = v14;
if ( v4 >= 0.0 )
*((float *)this + 195) = v4;
goto LABEL_80;
}
v15 = cocos2d::CCArray::objectAtIndex(v3, v6);
if ( !*(_BYTE *)(v15 + 1452) )
*((_BYTE *)this + 812) = 0;
if ( !*(_BYTE *)(v15 + 1456) )
*((_BYTE *)this + 794) = 0;
if ( !v8 )
{
v16 = (int)*(this + 193);
if ( v16 == -1 )
{
if ( *(_BYTE *)(v15 + 1305) )
{
v17 = 1;
LABEL_18:
*(this + 193) = (cocos2d::CCObject *)v17;
goto LABEL_24;
}
if ( *(_BYTE *)(v15 + 1306) )
{
v17 = 2;
goto LABEL_18;
}
*(this + 193) = nullptr;
}
else if ( *(_BYTE *)(v15 + 1305) && v16 != 1 || *(_BYTE *)(v15 + 1306) && v16 != 2 )
{
v8 = 1;
*(this + 193) = nullptr;
}
}
LABEL_24:
if ( *(_DWORD *)(v15 + 892) == 29 )
{
if ( *((_BYTE *)this + 793) )
*((_BYTE *)this + 793) = *(_BYTE *)(v15 + 1304);
}
else
{
*((_BYTE *)this + 792) = 0;
}
if ( *(this + 194) == (cocos2d::CCObject *)((char *)&dword_0 + 1) )
*(this + 194) = (cocos2d::CCObject *)*(unsigned __int8 *)(v15 + 1307);
if ( !*((_BYTE *)this + 795) )
{
v18 = *(_DWORD *)(v15 + 892);
v19 = v18 == 744 || v18 == 899 || v18 == 915;
*((_BYTE *)this + 795) = v19;
}
if ( !*((_BYTE *)this + 797) )
*((_BYTE *)this + 797) = *(_DWORD *)(v15 + 892) == 899;
v20 = (float *)(v15 + 1272);
if ( v14 == -1.0 )
{
v14 = *v20;
}
else if ( v14 != *v20 )
{
v14 = -2.0;
}
v21 = (float *)(v15 + 1276);
if ( v4 == -1.0 )
{
v4 = *v21;
}
else if ( v4 != *v21 )
{
v4 = -2.0;
}
if ( !v9 )
{
v22 = *(unsigned __int8 *)(v15 + 1268);
v23 = *(unsigned __int8 *)(v15 + 1269);
v24 = *(unsigned __int8 *)(v15 + 1270);
if ( v39 )
{
*((_BYTE *)this + 760) = v22;
*((_BYTE *)this + 761) = v23;
*((_BYTE *)this + 762) = v24;
v39 = 0;
}
else if ( *((unsigned __int8 *)this + 760) != v22
|| *((unsigned __int8 *)this + 761) != v23
|| *((unsigned __int8 *)this + 762) != v24 )
{
v9 = 1;
*((_WORD *)this + 380) = -1;
*((_BYTE *)this + 762) = -1;
}
}
if ( !v7 )
{
v25 = *(cocos2d::CCObject **)(v15 + 1436);
v26 = *(cocos2d::CCObject **)(v15 + 1440);
v27 = *(cocos2d::CCObject **)(v15 + 1444);
if ( v5 )
{
v5 = 0;
*(this + 205) = *(cocos2d::CCObject **)(v15 + 1432);
*(this + 206) = v25;
*(this + 207) = v26;
*(this + 208) = v27;
goto LABEL_63;
}
if ( *((float *)this + 205) == *(float *)(v15 + 1432)
&& *((float *)this + 206) == *(float *)(v15 + 1436)
&& *((float *)this + 207) == *(float *)(v15 + 1440) )
{
v28 = *((unsigned __int16 *)this + 416)
- (unsigned __int16)v27
+ (*((unsigned __int16 *)this + 416) == (unsigned __int16)v27)
+ (unsigned __int16)v27
- *((unsigned __int16 *)this + 416);
if ( v28 )
goto LABEL_63;
}
else
{
LOBYTE(v28) = 0;
}
*(this + 205) = (cocos2d::CCObject *)-1165815185;
v7 = 1;
*((_BYTE *)this + 832) = v28;
*((_BYTE *)this + 833) = v28;
*(this + 206) = nullptr;
*(this + 207) = nullptr;
}
LABEL_63:
v29 = *(this + 200);
v30 = *(cocos2d::CCObject **)(v15 + 888);
if ( v29 != (cocos2d::CCObject *)-1 )
{
if ( v29 == v30 )
goto LABEL_67;
v30 = nullptr;
}
*(this + 200) = v30;
LABEL_67:
v31 = *(this + 202);
v32 = *(cocos2d::CCObject **)(v15 + 1448);
if ( v31 != (cocos2d::CCObject *)-1 )
{
if ( v31 == v32 )
goto LABEL_71;
v32 = nullptr;
}
*(this + 202) = v32;
LABEL_71:
++v6;
}
}
}
v33 = (int)*(this + 196);
if ( v33 )
{
*((_BYTE *)this + 792) = 0;
*(this + 193) = *(cocos2d::CCObject **)(v33 + 84);
*(this + 194) = (cocos2d::CCObject *)*(unsigned __int8 *)(v33 + 80);
*(this + 195) = *(cocos2d::CCObject **)(v33 + 92);
v34 = *(_DWORD *)(v33 + 88);
v35 = (unsigned int)(v34 - 1002) <= 1 || (unsigned int)(v34 - 1) <= 0x3E6;
*((_BYTE *)this + 795) = v35;
v36 = v33 + 100;
*((_BYTE *)this + 796) = v34 == 0;
v37 = *(_BYTE *)(v36 - 32);
v38 = *(_BYTE *)(v36 - 31);
*((_BYTE *)this + 762) = *(_BYTE *)(v36 - 30);
*((_BYTE *)this + 760) = v37;
*((_BYTE *)this + 761) = v38;
*(this + 192) = nullptr;
*(this + 202) = *(cocos2d::CCObject **)(v36 + 16);
*((_BYTE *)this + 812) = *(_BYTE *)(v36 + 21);
result = *(cocos2d::CCArray **)v36;
v40 = *(cocos2d::CCObject **)(v36 + 4);
v41 = *(cocos2d::CCObject **)(v36 + 8);
v42 = *(cocos2d::CCObject **)(v36 + 12);
*(this + 205) = *(cocos2d::CCObject **)v36;
*(this + 206) = v40;
*(this + 207) = v41;
*(this + 208) = v42;
}
LABEL_80:
*((_BYTE *)this + 860) = *(this + 202) != nullptr;
*((_BYTE *)this + 795) = 1;
return result;
}