//
// SetupMGTrigger::determineStartValues from 0x1405bd880 to 0x1405bdad1 (593 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407f67c8
// > ??> @ 0x1408e0158
// > ??> @ 0x1408e0168
// > ??> @ 0x14092df80
//
// 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:46 +0000
//
void __fastcall SetupMGTrigger::determineStartValues(__int64 a1)
{
__int64 v2; // rcx
cocos2d::CCArray *v3; // rbp
int v4; // edi
int v5; // esi
char v6; // r12
char v7; // r13
unsigned int v8; // r14d
char v9; // r15
float v10; // xmm7_4
float v11; // xmm8_4
char v12; // bl
struct cocos2d::CCObject *v13; // rax
struct cocos2d::CCObject *v14; // rdx
int v15; // eax
const struct cocos2d::CCPoint *v16; // rdx
char v18; // [rsp+98h] [rbp+10h] BYREF
float v19; // [rsp+9Ch] [rbp+14h]
char v20; // [rsp+A0h] [rbp+18h] BYREF
float v21; // [rsp+A4h] [rbp+1Ch]
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);
}
*(_DWORD *)(a1 + 1016) = -943501440;
*(_DWORD *)(a1 + 1032) = -99999;
*(_DWORD *)(a1 + 1072) = -99999;
*(_DWORD *)(a1 + 1036) = -943501440;
if ( v3 )
{
if ( cocos2d::CCArray::count(v3) )
{
v4 = -99999;
v5 = -99999;
v6 = 0;
v7 = 0;
v8 = 0;
v9 = 0;
v10 = -99999.0;
v11 = -99999.0;
if ( cocos2d::CCArray::count(v3) )
{
v12 = 0;
do
{
v13 = cocos2d::CCArray::objectAtIndex(v3, v8);
v14 = v13;
if ( !v12 )
{
if ( v11 == -99999.0 )
{
v11 = *((float *)v13 + 367);
}
else if ( v11 != *((float *)v13 + 367) )
{
v11 = -99999.0;
v12 = 1;
}
}
if ( !v6 )
{
v15 = *((_DWORD *)v13 + 378);
if ( v4 == -99999 )
{
v4 = v15;
}
else if ( v4 != v15 )
{
v4 = -99999;
v6 = 1;
}
}
if ( !v7 )
{
if ( v10 == -99999.0 )
{
v10 = *((float *)v14 + 379);
}
else if ( v10 != *((float *)v14 + 379) )
{
v10 = -99999.0;
v7 = 1;
}
}
if ( !v9 )
{
v16 = (struct cocos2d::CCObject *)((char *)v14 + 1504);
if ( v5 == -99999 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, v16);
v5 = (int)v19;
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, v16);
if ( v5 != (int)v21 )
{
v5 = -99999;
v9 = 1;
}
}
}
++v8;
}
while ( v8 < cocos2d::CCArray::count(v3) );
if ( v11 != -99999.0 )
*(float *)(a1 + 1016) = v11;
if ( v4 != -99999 )
*(_DWORD *)(a1 + 1032) = v4;
if ( v10 != -99999.0 )
*(float *)(a1 + 1036) = v10;
if ( v5 != -99999 )
*(_DWORD *)(a1 + 1072) = v5;
}
}
}
}