//
// sub_14024D4F0 from 0x14024d4f0 to 0x14024d594 (164 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::resetActiveEnterEffects @ 0x14020e3b4
// > GJBaseGameLayer::resetActiveEnterEffects @ 0x14020e3d4
// > ??> @ 0x1406831b8
// > ??> @ 0x1406831c8
// > ??> @ 0x1406cef34
//
// 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
//
unsigned __int64 __fastcall sub_14024D4F0(unsigned int *a1, unsigned __int64 a2, unsigned int *a3)
{
unsigned int *v3; // r9
unsigned __int64 result; // rax
unsigned __int64 v6; // r8
unsigned int *v7; // rdi
unsigned __int64 v8; // r8
unsigned __int64 i; // rcx
v3 = a1;
result = a2 - (_QWORD)a1;
if ( !*a3 )
return (unsigned __int64)memset(a1, 0, result & 0xFFFFFFFFFFFFFFFCuLL);
v6 = (result + 3) >> 2;
if ( (unsigned __int64)a1 > a2 )
v6 = 0;
if ( v6 >= 4 )
{
result = (unsigned __int64)&a1[v6 - 1];
if ( a1 > a3 || result < (unsigned __int64)a3 )
{
result = (int)*a3;
v7 = a1;
v8 = 4 * (v6 & 0xFFFFFFFFFFFFFFFCuLL);
for ( i = v8 >> 2; i; --i )
*v7++ = result;
v3 = (unsigned int *)((char *)v3 + v8);
}
}
for ( ; v3 != (unsigned int *)a2; ++v3 )
{
result = *a3;
*v3 = result;
}
return result;
}