//
// sub_10029DA90 from 0x10029da90 to 0x10029e2a8 (2072 bytes)
//
// 1 xrefs:
// > sub_10029E420 @ 0x10029e47c
//
// 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 11:02:11 +0000
//
void __fastcall sub_10029DA90(__int64 a1, char *a2, int a3)
{
__int64 v5; // x8
_QWORD *v6; // x21
__int64 v7; // x8
__int64 v8; // x22
__int64 v9; // x0
char *CString; // x0
__int64 v11; // x23
int v12; // w22
__int64 v13; // x24
__int64 v14; // x0
char *v15; // x0
std::string *v16; // x0
__int64 v17; // x27
__int64 v18; // x0
char *v19; // x0
std::string::size_type v20; // x25
std::string *v21; // x0
int v22; // w0
int v23; // w28
bool v24; // w8
std::string::size_type size; // x9
int v26; // w8
__int64 v27; // x0
const char *v28; // x0
__int64 v29; // x0
int v30; // w27
int v31; // w8
__int64 v32; // x27
__int64 v33; // x0
char *v34; // x0
std::string *v35; // x0
_OWORD *v36; // x0
char *v37; // x1
_OWORD *v38; // x8
const char *v39; // x0
_OWORD *v40; // x8
const char *v41; // x0
_OWORD *v42; // x8
const char *v43; // x0
_OWORD *v44; // x8
const char *v45; // x0
_OWORD *v46; // x0
char *v47; // x1
_OWORD *v48; // x0
__int64 v49; // x0
void *v50; // x8
__int128 v51; // q0
__int64 v52; // x0
char *v53; // x0
std::string *v54; // x0
int v55; // w23
unsigned __int64 v56; // x21
int v57; // w22
char *v58; // x24
const char *v59; // x0
int v60; // w8
__int64 v61; // x19
__int64 v62; // [xsp+0h] [xbp-1A0h]
__int64 v63; // [xsp+18h] [xbp-188h]
std::string __dst; // [xsp+20h] [xbp-180h] BYREF
void *v65[2]; // [xsp+38h] [xbp-168h] BYREF
char v66; // [xsp+4Fh] [xbp-151h]
std::string __str; // [xsp+50h] [xbp-150h] BYREF
void *v68[2]; // [xsp+68h] [xbp-138h] BYREF
char v69; // [xsp+7Fh] [xbp-121h]
void *__p[2]; // [xsp+80h] [xbp-120h] BYREF
__int128 v71; // [xsp+90h] [xbp-110h]
void *v72[2]; // [xsp+A0h] [xbp-100h] BYREF
__int128 v73; // [xsp+B0h] [xbp-F0h]
__int64 *v74; // [xsp+C8h] [xbp-D8h] BYREF
_QWORD *v75[2]; // [xsp+D0h] [xbp-D0h] BYREF
void *v76; // [xsp+E0h] [xbp-C0h] BYREF
char v77; // [xsp+F7h] [xbp-A9h]
std::string v78; // [xsp+F8h] [xbp-A8h] BYREF
__int128 v79; // [xsp+110h] [xbp-90h] BYREF
std::string v80; // [xsp+120h] [xbp-80h] BYREF
_OWORD *v81[2]; // [xsp+140h] [xbp-60h] BYREF
v5 = 12920;
if ( a3 )
v5 = 12848;
v6 = (_QWORD *)(a1 + v5);
v7 = 12944;
if ( a3 )
v7 = 12872;
v63 = v7;
v6[1] = *v6;
if ( a2[23] < 0 )
a2 = *(char **)a2;
sub_100009900(__p, a2);
v8 = sub_100279D98((std::string *)__p, "#");
if ( SBYTE7(v71) < 0 )
operator delete(__p[0]);
if ( (unsigned int)sub_1002E757C(v8) >= 2 )
{
v9 = cocos2d::CCArray::stringAtIndex(v8, 0);
CString = (char *)cocos2d::CCString::getCString(v9);
sub_100009900(__p, CString);
v11 = sub_100279D98((std::string *)__p, ";");
v62 = v8;
if ( SBYTE7(v71) < 0 )
operator delete(__p[0]);
if ( (unsigned int)sub_1002E757C(v11) )
{
v12 = 0;
v13 = 0;
do
{
v14 = cocos2d::CCArray::stringAtIndex(v11, v13);
v15 = (char *)cocos2d::CCString::getCString(v14);
v16 = (std::string *)sub_100009900(&v80, v15);
v17 = sub_100279D98(v16, ",");
v79 = 0u;
v18 = cocos2d::CCArray::stringAtIndex(v17, 0);
v19 = (char *)cocos2d::CCString::getCString(v18);
sub_100009900(&v78, v19);
v20 = SHIBYTE(v78.__r_.__value_.__r.__words[2]);
if ( (v78.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v21 = &v78;
else
v21 = (std::string *)v78.__r_.__value_.__r.__words[0];
v22 = atoi((const char *)v21);
if ( v22 >= 0 )
v23 = v22;
else
v23 = -v22;
v24 = 1;
LODWORD(v79) = 1;
size = v78.__r_.__value_.__l.__size_;
if ( (v20 & 0x80000000) == 0LL )
size = v20;
if ( size )
v24 = *std::string::at(&v78, 0) != 45;
v12 += v23;
BYTE4(v79) = v24;
if ( a3 )
v26 = v23;
else
v26 = v12;
DWORD2(v79) = v26;
if ( (unsigned int)sub_1002E757C(v17) >= 2 )
{
v27 = cocos2d::CCArray::stringAtIndex(v17, 1);
v28 = (const char *)cocos2d::CCString::getCString(v27);
v29 = atoi(v28);
v30 = v29;
LODWORD(v79) = sub_10029D544(v29, v29);
BYTE5(v79) = v30 > 5;
if ( (v79 & 0xFFFFFFFE) == 0x62 )
{
v31 = *(_DWORD *)(a1 + 12912);
*(_DWORD *)(a1 + 12912) = v31 + 1;
HIDWORD(v79) = v31;
v32 = sub_100279D98(&v80, ":");
if ( (unsigned int)sub_1002E757C(v32) >= 2 )
{
v33 = cocos2d::CCArray::stringAtIndex(v32, 1);
v34 = (char *)cocos2d::CCString::getCString(v33);
v35 = (std::string *)sub_100009900(&v76, v34);
v75[0] = nullptr;
v75[1] = nullptr;
v74 = (__int64 *)v75;
sub_10004A9C0(v35, ",", (__int64)&v74);
*(_OWORD *)v72 = 0u;
v73 = 0u;
*(_OWORD *)__p = 0u;
v71 = 0u;
LODWORD(__p[0]) = HIDWORD(v79);
sub_100009900(v68, "1");
if ( sub_1000D9098((__int64)&v74, (const void **)v68) )
{
sub_100009900(v65, "1");
v81[0] = v65;
v36 = sub_100018A0C(&v74, (__int64)v65, (__int64)&unk_100763014, v81);
v37 = (char *)v36 + 56;
if ( *((char *)v36 + 79) < 0 )
v37 = *(char **)v37;
sub_100009900(&__str, v37);
__p[1] = (void *)std::stoull(&__str, nullptr, 10);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( v66 < 0 )
operator delete(v65[0]);
}
else
{
__p[1] = nullptr;
}
if ( v69 < 0 )
operator delete(v68[0]);
sub_100009900(v68, "3");
__str.__r_.__value_.__r.__words[0] = (std::string::size_type)v68;
v38 = sub_100018A0C(&v74, (__int64)v68, (__int64)&unk_100763014, &__str);
v39 = (char *)v38 + 56;
if ( *((char *)v38 + 79) < 0 )
v39 = *(const char **)v39;
LODWORD(v71) = atoi(v39);
if ( v69 < 0 )
operator delete(v68[0]);
sub_100009900(v68, "4");
__str.__r_.__value_.__r.__words[0] = (std::string::size_type)v68;
v40 = sub_100018A0C(&v74, (__int64)v68, (__int64)&unk_100763014, &__str);
v41 = (char *)v40 + 56;
if ( *((char *)v40 + 79) < 0 )
v41 = *(const char **)v41;
DWORD1(v71) = atoi(v41);
if ( v69 < 0 )
operator delete(v68[0]);
sub_100009900(v68, "5");
__str.__r_.__value_.__r.__words[0] = (std::string::size_type)v68;
v42 = sub_100018A0C(&v74, (__int64)v68, (__int64)&unk_100763014, &__str);
v43 = (char *)v42 + 56;
if ( *((char *)v42 + 79) < 0 )
v43 = *(const char **)v43;
LODWORD(v72[0]) = atoi(v43);
if ( v69 < 0 )
operator delete(v68[0]);
sub_100009900(v68, "6");
__str.__r_.__value_.__r.__words[0] = (std::string::size_type)v68;
v44 = sub_100018A0C(&v74, (__int64)v68, (__int64)&unk_100763014, &__str);
v45 = (char *)v44 + 56;
if ( *((char *)v44 + 79) < 0 )
v45 = *(const char **)v45;
HIDWORD(v72[0]) = atoi(v45);
if ( v69 < 0 )
operator delete(v68[0]);
sub_100009900(v68, "7");
if ( sub_1000D9098((__int64)&v74, (const void **)v68) )
{
sub_100009900(v65, "7");
v81[0] = v65;
v46 = sub_100018A0C(&v74, (__int64)v65, (__int64)&unk_100763014, v81);
v47 = (char *)v46 + 56;
if ( *((char *)v46 + 79) < 0 )
v47 = *(char **)v47;
sub_100009900(&__str, v47);
*((_QWORD *)&v71 + 1) = std::stoull(&__str, nullptr, 10);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( v66 < 0 )
operator delete(v65[0]);
}
else
{
*((_QWORD *)&v71 + 1) = 0;
}
if ( v69 < 0 )
operator delete(v68[0]);
sub_100009900(v68, "8");
__str.__r_.__value_.__r.__words[0] = (std::string::size_type)v68;
v48 = sub_100018A0C(&v74, (__int64)v68, (__int64)&unk_100763014, &__str);
std::string::operator=((std::string *)&v72[1], (const std::string *)((char *)v48 + 56));
if ( v69 < 0 )
operator delete(v68[0]);
v68[0] = (char *)&v79 + 12;
v49 = sub_1002AEDF0(a1 + v63, (char *)&v79 + 12, &unk_100763014, v68, &__str);
v50 = v72[0];
v51 = v71;
*(_OWORD *)(v49 + 24) = *(_OWORD *)__p;
*(_OWORD *)(v49 + 40) = v51;
*(_QWORD *)(v49 + 56) = v50;
std::string::operator=((std::string *)(v49 + 64), (const std::string *)&v72[1]);
DWORD2(v79) = v23;
if ( SHIBYTE(v73) < 0 )
operator delete(v72[1]);
sub_100018980((__int64)&v74, v75[0]);
if ( v77 < 0 )
operator delete(v76);
v12 = v23;
}
}
}
sub_10029D6CC((__int64)v6, &v79);
if ( SHIBYTE(v78.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v78.__r_.__value_.__l.__data_);
if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v80.__r_.__value_.__l.__data_);
v13 = (unsigned int)(v13 + 1);
}
while ( (unsigned int)v13 < (unsigned int)sub_1002E757C(v11) );
}
__p[0] = nullptr;
__p[1] = nullptr;
*(_QWORD *)&v71 = 0;
v52 = cocos2d::CCArray::stringAtIndex(v62, 1);
v53 = (char *)cocos2d::CCString::getCString(v52);
v54 = (std::string *)sub_100009900(&v80, v53);
sub_100279C18(v54, (__int64)__p);
if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v80.__r_.__value_.__l.__data_);
v55 = -1431655765 * ((unsigned __int64)((char *)__p[1] - (char *)__p[0]) >> 3);
if ( v55 < 1 )
{
v57 = 0;
v56 = 0;
}
else
{
v56 = std::stoull((const std::string *)__p[0], nullptr, 10);
if ( v55 == 1 )
{
v57 = 0;
}
else
{
v58 = (char *)__p[0];
v59 = (char *)__p[0] + 24;
if ( *((char *)__p[0] + 47) < 0 )
v59 = *(const char **)v59;
v57 = atoi(v59);
if ( (unsigned int)v55 >= 6 )
{
if ( (v58[143] & 0x80000000) == 0 )
{
v80 = *(std::string *)(v58 + 5);
if ( a3 )
goto LABEL_89;
goto LABEL_92;
}
sub_1000097D0(&v80, *((void **)v58 + 15), *((_QWORD *)v58 + 16));
LABEL_88:
if ( a3 )
{
LABEL_89:
*(_QWORD *)(a1 + 12800) = v56;
*(_DWORD *)(a1 + 13088) = v57;
std::string::operator=((std::string *)(a1 + 13064), &v80);
LABEL_100:
if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v80.__r_.__value_.__l.__data_);
v80.__r_.__value_.__r.__words[0] = (std::string::size_type)__p;
sub_100018250((void ***)&v80);
return;
}
LABEL_92:
*(_QWORD *)(a1 + 12808) = v56;
if ( v57 <= 1 )
v60 = 1;
else
v60 = v57;
*(_DWORD *)(a1 + 12212) = v60 - 1;
sub_10004BDAC(v56);
v61 = *(_QWORD *)(a1 + 2152);
if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__dst, v80.__r_.__value_.__l.__data_, v80.__r_.__value_.__l.__size_);
else
__dst = v80;
sub_100015E44(v61, (__int64)&__dst);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
goto LABEL_100;
}
}
}
sub_100009900(&v80, "");
goto LABEL_88;
}
}