//
// sub_10009F7D0 from 0x10009f7d0 to 0x10009fcb4 (1252 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x100093788
//
// 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:30 +0000
//
void __fastcall sub_10009F7D0(__int64 a1, __int64 a2, char *a3)
{
__int64 v6; // x22
char *v7; // x1
__int64 v8; // x20
_BOOL4 v9; // w0
_BOOL4 v10; // w22
__int64 v11; // x0
__int64 v12; // x0
__int64 v13; // x22
__int64 v14; // x22
__int64 v15; // x0
__int64 v16; // x21
__int64 v17; // x0
__int64 v18; // x0
__int64 v19; // x23
__int64 v20; // x24
std::string *p_p; // x1
__int64 v22; // x25
__int64 i; // x26
__int64 v24; // x0
char *CString; // x0
__int64 v26; // x22
__int64 v27; // x28
__int64 v28; // x0
const std::string::value_type *v29; // x0
__int64 v30; // x0
const std::string::value_type *v31; // x0
__int64 v32; // x0
__int64 v33; // x0
__int64 v34; // x0
char *v35; // x0
__int64 v36; // x0
char *v37; // x0
__int64 v38; // x0
const char *v39; // x0
__int64 v40; // x0
__int64 v41; // x0
char *v42; // x0
__int64 v43; // x0
unsigned int v44; // [xsp+Ch] [xbp-D4h]
void *v45[2]; // [xsp+10h] [xbp-D0h] BYREF
char v46; // [xsp+27h] [xbp-B9h]
void *v47[2]; // [xsp+28h] [xbp-B8h] BYREF
char v48; // [xsp+3Fh] [xbp-A1h]
void *v49[2]; // [xsp+40h] [xbp-A0h] BYREF
char v50; // [xsp+57h] [xbp-89h]
std::string v51; // [xsp+58h] [xbp-88h] BYREF
std::string __p; // [xsp+70h] [xbp-70h] BYREF
std::allocator __a; // [xsp+8Fh] [xbp-51h] BYREF
v6 = *(_QWORD *)(a1 + 1088);
v7 = a3;
if ( a3[23] < 0 )
v7 = *(char **)a3;
sub_100009900(&__p, v7);
cocos2d::CCDictionary::removeObjectForKey(v6, (char *)&__p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
v8 = sub_1000C335C(a3);
sub_100009900(&__p, "-1");
v9 = sub_1000045BC((_QWORD *)a2, &__p);
v10 = v9;
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(__p.__r_.__value_.__l.__data_);
if ( v10 )
{
LABEL_7:
v11 = *(_QWORD *)(a1 + 1256);
if ( v11 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 248LL))(v11, v8);
return;
}
}
else if ( v9 )
{
goto LABEL_7;
}
if ( *(char *)(a2 + 23) < 0 )
sub_1000097D0(&__p, *(void **)a2, *(_QWORD *)(a2 + 8));
else
__p = *(std::string *)a2;
v12 = std::string::find((const std::string *)a2, 35, 0);
if ( v12 == -1 )
goto LABEL_20;
v13 = v12;
std::string::basic_string(&v51, (const std::string *)a2, 0, v12, &__a);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
__p = v51;
std::string::basic_string(&v51, (const std::string *)a2, v13 + 1, 0xFFFFFFFFFFFFFFFFLL, &__a);
v14 = sub_1000A72B8(&v51, ":");
if ( SHIBYTE(v51.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v51.__r_.__value_.__l.__data_);
v12 = sub_1002E757C(v14);
if ( (unsigned int)v12 < 3 )
{
LABEL_20:
v44 = 0;
v16 = 0xFFFFFFFFLL;
v19 = 50;
}
else
{
v15 = cocos2d::CCArray::stringAtIndex(v14, 0);
v16 = cocos2d::CCString::intValue(v15);
v17 = cocos2d::CCArray::stringAtIndex(v14, 1);
v44 = cocos2d::CCString::intValue(v17);
v18 = cocos2d::CCArray::stringAtIndex(v14, 2);
v12 = cocos2d::CCString::intValue(v18);
v19 = v12;
}
v20 = sub_1002E736C(v12);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
{
if ( __p.__r_.__value_.__l.__size_ )
{
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
goto LABEL_26;
}
}
else if ( *((_BYTE *)&__p.__r_.__value_.__s + 23) )
{
p_p = &__p;
LABEL_26:
sub_100009900(&v51, (char *)p_p);
v22 = sub_1000A72B8(&v51, "|");
if ( SHIBYTE(v51.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v51.__r_.__value_.__l.__data_);
for ( i = 0; (unsigned int)i < (unsigned int)sub_1002E757C(v22); i = (unsigned int)(i + 1) )
{
v24 = cocos2d::CCArray::stringAtIndex(v22, i);
CString = (char *)cocos2d::CCString::getCString(v24);
sub_100009900(&v51, CString);
v26 = sub_1000A72B8(&v51, ":");
if ( SHIBYTE(v51.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v51.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1002E757C(v26) >= 7 )
{
v27 = sub_1000C33B4();
v28 = cocos2d::CCArray::stringAtIndex(v26, 0);
v29 = (const std::string::value_type *)cocos2d::CCString::getCString(v28);
std::string::assign((std::string *)(v27 + 56), v29);
v30 = cocos2d::CCArray::stringAtIndex(v26, 1);
v31 = (const std::string::value_type *)cocos2d::CCString::getCString(v30);
std::string::assign((std::string *)(v27 + 80), v31);
v32 = cocos2d::CCArray::stringAtIndex(v26, 2);
*(_DWORD *)(v27 + 104) = cocos2d::CCString::intValue(v32);
v33 = cocos2d::CCArray::stringAtIndex(v26, 3);
*(_DWORD *)(v27 + 108) = cocos2d::CCString::intValue(v33);
v34 = cocos2d::CCArray::stringAtIndex(v26, 4);
v35 = (char *)cocos2d::CCString::getCString(v34);
sub_100009900(v49, v35);
LevelTools::base64DecodeString(&v51, v49);
if ( *(char *)(v27 + 143) < 0 )
operator delete(*(void **)(v27 + 120));
*(std::string *)(v27 + 120) = v51;
*((_BYTE *)&v51.__r_.__value_.__s + 23) = 0;
v51.__r_.__value_.__s.__data_[0] = 0;
if ( v50 < 0 )
operator delete(v49[0]);
v36 = cocos2d::CCArray::stringAtIndex(v26, 5);
v37 = (char *)cocos2d::CCString::getCString(v36);
sub_100009900(v47, v37);
LevelTools::base64DecodeString(&v51, v47);
if ( *(char *)(v27 + 191) < 0 )
operator delete(*(void **)(v27 + 168));
*(std::string *)(v27 + 168) = v51;
*((_BYTE *)&v51.__r_.__value_.__s + 23) = 0;
v51.__r_.__value_.__s.__data_[0] = 0;
if ( v48 < 0 )
operator delete(v47[0]);
v38 = cocos2d::CCArray::stringAtIndex(v26, 6);
v39 = (const char *)cocos2d::CCString::getCString(v38);
*(_QWORD *)(v27 + 192) = atoll(v39);
if ( (unsigned int)sub_1002E757C(v26) >= 8 )
{
v40 = cocos2d::CCArray::stringAtIndex(v26, 7);
*(_DWORD *)(v27 + 112) = cocos2d::CCString::intValue(v40);
}
if ( (unsigned int)sub_1002E757C(v26) >= 9 )
{
v41 = cocos2d::CCArray::stringAtIndex(v26, 8);
v42 = (char *)cocos2d::CCString::getCString(v41);
sub_100009900(v45, v42);
LevelTools::base64DecodeString(&v51, v45);
if ( *(char *)(v27 + 167) < 0 )
operator delete(*(void **)(v27 + 144));
*(std::string *)(v27 + 144) = v51;
*((_BYTE *)&v51.__r_.__value_.__s + 23) = 0;
v51.__r_.__value_.__s.__data_[0] = 0;
if ( v46 < 0 )
operator delete(v45[0]);
}
sub_1002E74E0(v20, v27);
}
}
}
if ( (v16 & 0x80000000) != 0 )
v16 = sub_1002E757C(v20);
v43 = *(_QWORD *)(a1 + 1256);
if ( v43 )
(*(void (__fastcall **)(__int64, __int64, __int64, __int64, _QWORD, __int64))(*(_QWORD *)v43 + 240LL))(
v43,
v8,
v20,
v16,
v44,
v19);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
}