//
// GameLevelManager::encodeDataTo from 0x1000b10fc to 0x1000b1364 (616 bytes)
//
// 1 xrefs:
// > GameManager::encodeDataTo @ 0x1003ba760
//
// 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 10:58:38 +0000
//
__int64 __fastcall GameLevelManager::encodeDataTo(__int64 a1, __int64 a2)
{
__int64 v4; // x0
__int64 v5; // x21
__int64 v6; // x8
__int64 v7; // x8
__int64 v8; // x22
__int64 v9; // x0
DS_Dictionary::setDictForKey(a2, "GLM_01", *(_QWORD *)(a1 + 744));
GameLevelManager::limitSavedLevels(a1);
sub_1000AE69C(a1);
sub_1000AB9C4(a1);
sub_1000AB9C4(a1);
DS_Dictionary::setDictForKey(a2, "GLM_03", *(_QWORD *)(a1 + 760));
sub_1000B043C(a1);
DS_Dictionary::setDictForKey(a2, "GLM_10", *(_QWORD *)(a1 + 848));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_11", *(unsigned int *)(a1 + 864));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_17", *(unsigned int *)(a1 + 876));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_23", *(unsigned int *)(a1 + 888));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_24", *(unsigned int *)(a1 + 916));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_25", *(unsigned int *)(a1 + 920));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_26", *(unsigned int *)(a1 + 924));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_27", *(unsigned int *)(a1 + 928));
DS_Dictionary::setIntegerForKey_1(a2, "GLM_28", *(unsigned __int8 *)(a1 + 932));
v4 = DS_Dictionary::setDictForKey(a2, "GLM_16", *(_QWORD *)(a1 + 936));
v5 = sub_1002E736C(v4);
v6 = *(_QWORD *)(a1 + 784);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 56);
if ( v7 )
{
do
{
v8 = *(_QWORD *)(v7 + 288);
sub_1002E74E0(v5, *(_QWORD *)(v7 + 264));
v7 = v8;
}
while ( v8 );
}
}
DS_Dictionary::setArrayForKey(a2, "GLM_22", v5);
v9 = DS_Dictionary::setBoolMapForKey(a2, "GLM_09", a1 + 944);
if ( (*(_BYTE *)(GameManager::sharedState(v9) + 346) & 1) == 0 )
{
DS_Dictionary::setDictForKey(a2, "GLM_07", *(_QWORD *)(a1 + 792));
DS_Dictionary::setDictForKey(a2, "GLM_14", *(_QWORD *)(a1 + 824));
}
DS_Dictionary::setDictForKey(a2, "GLM_12", *(_QWORD *)(a1 + 800));
DS_Dictionary::setDictForKey(a2, "GLM_13", *(_QWORD *)(a1 + 808));
DS_Dictionary::setDictForKey(a2, "GLM_15", *(_QWORD *)(a1 + 816));
DS_Dictionary::setDictForKey(a2, "GLM_06", *(_QWORD *)(a1 + 776));
DS_Dictionary::setDictForKey(a2, "GLM_08", *(_QWORD *)(a1 + 752));
DS_Dictionary::setDictForKey(a2, "GLM_18", *(_QWORD *)(a1 + 832));
DS_Dictionary::setDictForKey(a2, "GLM_19", *(_QWORD *)(a1 + 840));
return DS_Dictionary::setArrayForKey(a2, "GLM_20", *(_QWORD *)(a1 + 1520));
}