//
// SetupTouchTogglePopup::determineStartValues from 0x1002a7810 to 0x1002a7989 (377 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b0cb28
//
// 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:27:56 +0000
//
__int64 __fastcall SetupTouchTogglePopup::determineStartValues(__int64 a1)
{
__int64 result; // rax
__int64 v2; // r14
unsigned int i; // r15d
__int64 v4; // rax
int v5; // edx
int v6; // ecx
bool v7; // zf
int v8; // edx
int v9; // ecx
int v10; // ecx
int v11; // eax
result = SetupTriggerPopup::determineStartValues(a1);
if ( *(_QWORD *)(a1 + 680) )
{
v2 = sub_1007FE900(a1);
result = sub_1007FEBF0(v2, *(_QWORD *)(a1 + 680));
if ( !v2 )
return result;
}
else
{
v2 = *(_QWORD *)(a1 + 688);
if ( !v2 )
return result;
}
result = sub_1007FEF90(v2);
if ( (_DWORD)result )
{
*(_BYTE *)(a1 + 1028) = 1;
*(_DWORD *)(a1 + 1024) = -1;
*(_BYTE *)(a1 + 1056) = 1;
*(_QWORD *)(a1 + 1032) = -1;
result = sub_1007FEF90(v2);
if ( (_DWORD)result )
{
for ( i = 0; i < (unsigned int)result; ++i )
{
v4 = sub_1007FEFE0(v2, i);
if ( *(_BYTE *)(v4 + 1638) )
{
if ( *(_BYTE *)(v4 + 1648) )
goto LABEL_12;
}
else
{
*(_BYTE *)(a1 + 1028) = 0;
if ( *(_BYTE *)(v4 + 1648) )
{
LABEL_12:
v5 = *(_DWORD *)(a1 + 1024);
v6 = *(_DWORD *)(v4 + 1464);
if ( v5 != -1 )
goto LABEL_16;
goto LABEL_17;
}
}
*(_BYTE *)(a1 + 1056) = 0;
v5 = *(_DWORD *)(a1 + 1024);
v6 = *(_DWORD *)(v4 + 1464);
if ( v5 != -1 )
{
LABEL_16:
v7 = v5 == v6;
v6 = 0;
if ( v7 )
goto LABEL_18;
}
LABEL_17:
*(_DWORD *)(a1 + 1024) = v6;
LABEL_18:
v8 = *(_DWORD *)(a1 + 1032);
v9 = *(_DWORD *)(v4 + 1640);
if ( v8 == -1 || (v7 = v8 == v9, v9 = 0, !v7) )
*(_DWORD *)(a1 + 1032) = v9;
v10 = *(_DWORD *)(a1 + 1036);
v11 = *(_DWORD *)(v4 + 1644);
if ( v10 == -1 || (v7 = v10 == v11, v11 = 0, !v7) )
*(_DWORD *)(a1 + 1036) = v11;
result = sub_1007FEF90(v2);
}
}
}
return result;
}