//
// sub_1000B043C from 0x1000b043c to 0x1000b0604 (456 bytes)
//
// 1 xrefs:
// > GameLevelManager::encodeDataTo @ 0x1000b1160
//
// 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 sub_1000B043C(__int64 a1)
{
__int64 v2; // x20
__int64 result; // x0
int v4; // w24
unsigned int v5; // w23
int v6; // w28
int v7; // w0
__int64 v8; // x0
char *CString; // x21
__int64 v10; // x22
__int64 v11; // x22
int v12; // w8
__int64 v13; // x9
__int64 v14; // x22
__int64 v15; // [xsp+0h] [xbp-70h]
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v17; // [xsp+1Fh] [xbp-51h]
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 848));
result = sub_1002E757C(v2);
if ( (_DWORD)result )
{
v4 = 0;
v15 = 0;
v5 = 0;
v6 = -1;
do
{
v7 = sub_1002E757C(v2);
v8 = sub_1002E75A0(v2, (unsigned int)(v7 + v6));
CString = (char *)cocos2d::CCString::getCString(v8);
v10 = *(_QWORD *)(a1 + 848);
sub_100009900(__p, CString);
v11 = cocos2d::CCDictionary::objectForKey(v10, __p);
if ( v17 < 0 )
operator delete(__p[0]);
v12 = *(_DWORD *)(v11 + 920) - *(_DWORD *)(v11 + 924);
if ( v12 < 1 )
goto LABEL_12;
v13 = 864;
if ( (unsigned int)v12 > 0x186A0 )
v13 = 876;
if ( (unsigned int)v12 > 0x30D40 )
v13 = 888;
if ( v12 != *(_DWORD *)(a1 + v13) )
goto LABEL_18;
if ( (unsigned int)v12 >= 0x186A1 )
{
if ( (unsigned int)v12 >= 0x30D41 )
{
if ( v12 >= (int)v15 )
{
LODWORD(v15) = *(_DWORD *)(v11 + 920) - *(_DWORD *)(v11 + 924);
goto LABEL_18;
}
}
else if ( v12 >= SHIDWORD(v15) )
{
HIDWORD(v15) = *(_DWORD *)(v11 + 920) - *(_DWORD *)(v11 + 924);
goto LABEL_18;
}
}
else
{
LABEL_12:
if ( v12 >= v4 )
{
v4 = *(_DWORD *)(v11 + 920) - *(_DWORD *)(v11 + 924);
goto LABEL_18;
}
}
*(_WORD *)(v11 + 1104) = 257;
if ( *(_DWORD *)(v11 + 864) <= *(_DWORD *)(v11 + 868) )
{
if ( (*(char *)(v11 + 1495) & 0x8000000000000000LL) != 0 )
{
if ( !*(_QWORD *)(v11 + 1480) )
{
LABEL_26:
v14 = *(_QWORD *)(a1 + 848);
sub_100009900(__p, CString);
cocos2d::CCDictionary::removeObjectForKey(v14, (char *)__p);
if ( v17 < 0 )
operator delete(__p[0]);
}
}
else if ( !*(_BYTE *)(v11 + 1495) )
{
goto LABEL_26;
}
}
LABEL_18:
++v5;
result = sub_1002E757C(v2);
--v6;
}
while ( v5 < (unsigned int)result );
}
return result;
}