//
// SetupTouchTogglePopup::determineStartValues from 0x1002b9720 to 0x1002b9899 (377 bytes)
//
// 1 xrefs:
// > ??> @ 0x100905560
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall SetupTouchTogglePopup::determineStartValues(SetupTouchTogglePopup *a1)
{
__int64 v1; // rsi
__int64 m_gameObjects; // r14
unsigned int i; // r15d
__int64 v4; // rax
int m_groupID; // edx
int v6; // ecx
bool v7; // zf
int m_toggleMode; // edx
int v9; // ecx
int m_playerMode; // ecx
int v11; // eax
SetupTriggerPopup::determineStartValues(a1);
if ( a1->m_gameObject )
{
m_gameObjects = sub_10071F9E0(a1, v1);
sub_10071FCD0(m_gameObjects, a1->m_gameObject);
if ( !m_gameObjects )
return;
}
else
{
m_gameObjects = (__int64)a1->m_gameObjects;
if ( !m_gameObjects )
return;
}
if ( (unsigned int)sub_100720070(m_gameObjects) )
{
a1->m_holdMode = 1;
a1->m_groupID = -1;
a1->m_dualMode = 1;
*(_QWORD *)&a1->m_toggleMode = -1;
if ( (unsigned int)sub_100720070(m_gameObjects) )
{
for ( i = 0; i < (unsigned int)sub_100720070(m_gameObjects); ++i )
{
v4 = sub_1007200C0(m_gameObjects, i);
if ( *(_BYTE *)(v4 + 1638) )
{
if ( *(_BYTE *)(v4 + 1648) )
goto LABEL_12;
}
else
{
a1->m_holdMode = 0;
if ( *(_BYTE *)(v4 + 1648) )
{
LABEL_12:
m_groupID = a1->m_groupID;
v6 = *(_DWORD *)(v4 + 1464);
if ( m_groupID != -1 )
goto LABEL_16;
goto LABEL_17;
}
}
a1->m_dualMode = 0;
m_groupID = a1->m_groupID;
v6 = *(_DWORD *)(v4 + 1464);
if ( m_groupID != -1 )
{
LABEL_16:
v7 = m_groupID == v6;
v6 = 0;
if ( v7 )
goto LABEL_18;
}
LABEL_17:
a1->m_groupID = v6;
LABEL_18:
m_toggleMode = a1->m_toggleMode;
v9 = *(_DWORD *)(v4 + 1640);
if ( m_toggleMode == -1 || (v7 = m_toggleMode == v9, v9 = 0, !v7) )
a1->m_toggleMode = v9;
m_playerMode = a1->m_playerMode;
v11 = *(_DWORD *)(v4 + 1644);
if ( m_playerMode != -1 )
{
v7 = m_playerMode == v11;
v11 = 0;
if ( v7 )
continue;
}
a1->m_playerMode = v11;
}
}
}
}