//
// GameLevelManager::isTimeValid from 0x6f2b98 to 0x6f2cec (340 bytes)
//
// 4 xrefs:
// > GameLevelManager::getStoredOnlineLevels @ 0x6f2d24
// > GameLevelManager::isUpdateValid @ 0x6f6068
// > GameLevelManager::getStoredLevelComments @ 0x6f8e28
// > ??> @ 0xbe158
//
// 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 GameLevelManager::isTimeValid(GameLevelManager *a1, const char *a2, float a3)
{
cocos2d::CCDictionary *m_timerDict; // x21
cocos2d::CCString *v5; // x21
char *v6; // x0
unsigned int *v8; // x2
int v9; // w1
double v10; // [xsp+30h] [xbp+30h]
std::string v11[2]; // [xsp+58h] [xbp+58h] BYREF
m_timerDict = a1->m_timerDict;
sub_D153B8((int)v11, (char *)a2);
v5 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(m_timerDict, v11);
v6 = (char *)v11[0].m_data.m_data - 24;
if ( (__int64 *)v11[0].m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)((char *)v11[0].m_data.m_data - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)v11[0].m_data.m_data - 2);
*((_DWORD *)v11[0].m_data.m_data - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v6);
}
if ( !v5 )
return 0;
v10 = cocos2d::CCString::doubleValue(v5);
clock_gettime(0, (struct timespec *)v11);
return (double)(__int64)v11[0].m_data.m_data + (double)(__int64)v11[1].m_data.m_data / 1000000000.0 - v10 <= a3;
}