//
// GameLevelManager::encodeDataTo from 0x808b68 to 0x808ddc (628 bytes)
//
// 2 xrefs:
// > GameManager::encodeDataTo @ 0x72a364
// > ??> @ 0xd1368
//
// This function is hookable on this platform (idp: arm, 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:54:46 +0000
//
__int64 __fastcall GameLevelManager::encodeDataTo(GameLevelManager *this, DS_Dictionary *a2)
{
cocos2d::CCArray *v4; // x0
cocos2d::CCArray *v5; // x22
__int64 v6; // x0
__int64 v7; // x0
__int64 i; // x19
GameManager *v9; // x0
DS_Dictionary::setDictForKey(a2, "GLM_01", *((cocos2d::CCDictionary **)this + 93));
GameLevelManager::limitSavedLevels((cocos2d::CCDictionary **)this);
GameLevelManager::purgeUnusedLevels((cocos2d::CCDictionary **)this);
GameLevelManager::updateLevelOrders((cocos2d::CCDictionary **)this);
GameLevelManager::updateLevelOrders((cocos2d::CCDictionary **)this);
DS_Dictionary::setDictForKey(a2, "GLM_03", *((cocos2d::CCDictionary **)this + 95));
GameLevelManager::cleanupDailyLevels((cocos2d::CCDictionary **)this);
DS_Dictionary::setDictForKey(a2, "GLM_10", *((cocos2d::CCDictionary **)this + 106));
DS_Dictionary::setIntegerForKey(a2, "GLM_11", *((_DWORD *)this + 216));
DS_Dictionary::setIntegerForKey(a2, "GLM_17", *((_DWORD *)this + 219));
DS_Dictionary::setIntegerForKey(a2, "GLM_23", *((_DWORD *)this + 222));
DS_Dictionary::setIntegerForKey(a2, "GLM_24", *((_DWORD *)this + 229));
DS_Dictionary::setIntegerForKey(a2, "GLM_25", *((_DWORD *)this + 230));
DS_Dictionary::setIntegerForKey(a2, "GLM_26", *((_DWORD *)this + 231));
DS_Dictionary::setIntegerForKey(a2, "GLM_27", *((_DWORD *)this + 232));
DS_Dictionary::setIntegerForKey(a2, "GLM_28", *((unsigned __int8 *)this + 932));
v4 = (cocos2d::CCArray *)DS_Dictionary::setDictForKey(a2, "GLM_16", *((cocos2d::CCDictionary **)this + 117));
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4);
v6 = *((_QWORD *)this + 98);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 56);
if ( v7 )
{
for ( i = *(_QWORD *)(v7 + 288); ; i = *(_QWORD *)(i + 288) )
{
cocos2d::CCArray::addObject(v5, *(cocos2d::CCObject **)(v7 + 264));
v7 = i;
if ( !i )
break;
}
}
}
DS_Dictionary::setArrayForKey(a2, "GLM_22", v5);
v9 = (GameManager *)DS_Dictionary::setBoolMapForKey(a2, "GLM_09", (char *)this + 944);
if ( !*(_BYTE *)(GameManager::sharedState(v9) + 346) )
{
DS_Dictionary::setDictForKey(a2, "GLM_07", *((cocos2d::CCDictionary **)this + 99));
DS_Dictionary::setDictForKey(a2, "GLM_14", *((cocos2d::CCDictionary **)this + 103));
}
DS_Dictionary::setDictForKey(a2, "GLM_12", *((cocos2d::CCDictionary **)this + 100));
DS_Dictionary::setDictForKey(a2, "GLM_13", *((cocos2d::CCDictionary **)this + 101));
DS_Dictionary::setDictForKey(a2, "GLM_15", *((cocos2d::CCDictionary **)this + 102));
DS_Dictionary::setDictForKey(a2, "GLM_06", *((cocos2d::CCDictionary **)this + 97));
DS_Dictionary::setDictForKey(a2, "GLM_08", *((cocos2d::CCDictionary **)this + 94));
DS_Dictionary::setDictForKey(a2, "GLM_18", *((cocos2d::CCDictionary **)this + 104));
DS_Dictionary::setDictForKey(a2, "GLM_19", *((cocos2d::CCDictionary **)this + 105));
return DS_Dictionary::setArrayForKey(a2, "GLM_20", *((cocos2d::CCArray **)this + 190));
}