//
// SetupTriggerPopup::updateTouchTriggered from 0x10021b780 to 0x10021b865 (229 bytes)
//
// 2 xrefs:
// > SetupTriggerPopup::onTouchTriggered @ 0x10021b34a
// > SetupTriggerPopup::onSpawnedByTrigger @ 0x10021b379
//
// 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:02 +0000
//
__int64 __fastcall SetupTriggerPopup::updateTouchTriggered(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rdi
unsigned int v4; // r14d
__int64 v5; // rax
unsigned __int8 v6; // cl
__int64 v7; // rdi
unsigned int v8; // r14d
result = *(_QWORD *)(a1 + 680);
if ( result )
{
*(_BYTE *)(result + 1472) = *(_BYTE *)(a1 + 696);
}
else
{
v7 = *(_QWORD *)(a1 + 688);
if ( v7 )
{
result = sub_1007FEF90(v7);
if ( (_DWORD)result )
{
v8 = 0;
do
{
*(_BYTE *)(sub_1007FEFE0(*(_QWORD *)(a1 + 688), v8++) + 1472) = *(_BYTE *)(a1 + 696);
result = sub_1007FEF90(*(_QWORD *)(a1 + 688));
}
while ( v8 < (unsigned int)result );
}
}
}
v3 = *(_QWORD *)(a1 + 720);
if ( v3 )
{
result = sub_1007FEF90(v3);
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 720), v4);
v6 = 1;
if ( !*(_BYTE *)(a1 + 697) )
v6 = *(_BYTE *)(a1 + 696);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 344LL))(v5, v6);
++v4;
result = sub_1007FEF90(*(_QWORD *)(a1 + 720));
}
while ( v4 < (unsigned int)result );
}
}
return result;
}