//
// GameLevelManager::isTimeValid from 0x8005c0 to 0x800718 (344 bytes)
//
// 5 xrefs:
// > GameLevelManager::getStoredOnlineLevels @ 0x800748
// > GameLevelManager::isUpdateValid @ 0x802374
// > GameLevelManager::getStoredLevelComments @ 0x803224
// > GameLevelManager::getEditorSoundConfigs @ 0x82f1fc
// > ??> @ 0xf7d50
//
// 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 12:54:43 +0000
//
bool __fastcall GameLevelManager::isTimeValid(GameLevelManager *this, const char *a2, float a3)
{
__int64 v4; // x23
size_t v5; // x0
size_t v6; // x19
const char *v7; // x1
unsigned __int64 v8; // x0
__int64 v9; // x22
char *v10; // x0
char *v11; // x3
cocos2d::CCString *v12; // x19
double v13; // d0
__int64 v16; // [xsp+60h] [xbp+60h] BYREF
size_t v17; // [xsp+68h] [xbp+68h]
void *v18; // [xsp+70h] [xbp+70h]
v4 = *((_QWORD *)this + 121);
v16 = 0;
v17 = 0;
v18 = nullptr;
v5 = strlen(a2);
v6 = v5;
v7 = a2;
if ( v5 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v5 > 0x16 )
{
v8 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v9 = v8 | 1;
v10 = (char *)operator new(v8);
v16 = v9;
v7 = a2;
v11 = v10;
v18 = v10;
v17 = v6;
LABEL_4:
v11 = (char *)memcpy(v11, v7, v6);
goto LABEL_5;
}
LOBYTE(v16) = 2 * v5;
v11 = (char *)&v16 + 1;
if ( v5 )
goto LABEL_4;
LABEL_5:
v11[v6] = 0;
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v4, &v16);
if ( (v16 & 1) != 0 )
{
operator delete(v18);
if ( v12 )
goto LABEL_7;
}
else if ( v12 )
{
LABEL_7:
cocos2d::CCString::doubleValue(v12);
return sub_7FE580() - v13 <= a3;
}
return 0;
}