//
// GameLevelManager::resetAccountComments from 0x10056ba50 to 0x10056bbb1 (353 bytes)
//
// 1 xrefs:
// > ProfilePage::onUpdate @ 0x10089ee5a
//
// This function is hookable on this platform (idp: pc, 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:32:13 +0000
//
void __fastcall GameLevelManager::resetAccountComments(char a1)
{
bool v1; // bl
int v2; // r13d
__int64 v3; // rax
const char *CString; // r15
size_t v5; // rax
size_t v6; // r12
char *v7; // rbx
const char *v8; // rsi
__int64 StoredOnlineLevels; // rax
__int64 v10; // rax
size_t v11; // r14
__int64 v12; // [rsp+0h] [rbp-50h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
LOBYTE(v12) = a1;
v1 = 1;
v2 = 0;
while ( v1 )
{
v3 = sub_10088E820("a_%i_%i", v12);
CString = (const char *)cocos2d::CCString::getCString(v3);
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v10 = v5 | 7;
v11 = 26;
if ( (v6 | 7) != 0x17 )
v11 = v10 + 1;
v7 = (char *)operator new(v11);
__p = v7;
__dst[0] = v11 + 1;
__dst[1] = v6;
LABEL_16:
memmove(v7, CString, v6);
v7[v6] = 0;
v8 = (char *)__dst + 1;
if ( (__dst[0] & 1) == 0 )
goto LABEL_9;
LABEL_8:
v8 = (const char *)__p;
goto LABEL_9;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
goto LABEL_16;
BYTE1(__dst[0]) = 0;
v8 = (char *)__dst + 1;
if ( (__dst[0] & 1) != 0 )
goto LABEL_8;
LABEL_9:
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v12, v8);
v1 = StoredOnlineLevels != 0;
if ( StoredOnlineLevels )
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(v12 + 1040), (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( ++v2 == 101 )
return;
}
}