//
// SetupSequenceTriggerPopup::onChangeOrder from 0x1405da010 to 0x1405da0f1 (225 bytes)
//
// 4 xrefs:
// > SetupSequenceTriggerPopup::init @ 0x1405d8e33
// > ??> @ 0x1408e1894
// > ??> @ 0x1408e18c8
// > ??> @ 0x14092eb74
//
// 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 11:34:58 +0000
//
void __fastcall SetupSequenceTriggerPopup::onChangeOrder(__int64 a1, __int64 a2)
{
int v3; // esi
int v4; // eax
__int64 v5; // rcx
__int64 v6; // rdx
__int64 v7; // r8
__int64 v8; // rax
int v9; // ebx
__int128 v10; // xmm1
int v11; // eax
if ( *(_QWORD *)(a1 + 1000) )
{
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1000) + 56LL))(*(_QWORD *)(a1 + 1000));
v5 = *(_QWORD *)(a1 + 680);
v6 = v4;
v7 = *(_QWORD *)(v5 + 1856);
v8 = (*(_QWORD *)(v5 + 1864) - v7) >> 4;
if ( (int)v8 > (int)v6
&& ((_DWORD)v6 != (_DWORD)v8 - 1 || v3 != 3)
&& ((_DWORD)v6 || v3 == 3)
&& v7 != *(_QWORD *)(v5 + 1864) )
{
v9 = 0;
if ( v3 == 3 )
v9 = 2;
v10 = *(_OWORD *)(v7 + 16 * v6);
*(_OWORD *)(v7 + 16 * v6) = *(_OWORD *)(v7 + 16LL * (v9 + (int)v6) - 16);
*(_OWORD *)(v7 + 16LL * (v9 + (int)v6) - 16) = v10;
v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1000) + 56LL))(*(_QWORD *)(a1 + 1000));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1000) + 64LL))(
*(_QWORD *)(a1 + 1000),
(unsigned int)(v9 + v11 - 1));
SetupSequenceTriggerPopup::updateGroupIDButtons(a1);
}
}
}