//
// GameLevelManager::updateUsernames from 0x100539f60 to 0x10053a04e (238 bytes)
//
// 1 xrefs:
// > GameLevelManager::dataLoaded @ 0x10053c8f3
//
// 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::updateUsernames(GameLevelManager *a1)
{
__int128 v1; // xmm0
cocos2d::CCDictionary *m_onlineLevels; // rax
cocos2d::CCDictElement *m_pElements; // r13
cocos2d::CCObject *m_pObject; // rax
int v5; // r15d
int v6; // r12d
unsigned int *p_m_uAutoReleaseCount; // rax
__int128 v8; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
m_onlineLevels = a1->m_onlineLevels;
if ( m_onlineLevels )
{
m_pElements = m_onlineLevels->m_pElements;
while ( m_pElements )
{
m_pObject = m_pElements->m_pObject;
m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;
v5 = m_pObject[10].m_uID - m_pObject[10].m_nLuaID;
v6 = m_pObject[10].m_uReference - m_pObject[10].m_uAutoReleaseCount;
if ( (m_pObject[7].m_uAutoReleaseCount & 1) != 0 )
{
sub_100006B70(
&v8,
*(const void **)&m_pObject[7].m_unknown2,
*(_QWORD *)&m_pObject[7].m_uIndexInArray,
*(double *)&v1);
}
else
{
p_m_uAutoReleaseCount = &m_pObject[7].m_uAutoReleaseCount;
__p = *((void **)p_m_uAutoReleaseCount + 2);
v1 = *(_OWORD *)p_m_uAutoReleaseCount;
v8 = *(_OWORD *)p_m_uAutoReleaseCount;
}
GameLevelManager::storeUserName((__int64)a1, v5, v6, (__int64)&v8, *(double *)&v1);
if ( (v8 & 1) != 0 )
operator delete(__p);
}
}
}