//
// LevelInfoLayer::shouldDownloadLevel from 0x10002c950 to 0x10002c9f8 (168 bytes)
//
// 5 xrefs:
// > LevelInfoLayer::onPlay @ 0x100029d84
// > sub_10002A588 @ 0x10002a5c0
// > LevelInfoLayer::onUpdate @ 0x10002b9b4
// > LevelInfoLayer::onEnterTransitionDidFinish @ 0x10002dd4c
// > LevelInfoLayer::onClone @ 0x10002e1c8
//
// This function is hookable on this platform (idp: arm, 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 10:57:29 +0000
//
__int64 __fastcall LevelInfoLayer::shouldDownloadLevel(__int64 a1)
{
__int64 v1; // x8
_BOOL8 v2; // x19
__int64 v3; // x8
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v6; // [xsp+1Fh] [xbp-31h]
void *__dst[2]; // [xsp+20h] [xbp-30h] BYREF
__int64 v8; // [xsp+30h] [xbp-20h]
v1 = *(_QWORD *)(a1 + 504);
if ( *(_DWORD *)(v1 + 1140) == 4 )
return 1;
if ( *(char *)(v1 + 415) < 0 )
{
sub_1000097D0(__dst, *(void **)(v1 + 392), *(_QWORD *)(v1 + 400));
}
else
{
v3 = v1 + 392;
*(_OWORD *)__dst = *(_OWORD *)v3;
v8 = *(_QWORD *)(v3 + 16);
}
sub_100009900(__p, "");
v2 = sub_1000045BC(__dst, __p);
if ( v6 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v8) < 0 )
operator delete(__dst[0]);
return v2;
}