//
// sub_14051B9A0 from 0x14051b9a0 to 0x14051ba34 (148 bytes)
//
// 4 xrefs:
// > PlayLayer::saveActiveSaveObjects @ 0x140517b8f
// > ??> @ 0x1408d780c
// > ??> @ 0x1408d781c
// > ??> @ 0x14092af08
//
// 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:33:35 +0000
//
void __fastcall sub_14051B9A0(__int64 a1, unsigned __int64 a2)
{
const void *v4; // rcx
__int64 v5; // rdi
_QWORD *v6; // rbx
v4 = *(const void **)a1;
if ( a2 > (__int64)(*(_QWORD *)(a1 + 16) - (_QWORD)v4) >> 4 )
{
if ( a2 > 0xFFFFFFFFFFFFFFFLL )
sub_14005A170();
v5 = (__int64)(*(_QWORD *)(a1 + 8) - (_QWORD)v4) >> 4;
v6 = sub_14003D460(16 * a2);
memmove(v6, *(const void **)a1, *(_QWORD *)(a1 + 8) - *(_QWORD *)a1);
sub_14035D150(a1, (__int64)v6, v5, a2);
}
}