//
// SetupGravityModPopup::determineStartValues from 0x1003c5e70 to 0x1003c5f8d (285 bytes)
//
// 1 xrefs:
// > SetupGravityModPopup::init @ 0x1003c5677
//
// 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:29:34 +0000
//
__int64 __fastcall SetupGravityModPopup::determineStartValues(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rdi
unsigned int v4; // r14d
float v5; // xmm1_4
int v6; // ecx
int v7; // eax
bool v8; // zf
result = *(_QWORD *)(a1 + 664);
if ( result )
{
*(_DWORD *)(a1 + 696) = *(_DWORD *)(result + 1812);
result = *(unsigned int *)(result + 1680);
*(_DWORD *)(a1 + 728) = result;
}
else
{
v3 = *(_QWORD *)(a1 + 672);
if ( v3 )
{
result = sub_1007FEF90(v3);
if ( (_DWORD)result )
{
*(_DWORD *)(a1 + 696) = 1065353216;
*(_DWORD *)(a1 + 728) = -1;
result = sub_1007FEF90(*(_QWORD *)(a1 + 672));
if ( (_DWORD)result )
{
v4 = 0;
v5 = -999.0;
do
{
result = sub_1007FEFE0(*(_QWORD *)(a1 + 672), v4);
if ( v5 == -999.0 )
{
v5 = *(float *)(result + 1812);
}
else if ( v5 != *(float *)(result + 1812) )
{
break;
}
v6 = *(_DWORD *)(a1 + 728);
v7 = *(_DWORD *)(result + 1680);
if ( v6 == -1 || (v8 = v6 == v7, v7 = 0, !v8) )
*(_DWORD *)(a1 + 728) = v7;
++v4;
result = sub_1007FEF90(*(_QWORD *)(a1 + 672));
}
while ( v4 < (unsigned int)result );
}
else
{
v5 = -999.0;
}
*(float *)(a1 + 696) = v5;
}
}
}
return result;
}