//
// GameLevelManager::resetCommentTimersForAccountID from 0x14015eed0 to 0x14015f061 (401 bytes)
//
// 3 xrefs:
// > ProfilePage::onUpdate @ 0x1403bfaca
// > ProfilePage::onUpdate @ 0x1403bfdb9
// > ??> @ 0x1406caaf4
//
// 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=2
void GameLevelManager::resetCommentTimersForAccountID(GameLevelManager *a1, int a2)
{
char v4; // di
int v5; // ebx
cocos2d::CCString *v6; // rax
const char *CString; // rax
size_t v8; // r8
void **v9; // rdx
void **v10; // rdx
void *v11; // rcx
void *v12; // rcx
void *v13; // [rsp+20h] [rbp-48h]
void *Block[2]; // [rsp+28h] [rbp-40h] BYREF
__int64 v15; // [rsp+38h] [rbp-30h]
unsigned __int64 v16; // [rsp+40h] [rbp-28h]
v4 = 1;
v5 = 0;
while ( 1 )
{
if ( !qword_1406C2EC0 )
{
v13 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
}
v6 = cocos2d::CCString::createWithFormat("a_%i_%i", a2, v5);
CString = cocos2d::CCString::getCString(v6);
*(_OWORD *)Block = 0;
v15 = 0;
v16 = 0;
v8 = -1;
do
++v8;
while ( CString[v8] );
sub_14003A930(Block, CString, v8);
v9 = Block;
if ( v16 > 0xF )
v9 = (void **)Block[0];
if ( GameLevelManager::keyHasTimer(a1, (const char *)v9) )
{
v10 = Block;
if ( v16 > 0xF )
v10 = (void **)Block[0];
GameLevelManager::resetTimerForKey(a1, (const char *)v10);
}
else
{
v4 = 0;
}
if ( ++v5 > 100 )
break;
if ( v16 > 0xF )
{
v11 = Block[0];
if ( v16 + 1 >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
goto LABEL_23;
}
j_j_free(v11);
}
if ( !v4 )
return;
}
if ( v16 > 0xF )
{
v12 = Block[0];
if ( v16 + 1 >= 0x1000 )
{
v12 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F )
LABEL_23:
invalid_parameter_noinfo_noreturn();
}
j_j_free(v12);
}
}