//
// GameLevelManager::isTimeValid from 0x140149d90 to 0x140149ec5 (309 bytes)
//
// 4 xrefs:
// > GameLevelManager::getStoredOnlineLevels @ 0x1401498a7
// > GameLevelManager::getStoredLevelComments @ 0x14015d9d7
// > LevelInfoLayer::onUpdate @ 0x1402fed84
// > ??> @ 0x1406ca6f8
//
// 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
//
// Hidden C++ exception states: #wind=1
bool GameLevelManager::isTimeValid(GameLevelManager *a1, const char *a2, float a3)
{
size_t v4; // r8
cocos2d::CCString *v5; // rbx
void *v6; // rcx
double v7; // xmm0_8
void *Block[2]; // [rsp+20h] [rbp-58h] BYREF
__m128i si128; // [rsp+30h] [rbp-48h]
*(_OWORD *)Block = 0;
si128 = 0;
v4 = -1;
do
++v4;
while ( a2[v4] );
sub_14003A930(Block, a2, v4);
v5 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a1->m_timerDict, Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v6);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);
LOBYTE(Block[0]) = 0;
if ( !v5 )
return 0;
v7 = cocos2d::CCString::doubleValue(v5);
ftime64((struct __timeb64 *)Block);
return a3 >= (double)(LOWORD(Block[1]) + 1000 * ((__int64)Block[0] & 0xFFFFF)) / 1000.0 - v7;
}