//
// GameLevelManager::resetCommentTimersForAccountID from 0x100552cf0 to 0x100552fc8 (728 bytes)
//
// 2 xrefs:
// > ProfilePage::onUpdate @ 0x1007b97fb
// > ProfilePage::onUpdate @ 0x1007b9974
//
// 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
//
void __fastcall GameLevelManager::resetCommentTimersForAccountID(GameLevelManager *a1, int a2)
{
double v2; // xmm0_8
bool HasTimer; // r15
int v4; // r12d
char *v5; // r13
cocos2d::CCString *v6; // rax
const char *CString; // r15
size_t v8; // rax
size_t v9; // r13
char *v10; // rbx
__int64 v11; // rax
size_t v12; // r14
void *v13; // r13
const char *v14; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-50h] BYREF
void *__p; // [rsp+10h] [rbp-40h]
GameLevelManager *v17; // [rsp+18h] [rbp-38h]
int v18; // [rsp+24h] [rbp-2Ch]
v18 = a2;
v17 = a1;
HasTimer = 1;
v4 = 0;
while ( HasTimer )
{
if ( !qword_1009A28E0 )
{
v5 = (char *)operator new(0x3C8u);
cocos2d::CCNode::CCNode((__int64)v5);
*(_QWORD *)v5 = off_100960890;
v2 = 0.0;
*(_OWORD *)(v5 + 328) = 0;
*((_QWORD *)v5 + 40) = v5 + 328;
*((_QWORD *)v5 + 62) = 0;
*((_OWORD *)v5 + 32) = 0;
*(_OWORD *)(v5 + 344) = 0;
*(_OWORD *)(v5 + 360) = 0;
*(_OWORD *)(v5 + 376) = 0;
*(_OWORD *)(v5 + 392) = 0;
*(_OWORD *)(v5 + 408) = 0;
*(_OWORD *)(v5 + 424) = 0;
*(_OWORD *)(v5 + 440) = 0;
*(_OWORD *)(v5 + 456) = 0;
*(_OWORD *)(v5 + 472) = 0;
*((_DWORD *)v5 + 122) = 0;
*((_QWORD *)v5 + 63) = v5 + 512;
*((_OWORD *)v5 + 33) = 0;
*((_OWORD *)v5 + 34) = 0;
*((_OWORD *)v5 + 35) = 0;
*((_OWORD *)v5 + 36) = 0;
*(_OWORD *)(v5 + 696) = 0;
*(_OWORD *)(v5 + 680) = 0;
*(_OWORD *)(v5 + 664) = 0;
*(_OWORD *)(v5 + 648) = 0;
*(_OWORD *)(v5 + 632) = 0;
*(_OWORD *)(v5 + 616) = 0;
*(_OWORD *)(v5 + 600) = 0;
v5[712] = 0;
*((_OWORD *)v5 + 48) = 0;
*((_OWORD *)v5 + 47) = 0;
*((_OWORD *)v5 + 46) = 0;
*((_OWORD *)v5 + 45) = 0;
*(_OWORD *)(v5 + 945) = 0;
*(_OWORD *)(v5 + 936) = 0;
*(_OWORD *)(v5 + 920) = 0;
*(_OWORD *)(v5 + 904) = 0;
*(_OWORD *)(v5 + 888) = 0;
*(_OWORD *)(v5 + 872) = 0;
*(_OWORD *)(v5 + 856) = 0;
*(_OWORD *)(v5 + 840) = 0;
*(_OWORD *)(v5 + 824) = 0;
*(_OWORD *)(v5 + 808) = 0;
*(_OWORD *)(v5 + 792) = 0;
qword_1009A28E0 = (__int64)v5;
GameLevelManager::init((GameLevelManager *)v5);
}
v6 = (cocos2d::CCString *)sub_1007AB580("a_%i_%i", __dst[0]);
CString = cocos2d::CCString::getCString(v6);
v8 = strlen(CString);
if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v9 = v8;
if ( v8 >= 0x17 )
{
v11 = v8 | 7;
v12 = 26;
if ( (v9 | 7) != 0x17 )
v12 = v11 + 1;
v10 = (char *)operator new(v12);
__p = v10;
__dst[0] = v12 + 1;
__dst[1] = v9;
}
else
{
LOBYTE(__dst[0]) = 2 * v8;
v10 = (char *)__dst + 1;
if ( !v8 )
goto LABEL_14;
}
memmove(v10, CString, v9);
LABEL_14:
v10[v9] = 0;
v13 = __p;
v14 = (const char *)__p;
if ( (__dst[0] & 1) == 0 )
v14 = (char *)__dst + 1;
HasTimer = GameLevelManager::keyHasTimer(v17, v14);
if ( HasTimer )
GameLevelManager::resetTimerForKey(v17, v14);
if ( (__dst[0] & 1) != 0 )
operator delete(v13);
if ( ++v4 == 101 )
return;
}
}