//
// LevelTools::verifyLevelIntegrity from 0x100501cd0 to 0x100501dcb (251 bytes)
//
// 1 xrefs:
// > PlayLayer::init @ 0x1000acb2c
//
// 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
//
bool __fastcall LevelTools::verifyLevelIntegrity(unsigned __int8 *a1, int a2)
{
unsigned int v2; // eax
__int64 v3; // rax
__int64 v4; // rsi
bool result; // al
v2 = *a1;
if ( (v2 & 1) != 0 )
{
v3 = *((_QWORD *)a1 + 1);
v4 = (unsigned int)(a2 - 1);
if ( (unsigned int)v4 > 0x13 )
return 1;
}
else
{
LODWORD(v3) = v2 >> 1;
v4 = (unsigned int)(a2 - 1);
}
switch ( v4 )
{
case 0LL:
result = (_DWORD)v3 == 41941;
break;
case 1LL:
result = (_DWORD)v3 == 27194;
break;
case 2LL:
result = (_DWORD)v3 == 27485;
break;
case 3LL:
result = (_DWORD)v3 == 28387;
break;
case 4LL:
result = (_DWORD)v3 == 39306;
break;
case 5LL:
result = (_DWORD)v3 == 32534;
break;
case 6LL:
result = (_DWORD)v3 == 52577;
break;
case 7LL:
result = (_DWORD)v3 == 68387;
break;
case 8LL:
result = (_DWORD)v3 == 73863;
break;
case 9LL:
result = (_DWORD)v3 == 95360;
break;
case 10LL:
result = (_DWORD)v3 == 96482;
break;
case 11LL:
result = (_DWORD)v3 == 91628;
break;
case 12LL:
result = (_DWORD)v3 == 119893;
break;
case 13LL:
result = (_DWORD)v3 == 162731;
break;
case 14LL:
result = (_DWORD)v3 == 207047;
break;
case 15LL:
result = (_DWORD)v3 == 238937;
break;
case 16LL:
result = (_DWORD)v3 == 290335;
break;
case 17LL:
result = (_DWORD)v3 == 370132;
break;
case 18LL:
result = (_DWORD)v3 == 635171;
break;
case 19LL:
result = (_DWORD)v3 == 739125;
break;
default:
return 1;
}
return result;
}