//
// GameLevelManager::encodeDataTo from 0x140224b60 to 0x140224e7d (797 bytes)
//
// 2 xrefs:
// > GameManager::encodeDataTo @ 0x140285ddc
// > ??> @ 0x14091bd10
//
// This function is hookable on this platform (idp: pc, 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 11:28:25 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall GameLevelManager::encodeDataTo(__int64 a1, DS_Dictionary *a2)
{
__int64 v4; // rcx
cocos2d::CCArray *v5; // rbp
__int64 v6; // rdx
__int64 v7; // rdx
__int64 i; // rbx
__int64 v9; // rax
void *v10; // [rsp+30h] [rbp+8h]
DS_Dictionary::setDictForKey(a2, "GLM_01", *(struct cocos2d::CCDictionary **)(a1 + 840));
GameLevelManager::limitSavedLevels(a1);
GameLevelManager::purgeUnusedLevels(a1);
GameLevelManager::updateLevelOrders(a1);
GameLevelManager::updateLevelOrders(a1);
DS_Dictionary::setDictForKey(a2, "GLM_03", *(struct cocos2d::CCDictionary **)(a1 + 856));
GameLevelManager::cleanupDailyLevels(a1);
DS_Dictionary::setDictForKey(a2, "GLM_10", *(struct cocos2d::CCDictionary **)(a1 + 944));
DS_Dictionary::setIntegerForKey(a2, "GLM_11", *(_DWORD *)(a1 + 960));
DS_Dictionary::setIntegerForKey(a2, "GLM_17", *(_DWORD *)(a1 + 972));
DS_Dictionary::setIntegerForKey(a2, "GLM_23", *(_DWORD *)(a1 + 984));
DS_Dictionary::setIntegerForKey(a2, "GLM_24", *(_DWORD *)(a1 + 1012));
DS_Dictionary::setIntegerForKey(a2, "GLM_25", *(_DWORD *)(a1 + 1016));
DS_Dictionary::setIntegerForKey(a2, "GLM_26", *(_DWORD *)(a1 + 1020));
DS_Dictionary::setIntegerForKey(a2, "GLM_27", *(_DWORD *)(a1 + 1024));
DS_Dictionary::setIntegerForKey(a2, "GLM_28", *(_BYTE *)(a1 + 1028) != 0);
DS_Dictionary::setDictForKey(a2, "GLM_16", *(struct cocos2d::CCDictionary **)(a1 + 1032));
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4);
v6 = *(_QWORD *)(a1 + 880);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 56);
if ( v7 )
{
for ( i = *(_QWORD *)(v7 + 288); ; i = *(_QWORD *)(i + 288) )
{
cocos2d::CCArray::addObject(v5, *(struct cocos2d::CCObject **)(v7 + 264));
v7 = i;
if ( !i )
break;
}
}
}
DS_Dictionary::setArrayForKey(a2, "GLM_22", v5);
DS_Dictionary::setBoolMapForKey(a2, "GLM_09", a1 + 1040);
v9 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v9 = qword_14090BFD0;
}
if ( !*(_BYTE *)(v9 + 354) )
{
DS_Dictionary::setDictForKey(a2, "GLM_07", *(struct cocos2d::CCDictionary **)(a1 + 888));
DS_Dictionary::setDictForKey(a2, "GLM_14", *(struct cocos2d::CCDictionary **)(a1 + 920));
}
DS_Dictionary::setDictForKey(a2, "GLM_12", *(struct cocos2d::CCDictionary **)(a1 + 896));
DS_Dictionary::setDictForKey(a2, "GLM_13", *(struct cocos2d::CCDictionary **)(a1 + 904));
DS_Dictionary::setDictForKey(a2, "GLM_15", *(struct cocos2d::CCDictionary **)(a1 + 912));
DS_Dictionary::setDictForKey(a2, "GLM_06", *(struct cocos2d::CCDictionary **)(a1 + 872));
DS_Dictionary::setDictForKey(a2, "GLM_08", *(struct cocos2d::CCDictionary **)(a1 + 848));
DS_Dictionary::setDictForKey(a2, "GLM_18", *(struct cocos2d::CCDictionary **)(a1 + 928));
DS_Dictionary::setDictForKey(a2, "GLM_19", *(struct cocos2d::CCDictionary **)(a1 + 936));
DS_Dictionary::setArrayForKey(a2, "GLM_20", *(struct cocos2d::CCArray **)(a1 + 1656));
}