//
// GameLevelManager::getStoredOnlineLevels from 0x100538500 to 0x1005385db (219 bytes)
//
// 48 xrefs:
// > MessagesProfilePage::onClose @ 0x10022e467
// > MessagesProfilePage::onClose @ 0x10022e47d
// > MessagesProfilePage::onDeleteSelected @ 0x10022e5d6
// > MessagesProfilePage::onDeleteSelected @ 0x10022e5ec
// > MessagesProfilePage::onToggleAllObjects @ 0x10022e7b9
// > MessagesProfilePage::onToggleAllObjects @ 0x10022e7cf
// > MessagesProfilePage::loadPage @ 0x10022ea60
// > MessagesProfilePage::loadPage @ 0x10022eb29
// > MessagesProfilePage::loadPage @ 0x10022eb7b
// > MessagesProfilePage::deleteSelected @ 0x10022ed6c
// > MessagesProfilePage::deleteSelected @ 0x10022ed85
// > MessagesProfilePage::untoggleAll @ 0x10022f30d
// > TopArtistsLayer::init @ 0x100310d4b
// > TopArtistsLayer::loadPage @ 0x100311a19
// > TopArtistsLayer::loadPage @ 0x100311a50
// > GauntletLayer::init @ 0x100392fe0
// > LevelLeaderboard::loadScores @ 0x1003db66f
// > LevelBrowserLayer::loadPage @ 0x10048e5f7
// > LevelBrowserLayer::loadPage @ 0x10048e632
// > LeaderboardsLayer::selectLeaderboard @ 0x1005135bb
// > GameLevelManager::invalidateMessages @ 0x10054f487
// > GameLevelManager::messageWasRemoved @ 0x10054f5b1
// > GameLevelManager::messageWasRemoved @ 0x10054f5f9
// > GameLevelManager::resetAccountComments @ 0x100551297
// > GameLevelManager::invalidateRequests @ 0x100554bd7
// > GameLevelManager::friendRequestWasRemoved @ 0x100554d01
// > GameLevelManager::friendRequestWasRemoved @ 0x100554d49
// > FRequestProfilePage::onClose @ 0x1007908a7
// > FRequestProfilePage::onClose @ 0x1007908bd
// > FRequestProfilePage::onSentRequests @ 0x1007909c7
// > FRequestProfilePage::onSentRequests @ 0x1007909dd
// > FRequestProfilePage::onDeleteSelected @ 0x100790a86
// > FRequestProfilePage::onDeleteSelected @ 0x100790a9c
// > FRequestProfilePage::onToggleAllObjects @ 0x100790c69
// > FRequestProfilePage::onToggleAllObjects @ 0x100790c7f
// > FRequestProfilePage::loadPage @ 0x100790f10
// > FRequestProfilePage::loadPage @ 0x100790fd9
// > FRequestProfilePage::loadPage @ 0x100791018
// > FRequestProfilePage::deleteSelected @ 0x10079120c
// > FRequestProfilePage::deleteSelected @ 0x100791225
// > FRequestProfilePage::untoggleAll @ 0x10079145d
// > InfoLayer::loadPage @ 0x1007b1400
// > InfoLayer::loadPage @ 0x1007b142b
// > ProfilePage::loadPage @ 0x1007c0012
// > ProfilePage::loadPage @ 0x1007c0049
// > ProfilePage::loadPage @ 0x1007c0076
// > ProfilePage::commentDeleteFailed @ 0x1007c0e96
// > ProfilePage::commentDeleteFailed @ 0x1007c0eac
//
// 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
//
cocos2d::CCArray *__fastcall GameLevelManager::getStoredOnlineLevels(GameLevelManager *a1, const char *a2)
{
cocos2d::CCDictionary *m_storedLevels; // r14
size_t v3; // rax
size_t v4; // r15
char *v5; // r12
cocos2d::CCArray *result; // rax
size_t v7; // r13
cocos2d::CCArray *v8; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( !GameLevelManager::isTimeValid(a1, a2, 3600.0) )
return nullptr;
m_storedLevels = a1->m_storedLevels;
v3 = strlen(a2);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(COERCE_DOUBLE(1163984896));
v4 = v3;
if ( v3 >= 0x17 )
{
v7 = 26;
if ( (v3 | 7) != 0x17 )
v7 = (v3 | 7) + 1;
v5 = (char *)operator new(v7);
__p = v5;
__dst[0] = v7 + 1;
__dst[1] = v4;
goto LABEL_10;
}
LOBYTE(__dst[0]) = 2 * v3;
v5 = (char *)__dst + 1;
if ( v3 )
LABEL_10:
memcpy(v5, a2, v4);
v5[v4] = 0;
result = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey_1((__int64)m_storedLevels, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
{
v8 = result;
operator delete(__p);
return v8;
}
return result;
}