//
// SetupAreaTintTriggerPopup::determineStartValues from 0x1004d4160 to 0x1004d4305 (421 bytes)
//
// 2 xrefs:
// > ??> @ 0x100b5ee20
// > ??> @ 0x100b5feb8
//
// 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 12:31:13 +0000
//
__int64 __fastcall SetupAreaTintTriggerPopup::determineStartValues(__int64 a1)
{
int v1; // r13d
__int64 result; // rax
__int64 v3; // r14
char v4; // r12
unsigned int v5; // r15d
int v6; // ebx
__int64 v7; // rax
__m128 v8; // xmm0
__int64 v9; // rax
__int64 v10; // rdx
result = SetupTriggerPopup::determineStartValues(a1);
if ( *(_QWORD *)(a1 + 680) )
{
v3 = sub_1007FE900(a1);
result = sub_1007FEBF0(v3, *(_QWORD *)(a1 + 680));
if ( !v3 )
return result;
}
else
{
v3 = *(_QWORD *)(a1 + 688);
if ( !v3 )
return result;
}
result = sub_1007FEF90(v3);
if ( (_DWORD)result )
{
*(_OWORD *)(a1 + 1048) = xmmword_100BE43B8;
result = sub_1007FEF90(v3);
if ( (_DWORD)result )
{
v4 = 0;
LOBYTE(v1) = 1;
v5 = 0;
do
{
v7 = sub_1007FEFE0(v3, v5);
if ( (v4 & 1) != 0 )
{
v6 = v1;
v4 = 1;
}
else
{
v8 = (__m128)*(unsigned __int64 *)(v7 + 1612);
v9 = *(_QWORD *)(v7 + 1620);
if ( (v1 & 1) != 0 )
goto LABEL_12;
v10 = a1;
if ( *(float *)(a1 + 1048) != v8.f32[0]
|| *(float *)(a1 + 1052) != _mm_movehdup_ps(v8).f32[0]
|| *(float *)(a1 + 1056) != *(float *)&v9
|| *(_BYTE *)(a1 + 1060) != BYTE4(v9) )
{
v8 = (__m128)0xBA83126F;
v9 = 0;
goto LABEL_20;
}
v6 = 0;
v4 = 0;
if ( *(_BYTE *)(a1 + 1061) != BYTE5(v9) )
{
v8 = (__m128)0xBA83126F;
v9 = 0;
LABEL_12:
v10 = a1;
LABEL_20:
_mm_storel_ps((double *)(v10 + 1048), v8);
*(_QWORD *)(v10 + 1056) = v9;
v6 = 0;
v4 = v1 ^ 1;
}
}
++v5;
result = sub_1007FEF90(v3);
v1 = v6;
}
while ( v5 < (unsigned int)result );
}
}
return result;
}