//
// sub_1000A07DC from 0x1000a07dc to 0x1000a0d24 (1352 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x10009273c
//
// 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:31 +0000
//
void __fastcall sub_1000A07DC(__int64 a1, std::string *a2, char *__s)
{
__int64 v5; // x21
_BOOL4 v6; // w0
_BOOL4 v7; // w21
std::string::size_type v8; // x0
std::string::size_type v9; // x21
__int64 v10; // x22
__int64 v11; // x0
__int64 v12; // x0
__int64 v13; // x20
__int64 v14; // x0
__int64 v15; // x21
__int64 v16; // x0
__int64 v17; // x22
__int64 v18; // x0
__int64 v19; // x23
std::string::size_type size; // x8
__int64 v21; // x24
__int64 i; // x25
__int64 v23; // x0
char *CString; // x0
__int64 v25; // x28
__int64 v26; // x27
__int64 v27; // x0
__int64 v28; // x0
char *v29; // x0
__int64 v30; // x0
__int64 v31; // x0
__int64 v32; // x0
__int64 v33; // x0
__int64 v34; // x0
const char *v35; // x0
__int64 v36; // x0
const std::string::value_type *v37; // x0
__int64 v38; // x0
__int64 v39; // x0
__int64 v40; // x0
char *v41; // x0
__int64 v42; // x0
const std::string::value_type *v43; // x0
__int64 v44; // x0
__int64 v45; // x0
__int64 v46; // x0
__int64 v47; // x0
__int64 v48; // x0
__int64 v49; // x0
const char *v50; // x0
__int64 v51; // x0
__int64 v52; // x0
int v53; // w28
__int64 v54; // x0
void *v55[2]; // [xsp+0h] [xbp-E0h] BYREF
__int64 v56; // [xsp+10h] [xbp-D0h]
void *v57[2]; // [xsp+18h] [xbp-C8h] BYREF
char v58; // [xsp+2Fh] [xbp-B1h]
void *__p[2]; // [xsp+30h] [xbp-B0h] BYREF
char v60; // [xsp+47h] [xbp-99h]
std::allocator v61[16]; // [xsp+48h] [xbp-98h] BYREF
__int64 v62; // [xsp+58h] [xbp-88h]
std::string __a; // [xsp+60h] [xbp-80h] BYREF
std::string v64; // [xsp+78h] [xbp-68h] BYREF
v5 = *(_QWORD *)(a1 + 1088);
if ( __s[23] < 0 )
__s = *(char **)__s;
sub_100009900(&v64, __s);
cocos2d::CCDictionary::removeObjectForKey(v5, (char *)&v64);
if ( SHIBYTE(v64.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v64.__r_.__value_.__l.__data_);
sub_100009900(&v64, "-1");
v6 = sub_1000045BC(a2, &v64);
v7 = v6;
if ( SHIBYTE(v64.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(v64.__r_.__value_.__l.__data_);
if ( v7 )
goto LABEL_12;
}
else if ( v6 )
{
LABEL_12:
v18 = *(_QWORD *)(a1 + 1256);
if ( v18 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v18 + 296LL))(v18);
return;
}
v8 = std::string::find(a2, 35, 0);
if ( v8 == -1 )
goto LABEL_12;
v9 = v8;
std::string::basic_string(&v64, a2, 0, v8, (std::allocator *)&__a);
std::string::basic_string(&__a, a2, v9 + 1, 0xFFFFFFFFFFFFFFFFLL, v61);
v10 = sub_1000A72B8(&__a, ":");
v11 = sub_1002E757C(v10);
if ( (unsigned int)v11 < 3 )
{
v15 = 0;
v13 = 0;
v17 = 20;
}
else
{
v12 = cocos2d::CCArray::stringAtIndex(v10, 0);
v13 = cocos2d::CCString::intValue(v12);
v14 = cocos2d::CCArray::stringAtIndex(v10, 1);
v15 = cocos2d::CCString::intValue(v14);
v16 = cocos2d::CCArray::stringAtIndex(v10, 2);
v11 = cocos2d::CCString::intValue(v16);
v17 = v11;
}
v19 = sub_1002E736C(v11);
size = HIBYTE(v64.__r_.__value_.__r.__words[2]);
if ( (v64.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = v64.__r_.__value_.__l.__size_;
if ( size )
{
v21 = sub_1000A72B8(&v64, "|");
for ( i = 0; (unsigned int)i < (unsigned int)sub_1002E757C(v21); i = (unsigned int)(i + 1) )
{
v23 = cocos2d::CCArray::stringAtIndex(v21, i);
CString = (char *)cocos2d::CCString::getCString(v23);
sub_100009900(v61, CString);
v25 = sub_1000A72B8(v61, ":");
if ( SHIBYTE(v62) < 0 )
operator delete(*(void **)&v61[0].std::__non_trivial_if);
if ( (unsigned int)sub_1002E757C(v25) >= 9 )
{
v26 = sub_1000C3C0C();
v27 = cocos2d::CCArray::stringAtIndex(v25, 0);
*(_DWORD *)(v26 + 56) = cocos2d::CCString::intValue(v27);
v28 = cocos2d::CCArray::stringAtIndex(v25, 1);
v29 = (char *)cocos2d::CCString::getCString(v28);
sub_100009900(__p, v29);
LevelTools::base64DecodeString(v61, __p);
if ( *(char *)(v26 + 87) < 0 )
operator delete(*(void **)(v26 + 64));
*(_OWORD *)(v26 + 64) = *(_OWORD *)&v61[0].std::__non_trivial_if;
*(_QWORD *)(v26 + 80) = v62;
HIBYTE(v62) = 0;
v61[0].std::__non_trivial_if = 0;
if ( v60 < 0 )
operator delete(__p[0]);
v30 = cocos2d::CCArray::stringAtIndex(v25, 2);
*(_DWORD *)(v26 + 88) = cocos2d::CCString::intValue(v30);
v31 = cocos2d::CCArray::stringAtIndex(v25, 3);
*(_DWORD *)(v26 + 92) = cocos2d::CCString::intValue(v31);
v32 = cocos2d::CCArray::stringAtIndex(v25, 4);
*(_DWORD *)(v26 + 96) = cocos2d::CCString::intValue(v32);
v33 = cocos2d::CCArray::stringAtIndex(v25, 5);
*(_DWORD *)(v26 + 100) = cocos2d::CCString::intValue(v33);
v34 = cocos2d::CCArray::stringAtIndex(v25, 6);
v35 = (const char *)cocos2d::CCString::getCString(v34);
*(_QWORD *)(v26 + 104) = atoll(v35);
v36 = cocos2d::CCArray::stringAtIndex(v25, 7);
v37 = (const std::string::value_type *)cocos2d::CCString::getCString(v36);
std::string::assign((std::string *)(v26 + 112), v37);
v38 = cocos2d::CCArray::stringAtIndex(v25, 8);
*(_DWORD *)(v26 + 136) = cocos2d::CCString::intValue(v38);
if ( (unsigned int)sub_1002E757C(v25) >= 0xC )
{
v39 = cocos2d::CCArray::stringAtIndex(v25, 9);
*(_DWORD *)(v26 + 140) = cocos2d::CCString::intValue(v39);
v40 = cocos2d::CCArray::stringAtIndex(v25, 10);
v41 = (char *)cocos2d::CCString::getCString(v40);
sub_100009900(v57, v41);
LevelTools::base64DecodeString(v61, v57);
if ( *(char *)(v26 + 167) < 0 )
operator delete(*(void **)(v26 + 144));
*(_OWORD *)(v26 + 144) = *(_OWORD *)&v61[0].std::__non_trivial_if;
*(_QWORD *)(v26 + 160) = v62;
HIBYTE(v62) = 0;
v61[0].std::__non_trivial_if = 0;
if ( v58 < 0 )
operator delete(v57[0]);
v42 = cocos2d::CCArray::stringAtIndex(v25, 11);
v43 = (const std::string::value_type *)cocos2d::CCString::getCString(v42);
std::string::assign((std::string *)(v26 + 168), v43);
}
if ( (unsigned int)sub_1002E757C(v25) >= 0x12 )
{
v44 = cocos2d::CCArray::stringAtIndex(v25, 12);
*(_DWORD *)(v26 + 192) = cocos2d::CCString::intValue(v44);
v45 = cocos2d::CCArray::stringAtIndex(v25, 13);
*(_DWORD *)(v26 + 196) = cocos2d::CCString::intValue(v45);
v46 = cocos2d::CCArray::stringAtIndex(v25, 14);
*(_DWORD *)(v26 + 200) = cocos2d::CCString::intValue(v46);
v47 = cocos2d::CCArray::stringAtIndex(v25, 15);
*(_DWORD *)(v26 + 204) = cocos2d::CCString::intValue(v47);
v48 = cocos2d::CCArray::stringAtIndex(v25, 16);
*(_DWORD *)(v26 + 208) = cocos2d::CCString::intValue(v48);
v49 = cocos2d::CCArray::stringAtIndex(v25, 17);
v50 = (const char *)cocos2d::CCString::getCString(v49);
*(_QWORD *)(v26 + 216) = atoll(v50);
}
if ( (unsigned int)sub_1002E757C(v25) >= 0x14 )
{
v51 = cocos2d::CCArray::stringAtIndex(v25, 18);
*(_DWORD *)(v26 + 224) = cocos2d::CCString::intValue(v51);
v52 = cocos2d::CCArray::stringAtIndex(v25, 19);
*(_DWORD *)(v26 + 228) = cocos2d::CCString::intValue(v52);
}
v53 = *(_DWORD *)(v26 + 56);
if ( *(char *)(v26 + 87) < 0 )
{
sub_1000097D0(v55, *(void **)(v26 + 64), *(_QWORD *)(v26 + 72));
}
else
{
*(_OWORD *)v55 = *(_OWORD *)(v26 + 64);
v56 = *(_QWORD *)(v26 + 80);
}
GameLevelManager::storeUserName(a1, 0, v53, (char *)v55);
if ( SHIBYTE(v56) < 0 )
operator delete(v55[0]);
sub_1002E74E0(v19, v26);
}
}
}
v54 = *(_QWORD *)(a1 + 1256);
if ( v54 )
(*(void (__fastcall **)(__int64, __int64, __int64, __int64, __int64))(*(_QWORD *)v54 + 288LL))(
v54,
v19,
v13,
v15,
v17);
if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__a.__r_.__value_.__l.__data_);
if ( SHIBYTE(v64.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v64.__r_.__value_.__l.__data_);
}