//
// sub_100252880 from 0x100252880 to 0x100252914 (148 bytes)
//
// 2 xrefs:
// > sub_100252784 @ 0x1002527b8
// > sub_100252784 @ 0x1002527c4
//
// 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
//
void __fastcall sub_100252880(_QWORD *a1, unsigned __int64 a2)
{
__int64 v3; // x9
unsigned __int64 v4; // x8
bool v5; // cf
unsigned __int64 v6; // x8
__int64 v7; // x20
__int64 v8; // x21
void *v9; // x0
void *v10; // t1
v3 = a1[1];
v4 = 0xAAAAAAAAAAAAAAABLL * ((v3 - *a1) >> 3);
v5 = a2 >= v4;
v6 = a2 - v4;
if ( v6 != 0 && v5 )
{
sub_1002530F0(a1, v6);
}
else if ( !v5 )
{
v7 = *a1 + 24 * a2;
if ( v3 != v7 )
{
v8 = a1[1];
do
{
v10 = *(void **)(v8 - 24);
v8 -= 24;
v9 = v10;
if ( v10 )
{
*(_QWORD *)(v3 - 16) = v9;
operator delete(v9);
}
v3 = v8;
}
while ( v8 != v7 );
}
a1[1] = v7;
}
}