//
// GameLevelManager::storeCommentsResult from 0x6f8b94 to 0x6f8dfc (616 bytes)
//
// 5 xrefs:
// > GameLevelManager::onGetFriendRequestsCompleted @ 0x713750
// > GameLevelManager::onGetUserMessagesCompleted @ 0x714c94
// > GameLevelManager::onGetLevelCommentsCompleted @ 0x718378
// > GameLevelManager::onGetAccountCommentsCompleted @ 0x7189dc
// > ??> @ 0x2ce68
//
// 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
//
__int64 __fastcall GameLevelManager::storeCommentsResult(
GameLevelManager *a1,
cocos2d::CCObject *a2,
char **a3,
char *a4)
{
cocos2d::CCDictionary *m_storedLevels; // x23
void *v9; // x0
cocos2d::CCDictionary *m_pageInfo; // x24
const std::string *v11; // x1
cocos2d::CCObject *v12; // x23
void *v13; // x0
void *v14; // x0
unsigned int *v16; // x1
int v17; // w2
unsigned int *v18; // x1
int v19; // w2
unsigned int *v20; // x1
int v21; // w2
__int64 v22; // [xsp+68h] [xbp+68h] BYREF
__int64 v23; // [xsp+70h] [xbp+70h] BYREF
GameLevelManager::makeTimeStamp(a1, a4);
m_storedLevels = a1->m_storedLevels;
sub_D153B8((int)&v23, a4);
cocos2d::CCDictionary::setObject((int)m_storedLevels, a2);
v9 = (void *)(v23 - 24);
if ( (__int64 *)(v23 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v16 = (unsigned int *)(v23 - 8);
do
v17 = __ldaxr(v16);
while ( __stlxr(v17 - 1, v16) );
}
else
{
v17 = *(_DWORD *)(v23 - 8);
*(_DWORD *)(v23 - 8) = v17 - 1;
}
if ( v17 <= 0 )
operator delete(v9);
}
m_pageInfo = a1->m_pageInfo;
sub_D153B8((int)&v22, *a3);
v12 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v22, v11);
sub_D153B8((int)&v23, a4);
cocos2d::CCDictionary::setObject((int)m_pageInfo, v12);
v13 = (void *)(v23 - 24);
if ( (__int64 *)(v23 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v18 = (unsigned int *)(v23 - 8);
do
v19 = __ldaxr(v18);
while ( __stlxr(v19 - 1, v18) );
}
else
{
v19 = *(_DWORD *)(v23 - 8);
*(_DWORD *)(v23 - 8) = v19 - 1;
}
if ( v19 <= 0 )
operator delete(v13);
}
v14 = (void *)(v22 - 24);
if ( (__int64 *)(v22 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v20 = (unsigned int *)(v22 - 8);
do
v21 = __ldaxr(v20);
while ( __stlxr(v21 - 1, v20) );
}
else
{
v21 = *(_DWORD *)(v22 - 8);
*(_DWORD *)(v22 - 8) = v21 - 1;
}
if ( v21 <= 0 )
operator delete(v14);
}
return _stack_chk_guard;
}