//
// sub_140249A30 from 0x140249a30 to 0x140249abf (143 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::init @ 0x1402075a8
// > GJBaseGameLayer::init @ 0x1402075b4
// > GJBaseGameLayer::init @ 0x1402075c0
// > LevelEditorLayer::init @ 0x1402d2403
// > ??> @ 0x1406ce940
//
// 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_140249A30(__int64 *a1)
{
char *v1; // rsi
__int64 v3; // rdx
unsigned __int64 v4; // rcx
char *v5; // rax
size_t v6; // rbx
v1 = (char *)a1[1];
v3 = *a1;
v4 = (__int64)&v1[-*a1] >> 3;
if ( v4 <= 0x2710 )
{
if ( v4 >= 0x2710 )
return;
if ( (unsigned __int64)((a1[2] - v3) >> 3) < 0x2710 )
{
sub_1402531F0(a1);
return;
}
v6 = 8 * (10000 - v4);
memset(v1, 0, v6);
v5 = &v1[v6];
}
else
{
v5 = (char *)(v3 + 80000);
}
a1[1] = (__int64)v5;
}