//
// sub_1000AB9C4 from 0x1000ab9c4 to 0x1000abaf4 (304 bytes)
//
// 2 xrefs:
// > GameLevelManager::encodeDataTo @ 0x1000b113c
// > GameLevelManager::encodeDataTo @ 0x1000b1144
//
// 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:36 +0000
//
__int64 __fastcall sub_1000AB9C4(__int64 a1)
{
__int64 v2; // x19
__int64 v3; // x21
unsigned int v4; // w23
int v5; // w24
int v6; // w0
__int64 v7; // x0
char *CString; // x0
__int64 v9; // x22
__int64 v10; // x22
__int64 result; // x0
int v12; // w20
__int64 v13; // x21
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v15; // [xsp+1Fh] [xbp-31h]
v2 = sub_1002E736C(a1);
v3 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 760));
if ( (unsigned int)sub_1002E757C(v3) )
{
v4 = 0;
v5 = -1;
do
{
v6 = sub_1002E757C(v3);
v7 = sub_1002E75A0(v3, (unsigned int)(v6 + v5));
CString = (char *)cocos2d::CCString::getCString(v7);
v9 = *(_QWORD *)(a1 + 760);
sub_100009900(__p, CString);
v10 = cocos2d::CCDictionary::objectForKey(v9, __p);
if ( v15 < 0 )
operator delete(__p[0]);
if ( (*(_BYTE *)(v10 + 1105) & 1) != 0 )
*(_DWORD *)(v10 + 632) = 0;
else
sub_1002E74E0(v2, v10);
++v4;
--v5;
}
while ( v4 < (unsigned int)sub_1002E757C(v3) );
}
if ( (unsigned int)sub_1002E757C(v2) )
qsort(
*(void **)(*(_QWORD *)(v2 + 56) + 16LL),
**(unsigned int **)(v2 + 56),
8u,
(int (__cdecl *)(const void *, const void *))sub_100090E9C);
result = sub_1002E757C(v2);
if ( (int)result >= 1 )
{
v12 = result;
v13 = 0;
do
{
result = sub_1002E75A0(v2, v13);
*(_DWORD *)(result + 632) = v12;
v13 = (unsigned int)(v13 + 1);
--v12;
}
while ( v12 );
}
return result;
}