//
// GameLevelManager::updateSavedLevelList from 0x100542900 to 0x100542bb5 (693 bytes)
//
// 2 xrefs:
// > LevelListCell::onClick @ 0x100259518
// > GameLevelManager::onGetLevelListsCompleted @ 0x10052a958
//
// 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::updateSavedLevelList(GameLevelManager *a1, GJLevelList *a2)
{
GJLevelList *SavedLevelList; // rax
char *v3; // r14
GJLevelList *v4; // r14
__int128 v5; // xmm0
__int128 v6; // [rsp+0h] [rbp-30h] BYREF
void *__p; // [rsp+10h] [rbp-20h]
if ( qword_1009A28E0 )
{
SavedLevelList = GameLevelManager::getSavedLevelList((GameLevelManager *)qword_1009A28E0, a2->m_listID);
if ( !SavedLevelList )
return;
}
else
{
v3 = (char *)operator new(0x3C8u);
cocos2d::CCNode::CCNode((__int64)v3);
*(_QWORD *)v3 = off_100960890;
*(_OWORD *)(v3 + 328) = 0;
*((_QWORD *)v3 + 40) = v3 + 328;
*((_QWORD *)v3 + 62) = 0;
*((_OWORD *)v3 + 32) = 0;
*(_OWORD *)(v3 + 344) = 0;
*(_OWORD *)(v3 + 360) = 0;
*(_OWORD *)(v3 + 376) = 0;
*(_OWORD *)(v3 + 392) = 0;
*(_OWORD *)(v3 + 408) = 0;
*(_OWORD *)(v3 + 424) = 0;
*(_OWORD *)(v3 + 440) = 0;
*(_OWORD *)(v3 + 456) = 0;
*(_OWORD *)(v3 + 472) = 0;
*((_DWORD *)v3 + 122) = 0;
*((_QWORD *)v3 + 63) = v3 + 512;
*((_OWORD *)v3 + 33) = 0;
*((_OWORD *)v3 + 34) = 0;
*((_OWORD *)v3 + 35) = 0;
*((_OWORD *)v3 + 36) = 0;
*(_OWORD *)(v3 + 696) = 0;
*(_OWORD *)(v3 + 680) = 0;
*(_OWORD *)(v3 + 664) = 0;
*(_OWORD *)(v3 + 648) = 0;
*(_OWORD *)(v3 + 632) = 0;
*(_OWORD *)(v3 + 616) = 0;
*(_OWORD *)(v3 + 600) = 0;
v3[712] = 0;
*((_OWORD *)v3 + 48) = 0;
*((_OWORD *)v3 + 47) = 0;
*((_OWORD *)v3 + 46) = 0;
*((_OWORD *)v3 + 45) = 0;
*(_OWORD *)(v3 + 945) = 0;
*(_OWORD *)(v3 + 936) = 0;
*(_OWORD *)(v3 + 920) = 0;
*(_OWORD *)(v3 + 904) = 0;
*(_OWORD *)(v3 + 888) = 0;
*(_OWORD *)(v3 + 872) = 0;
*(_OWORD *)(v3 + 856) = 0;
*(_OWORD *)(v3 + 840) = 0;
*(_OWORD *)(v3 + 824) = 0;
*(_OWORD *)(v3 + 808) = 0;
*(_OWORD *)(v3 + 792) = 0;
qword_1009A28E0 = (__int64)v3;
GameLevelManager::init((GameLevelManager *)v3);
SavedLevelList = GameLevelManager::getSavedLevelList((GameLevelManager *)qword_1009A28E0, a2->m_listID);
if ( !SavedLevelList )
return;
}
v4 = SavedLevelList;
v5 = *(_OWORD *)&a2->m_listVersion;
*(_OWORD *)&SavedLevelList->m_listVersion = v5;
SavedLevelList->m_accountID = a2->m_accountID;
SavedLevelList->m_featured = a2->m_featured;
std::string::operator=((std::string *)&SavedLevelList->m_creatorName, (const std::string *)&a2->m_creatorName);
std::string::operator=((std::string *)&v4->m_listName, (const std::string *)&a2->m_listName);
std::string::operator=((std::string *)&v4->m_listDesc, (const std::string *)&a2->m_listDesc);
*(_QWORD *)&v4->m_uploadDate = *(_QWORD *)&a2->m_uploadDate;
if ( (a2->m_levelsString.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v6,
a2->m_levelsString.m_data.m_long.longStorage,
a2->m_levelsString.m_data.m_long.size,
*(double *)&v5);
}
else
{
__p = a2->m_levelsString.m_data.m_long.longStorage;
v6 = *(_OWORD *)&a2->m_levelsString.m_data.m_short.sizex2;
}
GJLevelList::parseListLevels(v4, &v6);
if ( (v6 & 1) != 0 )
operator delete(__p);
}