//
// SetupAnimationPopup::onAnimationIDArrow from 0x1003be9a0 to 0x1003bea51 (177 bytes)
//
// 2 xrefs:
// > sub_1003BDEC0 @ 0x1003be789
// > sub_1003BDEC0 @ 0x1003be82c
//
// 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:31 +0000
//
__int64 __fastcall SetupAnimationPopup::onAnimationIDArrow(__int64 a1, __int64 a2)
{
int v3; // eax
int v4; // ecx
int v5; // eax
__int64 v6; // rcx
__int64 v8; // rdi
unsigned int v9; // r14d
v3 = *(_DWORD *)(a1 + 1036) + 2 * ((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 1) - 1;
v4 = 0;
if ( v3 > 0 )
v4 = v3;
v5 = 999;
if ( v4 < 999 )
v5 = v4;
*(_DWORD *)(a1 + 1036) = v5;
v6 = *(_QWORD *)(a1 + 680);
if ( v6 )
{
*(_DWORD *)(v6 + 1652) = v5;
}
else
{
v8 = *(_QWORD *)(a1 + 688);
if ( v8 && (unsigned int)sub_1007FEF90(v8) )
{
v9 = 0;
do
*(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 688), v9++) + 1652) = *(_DWORD *)(a1 + 1036);
while ( v9 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) );
}
}
return sub_1003BEB70(a1);
}