//
// sub_10005CA70 from 0x10005ca70 to 0x10005cb50 (224 bytes)
//
// 1 xrefs:
// > LevelSearchLayer::init @ 0x10005b3e4
//
// 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:48 +0000
//
__int64 __fastcall sub_10005CA70(__int64 a1)
{
__int64 v2; // x0
int BoolForKey; // w20
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
__int64 result; // x0
char v8; // w8
__int64 v9; // x0
__int64 v10; // x0
_WORD v11[5]; // [xsp+4h] [xbp-2Ch] BYREF
char v12; // [xsp+Eh] [xbp-22h]
v2 = GameLevelManager::sharedState(a1);
BoolForKey = GameLevelManager::getBoolForKey(v2, "nostar_filter");
v4 = *(_QWORD *)(a1 + 456);
if ( (BoolForKey & 1) != 0 )
{
memset(&v11[2], 125, 3);
}
else
{
v12 = -1;
v11[4] = -1;
}
v5 = (*(__int64 (**)(void))(*(_QWORD *)v4 + 960LL))();
v6 = GameLevelManager::sharedState(v5);
result = sub_1000CDDD4(v6, BoolForKey ^ 1u, "nostar_filter");
if ( *(_DWORD *)(a1 + 432) == 1 )
v8 = BoolForKey;
else
v8 = 1;
if ( (v8 & 1) == 0 )
{
v9 = GameLevelManager::sharedState(result);
sub_1000CDDD4(v9, 0, "star_filter");
v10 = *(_QWORD *)(a1 + 448);
memset(v11, 125, 3);
return (*(__int64 (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v10 + 960LL))(v10, v11);
}
return result;
}