//
// sub_1000A2F54 from 0x1000a2f54 to 0x1000a3660 (1804 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x100092610
//
// 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:32 +0000
//
void __fastcall sub_1000A2F54(__int64 a1, std::string *a2, char *__s)
{
__int64 v5; // x21
std::string::size_type v6; // x21
_BOOL4 v7; // w0
int v8; // w22
__int64 v9; // x0
__int64 v10; // x23
__int64 v11; // x0
__int64 v12; // x0
__int64 v13; // x0
__int64 v14; // x22
__int64 v15; // x0
__int64 v16; // x0
__int64 v17; // x0
__int64 v18; // x23
std::string::size_type size; // x8
__int64 v20; // x24
__int64 i; // x25
__int64 v22; // x0
char *CString; // x0
__int64 v24; // x28
__int64 v25; // x27
__int64 v26; // x0
__int64 v27; // x0
__int64 v28; // x0
char *v29; // x0
__int64 v30; // x0
char *v31; // x0
__int64 v32; // x0
__int64 v33; // x0
__int64 v34; // x0
const std::string::value_type *v35; // x0
__int64 v36; // x0
__int64 v37; // x0
char *v38; // x0
__int64 v39; // x0
__int64 v40; // x0
__int64 v41; // x0
__int64 v42; // x0
__int64 v43; // x0
__int64 v44; // x0
__int64 v45; // x0
__int64 v46; // x0
__int64 v47; // x0
__int64 v48; // x0
__int64 v49; // x0
__int64 v50; // x0
__int64 v51; // x0
char *v52; // x0
__int64 v53; // x0
const std::string::value_type *v54; // x0
__int64 v55; // x0
const char *v56; // x0
__int64 v57; // x0
__int64 v58; // x0
int v59; // w0
void (__fastcall ***v60)(_QWORD, __int64, _QWORD, _QWORD, __int64); // x0
__int64 v61; // [xsp+8h] [xbp-F8h]
void *v62[2]; // [xsp+10h] [xbp-F0h] BYREF
char v63; // [xsp+27h] [xbp-D9h]
void *v64[2]; // [xsp+28h] [xbp-D8h] BYREF
char v65; // [xsp+3Fh] [xbp-C1h]
void *v66[2]; // [xsp+40h] [xbp-C0h] BYREF
char v67; // [xsp+57h] [xbp-A9h]
void *__p[2]; // [xsp+58h] [xbp-A8h] BYREF
char v69; // [xsp+6Fh] [xbp-91h]
std::string __a; // [xsp+70h] [xbp-90h] BYREF
std::string v71; // [xsp+88h] [xbp-78h] BYREF
std::allocator v72; // [xsp+A7h] [xbp-59h] BYREF
v5 = *(_QWORD *)(a1 + 1088);
if ( __s[23] < 0 )
__s = *(char **)__s;
sub_100009900(&v71, __s);
cocos2d::CCDictionary::removeObjectForKey(v5, (char *)&v71);
if ( SHIBYTE(v71.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v71.__r_.__value_.__l.__data_);
v6 = std::string::find(a2, 35, 0);
sub_100009900(&v71, "-1");
v7 = sub_1000045BC(a2, &v71);
v8 = v6 == -1 || v7;
if ( SHIBYTE(v71.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(v71.__r_.__value_.__l.__data_);
if ( v8 )
{
LABEL_10:
v9 = *(_QWORD *)(a1 + 1264);
if ( v9 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 8LL))(v9);
return;
}
}
else if ( v8 )
{
goto LABEL_10;
}
std::string::basic_string(&v71, a2, 0, v6, (std::allocator *)&__a);
std::string::basic_string(&__a, a2, v6 + 1, 0xFFFFFFFFFFFFFFFFLL, &v72);
v10 = sub_1000A72B8(&__a, ":");
if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__a.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1002E757C(v10) < 3 )
{
v61 = 0;
v14 = 20;
}
else
{
v11 = cocos2d::CCArray::stringAtIndex(v10, 0);
HIDWORD(v61) = cocos2d::CCString::intValue(v11);
v12 = cocos2d::CCArray::stringAtIndex(v10, 1);
LODWORD(v61) = cocos2d::CCString::intValue(v12);
v13 = cocos2d::CCArray::stringAtIndex(v10, 2);
v14 = cocos2d::CCString::intValue(v13);
}
if ( (unsigned int)sub_1002E757C(v10) >= 4 )
{
v15 = cocos2d::CCArray::stringAtIndex(v10, 3);
*(_DWORD *)(a1 + 476) = cocos2d::CCString::intValue(v15);
}
v16 = sub_1002E757C(v10);
if ( (unsigned int)v16 >= 5 )
{
v17 = cocos2d::CCArray::stringAtIndex(v10, 4);
v16 = cocos2d::CCString::intValue(v17);
*(_DWORD *)(a1 + 480) = v16;
}
v18 = sub_1002E736C(v16);
size = HIBYTE(v71.__r_.__value_.__r.__words[2]);
if ( (v71.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = v71.__r_.__value_.__l.__size_;
if ( size )
{
v20 = sub_1000A72B8(&v71, "|");
for ( i = 0; (unsigned int)i < (unsigned int)sub_1002E757C(v20); i = (unsigned int)(i + 1) )
{
v22 = cocos2d::CCArray::stringAtIndex(v20, i);
CString = (char *)cocos2d::CCString::getCString(v22);
sub_100009900(&__a, CString);
v24 = sub_1000A72B8(&__a, ":");
if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__a.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1002E757C(v24) >= 7 )
{
v25 = sub_1000C5868();
v26 = cocos2d::CCArray::stringAtIndex(v24, 0);
*(_DWORD *)(v25 + 56) = cocos2d::CCString::intValue(v26);
v27 = cocos2d::CCArray::stringAtIndex(v24, 1);
*(_DWORD *)(v25 + 60) = cocos2d::CCString::intValue(v27);
v28 = cocos2d::CCArray::stringAtIndex(v24, 2);
v29 = (char *)cocos2d::CCString::getCString(v28);
sub_100009900(__p, v29);
LevelTools::base64DecodeString(&__a, __p);
if ( *(char *)(v25 + 87) < 0 )
operator delete(*(void **)(v25 + 64));
*(std::string *)(v25 + 64) = __a;
*((_BYTE *)&__a.__r_.__value_.__s + 23) = 0;
__a.__r_.__value_.__s.__data_[0] = 0;
if ( v69 < 0 )
operator delete(__p[0]);
v30 = cocos2d::CCArray::stringAtIndex(v24, 3);
v31 = (char *)cocos2d::CCString::getCString(v30);
sub_100009900(v66, v31);
LevelTools::base64DecodeString(&__a, v66);
if ( *(char *)(v25 + 111) < 0 )
operator delete(*(void **)(v25 + 88));
*(std::string *)(v25 + 88) = __a;
*((_BYTE *)&__a.__r_.__value_.__s + 23) = 0;
__a.__r_.__value_.__s.__data_[0] = 0;
if ( v67 < 0 )
operator delete(v66[0]);
v32 = cocos2d::CCArray::stringAtIndex(v24, 4);
*(_DWORD *)(v25 + 112) = cocos2d::CCString::intValue(v32);
v33 = cocos2d::CCArray::stringAtIndex(v24, 5);
*(_DWORD *)(v25 + 116) = cocos2d::CCString::intValue(v33);
v34 = cocos2d::CCArray::stringAtIndex(v24, 6);
v35 = (const std::string::value_type *)cocos2d::CCString::getCString(v34);
std::string::assign((std::string *)(v25 + 144), v35);
if ( (unsigned int)sub_1002E757C(v24) >= 0xA )
{
v36 = cocos2d::CCArray::stringAtIndex(v24, 7);
*(_DWORD *)(v25 + 168) = cocos2d::CCString::intValue(v36);
v37 = cocos2d::CCArray::stringAtIndex(v24, 8);
v38 = (char *)cocos2d::CCString::getCString(v37);
sub_100009900(v64, v38);
LevelTools::base64DecodeString(&__a, v64);
if ( *(char *)(v25 + 199) < 0 )
operator delete(*(void **)(v25 + 176));
*(std::string *)(v25 + 176) = __a;
*((_BYTE *)&__a.__r_.__value_.__s + 23) = 0;
__a.__r_.__value_.__s.__data_[0] = 0;
if ( v65 < 0 )
operator delete(v64[0]);
v39 = cocos2d::CCArray::stringAtIndex(v24, 9);
*(_DWORD *)(v25 + 200) = cocos2d::CCString::intValue(v39);
}
if ( (unsigned int)sub_1002E757C(v24) >= 0xB )
{
v40 = cocos2d::CCArray::stringAtIndex(v24, 10);
*(_BYTE *)(v25 + 204) = (unsigned int)cocos2d::CCString::intValue(v40) != 0;
}
if ( (unsigned int)sub_1002E757C(v24) >= 0xC )
{
v41 = cocos2d::CCArray::stringAtIndex(v24, 11);
*(_DWORD *)(v25 + 208) = cocos2d::CCString::intValue(v41);
}
if ( (unsigned int)sub_1002E757C(v24) >= 0xE )
{
v42 = cocos2d::CCArray::stringAtIndex(v24, 12);
*(_BYTE *)(v25 + 264) = (unsigned int)cocos2d::CCString::intValue(v42) != 0;
v43 = cocos2d::CCArray::stringAtIndex(v24, 13);
*(_BYTE *)(v25 + 265) = (unsigned int)cocos2d::CCString::intValue(v43) != 0;
}
if ( (unsigned int)sub_1002E757C(v24) >= 0xF )
{
v44 = cocos2d::CCArray::stringAtIndex(v24, 14);
*(_BYTE *)(v25 + 274) = (unsigned int)cocos2d::CCString::intValue(v44) != 0;
}
if ( (unsigned int)sub_1002E757C(v24) >= 0x15 )
{
*(_BYTE *)(v25 + 305) = 1;
v45 = cocos2d::CCArray::stringAtIndex(v24, 15);
*(_DWORD *)(v25 + 308) = cocos2d::CCString::intValue(v45);
v46 = cocos2d::CCArray::stringAtIndex(v24, 16);
*(_DWORD *)(v25 + 312) = cocos2d::CCString::intValue(v46);
v47 = cocos2d::CCArray::stringAtIndex(v24, 17);
*(_DWORD *)(v25 + 316) = cocos2d::CCString::intValue(v47);
v48 = cocos2d::CCArray::stringAtIndex(v24, 18);
*(_DWORD *)(v25 + 320) = cocos2d::CCString::intValue(v48);
v49 = cocos2d::CCArray::stringAtIndex(v24, 19);
*(_DWORD *)(v25 + 324) = cocos2d::CCString::intValue(v49);
v50 = cocos2d::CCArray::stringAtIndex(v24, 20);
*(_DWORD *)(v25 + 328) = cocos2d::CCString::intValue(v50);
}
if ( (unsigned int)sub_1002E757C(v24) >= 0x16 )
{
v51 = cocos2d::CCArray::stringAtIndex(v24, 21);
v52 = (char *)cocos2d::CCString::getCString(v51);
sub_100009900(v62, v52);
LevelTools::base64DecodeString(&__a, v62);
if ( *(char *)(v25 + 239) < 0 )
operator delete(*(void **)(v25 + 216));
*(std::string *)(v25 + 216) = __a;
*((_BYTE *)&__a.__r_.__value_.__s + 23) = 0;
__a.__r_.__value_.__s.__data_[0] = 0;
if ( v63 < 0 )
operator delete(v62[0]);
}
if ( (unsigned int)sub_1002E757C(v24) >= 0x17 )
{
v53 = cocos2d::CCArray::stringAtIndex(v24, 22);
v54 = (const std::string::value_type *)cocos2d::CCString::getCString(v53);
std::string::assign((std::string *)(v25 + 240), v54);
}
if ( (unsigned int)sub_1002E757C(v24) >= 0x18 )
{
v55 = cocos2d::CCArray::stringAtIndex(v24, 23);
v56 = (const char *)cocos2d::CCString::getCString(v55);
*(_QWORD *)(v25 + 280) = atoll(v56);
}
if ( (unsigned int)sub_1002E757C(v24) >= 0x19 )
{
v57 = cocos2d::CCArray::stringAtIndex(v24, 24);
*(_DWORD *)(v25 + 288) = cocos2d::CCString::intValue(v57);
}
if ( (unsigned int)sub_1002E757C(v24) < 0x1A )
{
if ( *(_BYTE *)(v25 + 265) == 1 )
*(_DWORD *)(v25 + 268) = 2;
}
else
{
v58 = cocos2d::CCArray::stringAtIndex(v24, 25);
v59 = cocos2d::CCString::intValue(v58);
*(_DWORD *)(v25 + 268) = v59;
*(_BYTE *)(v25 + 265) = v59 == 2;
}
sub_1002E74E0(v18, v25);
}
}
}
v60 = *(void (__fastcall ****)(_QWORD, __int64, _QWORD, _QWORD, __int64))(a1 + 1264);
if ( v60 )
(**v60)(v60, v18, HIDWORD(v61), (unsigned int)v61, v14);
if ( SHIBYTE(v71.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v71.__r_.__value_.__l.__data_);
}