//
// sub_14024F320 from 0x14024f320 to 0x14024f3a4 (132 bytes)
//
// 8 xrefs:
// > GJBaseGameLayer::init @ 0x140207008
// > GJBaseGameLayer::init @ 0x140207039
// > GJBaseGameLayer::init @ 0x1402076b0
// > sub_1402E1DF0 @ 0x1402e1e4f
// > sub_1402E5800 @ 0x1402e63b0
// > ??> @ 0x1406833e0
// > ??> @ 0x1406833f0
// > ??> @ 0x1406cefdc
//
// 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
//
__int64 __fastcall sub_14024F320(__int64 a1, __int64 *a2, __int64 a3)
{
__int64 v4; // rbx
__int64 v5; // rcx
__int64 v7; // rbx
_QWORD *v8; // rbp
v4 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
v5 = *a2;
v7 = v4 >> 3;
if ( (unsigned __int64)*a2 > 0x1FFFFFFFFFFFFFFFLL )
sub_140007AB0(v5, a2, a3);
v8 = sub_14003AA10(8 * v5);
memmove(v8, *(const void **)a1, *(_QWORD *)(a1 + 8) - *(_QWORD *)a1);
return sub_14012D3C0(a1, (__int64)v8, v7, *a2);
}