//
// sub_100936990 from 0x100936990 to 0x100936e79 (1257 bytes)
//
// 4 xrefs:
// > sub_100936360 @ 0x10093648e
// > ThreadViewPopup::mountVirtualRow @ 0x100938e5a
// > sub_10094C500 @ 0x10094d371
// > sub_1009543D0 @ 0x100954d6f
//
// This function is hookable on this platform (idp: pc, 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 12:38:26 +0000
//
std::string *__fastcall sub_100936990(std::string *this, std::string *a2, _QWORD *a3)
{
std::string *v4; // r13
unsigned int v5; // esi
std::string::size_type size; // rsi
unsigned int v7; // ecx
bool v8; // al
unsigned __int64 v9; // r12
std::string::pointer v10; // rcx
char v11; // al
unsigned __int64 v12; // r9
unsigned __int64 v13; // r11
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v14; // cl
std::string::size_type v15; // r14
std::string::size_type v16; // rsi
std::string::pointer v17; // rdi
std::string::size_type v18; // r8
std::string::size_type v19; // rbx
size_t v20; // rdx
unsigned __int8 v21; // r10
std::string::pointer v22; // rsi
std::string::pointer v23; // rsi
size_t v24; // r14
char *v25; // rax
size_t v26; // r13
char *v27; // r13
char v28; // r13
void *v29; // r14
const char *v30; // rdi
__int64 v31; // rax
__int64 v32; // rcx
void *v33; // rdi
__int64 v34; // r14
__int64 v35; // rdx
std::string::pointer v36; // rax
unsigned int v37; // ecx
char *v38; // rdi
char *v39; // rax
size_t v40; // rax
size_t v41; // r14
char *v42; // r12
void *v43; // rsi
unsigned int v44; // eax
std::string::size_type v45; // rax
size_t v46; // r13
char *v47; // rax
size_t v48; // rcx
const std::string::value_type *v49; // rsi
std::string::size_type v50; // rdx
_QWORD v52[2]; // [rsp+0h] [rbp-90h] BYREF
int v53; // [rsp+10h] [rbp-80h]
bool v54; // [rsp+14h] [rbp-7Ch]
char *v55; // [rsp+18h] [rbp-78h]
_QWORD *v56; // [rsp+20h] [rbp-70h]
__int64 v57; // [rsp+28h] [rbp-68h]
void *__src; // [rsp+30h] [rbp-60h]
char *data; // [rsp+38h] [rbp-58h]
std::string *v60; // [rsp+40h] [rbp-50h]
__int64 __dst; // [rsp+48h] [rbp-48h] BYREF
size_t v62; // [rsp+50h] [rbp-40h]
void *__p; // [rsp+58h] [rbp-38h]
int v64; // [rsp+64h] [rbp-2Ch]
v56 = a3;
v4 = this;
*(_OWORD *)&this->__r_.__value_.__l.0 = 0;
this->__r_.__value_.__r.__words[2] = 0;
v5 = (unsigned int)a2->__r_.__value_.__l.0;
if ( (v5 & 1) != 0 )
size = a2->__r_.__value_.__l.__size_;
else
size = v5 >> 1;
std::string::reserve(this, size + 16);
v7 = (unsigned int)a2->__r_.__value_.__l.0;
v8 = (v7 & 1) == 0;
if ( (v7 & 1) != 0 )
{
if ( !a2->__r_.__value_.__l.__size_ )
return v4;
goto LABEL_8;
}
if ( v7 >> 1 )
{
LABEL_8:
data = a2->__r_.__value_.__s.__data_;
v9 = 0;
v60 = this;
do
{
while ( 1 )
{
v10 = data;
if ( !v8 )
v10 = a2->__r_.__value_.__l.__data_;
if ( !v9
|| (v11 = v10[v9 - 1], v11 != 95)
&& (unsigned __int8)(v11 - 58) <= 0xF5u
&& (unsigned __int8)((v11 & 0xDF) - 91) <= 0xE5u )
{
if ( v10[v9] == 108 && (int)(-1431655765 * ((v56[1] - *v56) >> 3)) <= 4 )
break;
}
LABEL_60:
v36 = data;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
v36 = a2->__r_.__value_.__l.__data_;
std::string::push_back(v4, v36[v9++]);
v37 = (unsigned int)a2->__r_.__value_.__l.0;
v8 = (v37 & 1) == 0;
if ( (v37 & 1) != 0 )
goto LABEL_9;
LABEL_63:
if ( v9 >= v37 >> 1 )
return v4;
}
v64 = std::string::compare(a2, v9, 2u, "l_");
if ( v64 )
{
if ( std::string::compare(a2, v9, 3u, "li_") )
goto LABEL_60;
v13 = v9 + 3;
if ( v9 == -4 )
goto LABEL_60;
}
else
{
v13 = v9 + 2;
if ( v9 == -3 )
goto LABEL_60;
}
v14 = a2->__r_.__value_.__s.0;
v15 = *(_BYTE *)&a2->__r_.__value_.__l.0 >> 1;
v16 = a2->__r_.__value_.__l.__size_;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) == 0 )
v16 = *(_BYTE *)&a2->__r_.__value_.__l.0 >> 1;
if ( v13 >= v16 )
goto LABEL_38;
v17 = data;
if ( (*(_BYTE *)&v14 & 1) != 0 )
v17 = a2->__r_.__value_.__l.__data_;
if ( (unsigned __int8)(v17[v13] - 48) > 9u )
{
LABEL_38:
v19 = v13;
v20 = 0;
if ( v13 >= v16 )
goto LABEL_39;
}
else
{
v18 = v13 + 1;
v12 = 1;
do
{
v19 = v18;
v20 = v12;
if ( v12 > 9 )
break;
if ( v18 >= v16 )
break;
v21 = v17[v18++] - 48;
++v12;
}
while ( v21 <= 9u );
if ( v19 >= v16 )
{
LABEL_39:
LODWORD(v12) = 0;
if ( v19 <= v13 )
goto LABEL_60;
goto LABEL_40;
}
}
v22 = data;
if ( (*(_BYTE *)&v14 & 1) != 0 )
v22 = a2->__r_.__value_.__l.__data_;
LOBYTE(v12) = (unsigned __int8)((v22[v19] & 0xDF) - 65) < 0x1Au
|| (unsigned __int8)(v22[v19] - 48) < 0xAu
|| v22[v19] == 95;
if ( v19 <= v13 )
goto LABEL_60;
LABEL_40:
if ( (*(_BYTE *)&v14 & 1) != 0 )
{
if ( a2->__r_.__value_.__l.__size_ < v13 )
LABEL_89:
sub_100056810();
v23 = a2->__r_.__value_.__l.__data_;
v15 = a2->__r_.__value_.__l.__size_;
}
else
{
v23 = data;
if ( v13 > v15 )
goto LABEL_89;
}
v24 = v15 - v13;
if ( v24 >= v20 )
v24 = v20;
if ( v24 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
LODWORD(v57) = v12;
if ( v24 >= 0x17 )
{
v55 = v23;
__src = (void *)v13;
v26 = (v24 | 7) + 1;
if ( (v24 | 7) == 0x17 )
v26 = 26;
v25 = (char *)operator new(v26);
__p = v25;
__dst = v26 | 1;
v62 = v24;
v13 = (unsigned __int64)__src;
v23 = v55;
LABEL_54:
v27 = v25;
memmove(v25, &v23[v13], v24);
v25 = v27;
goto LABEL_55;
}
LOBYTE(__dst) = 2 * v24;
v25 = (char *)&__dst + 1;
if ( v24 )
goto LABEL_54;
LABEL_55:
v25[v24] = 0;
v28 = __dst;
v29 = __p;
v30 = (const char *)__p;
if ( (__dst & 1) == 0 )
v30 = (char *)&__dst + 1;
v31 = atoll(v30);
v32 = v31;
if ( (v28 & 1) != 0 )
{
v33 = v29;
v34 = v31;
operator delete(v33);
v32 = v34;
}
v35 = (unsigned int)v57;
LOBYTE(v35) = ((unsigned __int64)(v32 - 0x80000000LL) < 0xFFFFFFFF80000001LL) | v57;
v4 = v60;
if ( (_BYTE)v35 )
goto LABEL_60;
v38 = "Level %lli";
if ( v64 )
v38 = "List %lli";
v57 = v32;
v39 = sub_10088E820(v38, v32, v35);
__src = (void *)cocos2d::CCString::getCString((__int64)v39);
v40 = strlen((const char *)__src);
if ( v40 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v41 = v40;
if ( v40 >= 0x17 )
{
v46 = (v40 | 7) + 1;
if ( (v40 | 7) == 0x17 )
v46 = 26;
v47 = (char *)operator new(v46);
v43 = __src;
v42 = v47;
__p = v47;
__dst = v46 | 1;
v62 = v41;
v4 = v60;
}
else
{
LOBYTE(__dst) = 2 * v40;
v42 = (char *)&__dst + 1;
v4 = v60;
v43 = __src;
if ( !v40 )
{
BYTE1(__dst) = 0;
v44 = (unsigned int)v60->__r_.__value_.__l.0;
if ( (v44 & 1) != 0 )
goto LABEL_71;
goto LABEL_76;
}
}
memmove(v42, v43, v41);
v42[v41] = 0;
v44 = (unsigned int)v4->__r_.__value_.__l.0;
if ( (v44 & 1) != 0 )
{
LABEL_71:
v45 = v4->__r_.__value_.__l.__size_;
goto LABEL_77;
}
LABEL_76:
v45 = v44 >> 1;
LABEL_77:
if ( (__dst & 1) != 0 )
v48 = v62;
else
v48 = (unsigned __int8)__dst >> 1;
v52[0] = v45;
v52[1] = v48;
v53 = v57;
v54 = v64 != 0;
((void (__fastcall *)(_QWORD *, _QWORD *))sub_10093A580)(v56, v52);
if ( (__dst & 1) != 0 )
{
v49 = (const std::string::value_type *)__p;
v50 = v62;
}
else
{
v50 = (unsigned __int8)__dst >> 1;
v49 = (char *)&__dst + 1;
}
std::string::append(v4, v49, v50);
if ( (__dst & 1) != 0 )
operator delete(__p);
v9 = v19;
v37 = (unsigned int)a2->__r_.__value_.__l.0;
v8 = (v37 & 1) == 0;
if ( (v37 & 1) == 0 )
goto LABEL_63;
LABEL_9:
;
}
while ( v9 < a2->__r_.__value_.__l.__size_ );
}
return v4;
}