//
// SetupGradientPopup::determineStartValues from 0x1405b7120 to 0x1405b722e (270 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407f3960
// > ??> @ 0x1408dfb40
// > ??> @ 0x1408dfb7c
// > ??> @ 0x14092dcbc
//
// 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:34:44 +0000
//
void __fastcall SetupGradientPopup::determineStartValues(__int64 a1)
{
__int64 v2; // rcx
cocos2d::CCArray *v3; // rsi
unsigned int v4; // ebp
int v5; // edi
int v6; // ebx
struct cocos2d::CCObject *v7; // rax
int v8; // eax
SetupTriggerPopup::determineStartValues();
if ( *(_QWORD *)(a1 + 680) )
{
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);
cocos2d::CCArray::addObject(v3, *(struct cocos2d::CCObject **)(a1 + 680));
}
else
{
v3 = *(cocos2d::CCArray **)(a1 + 688);
}
if ( v3 && cocos2d::CCArray::count(v3) )
{
v4 = 0;
v5 = -99999;
v6 = -99999;
if ( !cocos2d::CCArray::count(v3) )
goto LABEL_17;
do
{
v7 = cocos2d::CCArray::objectAtIndex(v3, v4);
if ( v5 == -99999 )
{
v5 = *((_DWORD *)v7 + 465);
}
else if ( v5 != *((_DWORD *)v7 + 465) )
{
v5 = -9991;
}
v8 = *((_DWORD *)v7 + 464);
if ( v6 == -99999 )
{
v6 = v8;
}
else if ( v6 != v8 )
{
v6 = -9991;
}
++v4;
}
while ( v4 < cocos2d::CCArray::count(v3) );
if ( v5 != -9991 )
LABEL_17:
*(_DWORD *)(a1 + 1008) = v5;
if ( v6 != -9991 )
*(_DWORD *)(a1 + 1024) = v6;
}
}