//
// sub_10004B4E0 from 0x10004b4e0 to 0x10004b590 (176 bytes)
//
// 6 xrefs:
// > LocalLevelManager::tryRecoverAutoSaves @ 0x10025fc28
// > LocalLevelManager::tryRecoverAutoSaves @ 0x10025fc84
// > LocalLevelManager::exportLevelsToFile @ 0x100260b98
// > LocalLevelManager::filesPicked @ 0x1002618e8
// > sub_100530FA8 @ 0x100531084
// > sub_100530FA8 @ 0x1005310e4
//
// 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:41 +0000
//
bool __fastcall sub_10004B4E0(__int64 **a1, _QWORD *a2)
{
size_t v2; // x12
size_t v3; // x11
size_t v4; // x9
int v5; // w8
size_t v6; // x20
size_t v7; // x9
size_t v10; // x19
bool v11; // cf
size_t v12; // x11
v2 = *((unsigned __int8 *)a1 + 23);
v3 = (size_t)a1[1];
if ( (v2 & 0x80u) == 0LL )
v4 = *((unsigned __int8 *)a1 + 23);
else
v4 = (size_t)a1[1];
v5 = *((char *)a2 + 23);
if ( v5 >= 0 )
v6 = *((unsigned __int8 *)a2 + 23);
else
v6 = a2[1];
v11 = v4 >= v6;
v7 = v4 - v6;
if ( !v11 )
return 0;
if ( (v2 & 0x80) != 0 )
{
v11 = v6 != -1 && v3 >= v7;
if ( v11 )
{
v12 = v3 - v7;
if ( v12 >= v6 )
v10 = v6;
else
v10 = v12;
a1 = (__int64 **)*a1;
goto LABEL_26;
}
LABEL_34:
sub_100050040();
}
if ( v2 < v7 || v6 == -1 )
goto LABEL_34;
if ( v2 - v7 >= v6 )
v10 = v6;
else
v10 = v2 - v7;
LABEL_26:
if ( v5 < 0 )
a2 = (_QWORD *)*a2;
return !memcmp((char *)a1 + v7, a2, v10) && v10 == v6;
}