//
// sub_14024B1D0 from 0x14024b1d0 to 0x14024b26b (155 bytes)
//
// 34 xrefs:
// > sub_140207A90 @ 0x140208506
// > sub_140207A90 @ 0x140208519
// > GJBaseGameLayer::activateEventTrigger @ 0x140232243
// > GJBaseGameLayer::controlEventLink @ 0x140232462
// > sub_140250C90 @ 0x140250e84
// > GJEffectManager::controlActionsForControlID @ 0x14025dba4
// > GJEffectManager::controlActionsForControlID @ 0x14025dcdc
// > GJEffectManager::controlActionsForControlID @ 0x14025de0b
// > GJEffectManager::controlActionsForControlID @ 0x14025df29
// > GJEffectManager::controlActionsForControlID @ 0x14025e30d
// > GJEffectManager::controlActionsForTrigger @ 0x14025e869
// > GJEffectManager::controlActionsForTrigger @ 0x14025e9a4
// > GJEffectManager::controlActionsForTrigger @ 0x14025eadd
// > GJEffectManager::controlActionsForTrigger @ 0x14025ec1c
// > GJEffectManager::controlActionsForTrigger @ 0x14025ed9d
// > GJEffectManager::updateSpawnTriggers @ 0x140261f68
// > GJEffectManager::updateCountForItem @ 0x1402627af
// > GJEffectManager::updateTimers @ 0x14026372b
// > sub_140267DD0 @ 0x140267e35
// > sub_14026A410 @ 0x14026a843
// > sub_14026C9F0 @ 0x14026cc5b
// > sub_14026E250 @ 0x14026e368
// > sub_14026E250 @ 0x14026e40f
// > sub_14026E250 @ 0x14026e469
// > sub_14026F4F0 @ 0x14026f5b1
// > sub_14026F4F0 @ 0x14026f629
// > sub_14026F4F0 @ 0x14026f6a4
// > sub_14026F4F0 @ 0x14026f71c
// > sub_14026F920 @ 0x14026fa0c
// > sub_14026F920 @ 0x14026fa4f
// > ??> @ 0x140682db0
// > ??> @ 0x140682dc0
// > ??> @ 0x140682dd4
// > ??> @ 0x1406cec28
//
// 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
//
_QWORD *__fastcall sub_14024B1D0(_QWORD *a1, _QWORD *a2)
{
_QWORD *v4; // rcx
if ( a1 != a2 )
{
v4 = (_QWORD *)*a1;
if ( v4 )
{
if ( ((a1[2] - (_QWORD)v4) & 0xFFFFFFFFFFFFFFFCuLL) >= 0x1000 )
{
if ( (unsigned __int64)v4 - *(v4 - 1) - 8 > 0x1F )
invalid_parameter_noinfo_noreturn();
v4 = (_QWORD *)*(v4 - 1);
}
j_j_free(v4);
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
}
*a1 = *a2;
a1[1] = a2[1];
a1[2] = a2[2];
*a2 = 0;
a2[1] = 0;
a2[2] = 0;
}
return a1;
}