//
// cocos2d::CCBMFontConfiguration::parseCharacterDefinition from 0x1005d6bd0 to 0x1005d7a93 (3779 bytes)
//
// 1 xrefs:
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x1005d5704
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCBMFontConfiguration::parseCharacterDefinition(
double a1,
__int64 a2,
std::string *a3,
__int64 a4)
{
unsigned int v4; // edx
unsigned __int8 *data; // rbx
__int64 size; // rdx
unsigned __int8 *v7; // r14
unsigned __int8 *v8; // rax
_WORD *v9; // rax
int v10; // ecx
int v11; // ecx
bool v12; // zf
int v13; // eax
std::string::size_type v14; // r12
int v15; // eax
unsigned int v16; // r15d
std::string::size_type v17; // r15
std::string::pointer v18; // rbx
size_t v19; // rax
size_t v20; // r15
char *v21; // r13
size_t v22; // r14
const char *v23; // rdi
unsigned int v24; // edx
std::string::pointer v25; // rbx
__int64 v26; // rdx
char *v27; // r14
std::string::pointer v28; // rax
char *v29; // rax
int v30; // ecx
int v31; // ecx
int v32; // eax
std::string::size_type v33; // r13
int v34; // eax
unsigned int v35; // r15d
std::string::size_type v36; // r15
std::string::pointer v37; // rbx
size_t v38; // rax
size_t v39; // r15
char *v40; // r12
double v41; // xmm0_8
const char *v42; // rdi
unsigned int v43; // edx
std::string::pointer v44; // rbx
__int64 v45; // rdx
char *v46; // r14
size_t v47; // r14
std::string::pointer v48; // rax
char *v49; // rax
int v50; // ecx
int v51; // ecx
int v52; // eax
std::string::size_type v53; // r13
int v54; // eax
unsigned int v55; // r15d
std::string::size_type v56; // r15
std::string::pointer v57; // rbx
size_t v58; // rax
size_t v59; // r15
char *v60; // r12
double v61; // xmm0_8
const char *v62; // rdi
unsigned int v63; // edx
std::string::pointer v64; // rbx
__int64 v65; // rdx
char *v66; // r14
size_t v67; // r14
std::string::pointer v68; // rax
char *v69; // rax
int v70; // ecx
int v71; // ecx
int v72; // eax
std::string::size_type v73; // r13
int v74; // eax
unsigned int v75; // r15d
std::string::size_type v76; // r15
std::string::pointer v77; // rbx
size_t v78; // rax
size_t v79; // r15
char *v80; // r12
double v81; // xmm0_8
const char *v82; // rdi
const std::string *v83; // r12
unsigned int v84; // edx
std::string::pointer v85; // rbx
__int64 v86; // rdx
char *v87; // r14
std::string::pointer v88; // rax
_DWORD *v89; // rax
int v90; // ecx
size_t v91; // r14
int v92; // ecx
int v93; // eax
std::string::size_type v94; // r13
int v95; // eax
unsigned int v96; // r15d
std::string::size_type v97; // r15
std::string::pointer v98; // rbx
size_t v99; // rax
size_t v100; // r15
char *v101; // r12
double v102; // xmm0_8
const char *v103; // rdi
unsigned int v104; // edx
std::string::pointer v105; // rbx
__int64 v106; // rdx
char *v107; // r14
size_t v108; // r14
std::string::pointer v109; // rax
char *v110; // rax
int v111; // ecx
int v112; // ecx
int v113; // eax
std::string::size_type v114; // r13
int v115; // eax
unsigned int v116; // r15d
std::string::size_type v117; // r15
std::string::pointer v118; // rbx
size_t v119; // rax
size_t v120; // r15
char *v121; // r12
double v122; // xmm0_8
const char *v123; // rdi
unsigned int v124; // edx
std::string::pointer v125; // rbx
__int64 v126; // rdx
char *v127; // r14
size_t v128; // r14
std::string::pointer v129; // rax
char *v130; // rax
int v131; // ecx
int v132; // ecx
int v133; // eax
std::string::size_type v134; // r13
int v135; // eax
unsigned int v136; // r15d
std::string::size_type v137; // r15
std::string::pointer v138; // rbx
size_t v139; // rax
size_t v140; // r15
char *v141; // r12
double v142; // xmm0_8
const char *v143; // rdi
unsigned int v144; // edx
std::string::pointer v145; // rbx
__int64 v146; // rdx
char *v147; // r14
size_t v148; // r14
std::string::pointer v149; // rax
char *v150; // rax
int v151; // ecx
int v152; // ecx
int v153; // eax
std::string::size_type v154; // r15
int v155; // eax
unsigned int v156; // r13d
std::string::size_type v157; // r13
std::string::pointer v158; // r12
size_t v159; // rax
size_t v160; // r13
char *v161; // rbx
size_t v162; // r14
void *v163; // rbx
std::string *v165; // [rsp+10h] [rbp-70h]
__int128 v166; // [rsp+18h] [rbp-68h] BYREF
void *v167; // [rsp+28h] [rbp-58h]
__int128 __dst; // [rsp+30h] [rbp-50h] BYREF
void *__p; // [rsp+40h] [rbp-40h]
char v170; // [rsp+57h] [rbp-29h]
v4 = (unsigned int)a3->__r_.__value_.__l.0;
if ( (v4 & 1) != 0 )
{
size = a3->__r_.__value_.__l.__size_;
data = (unsigned __int8 *)a3->__r_.__value_.__l.__data_;
v7 = &data[size];
v165 = a3;
if ( size < 3 )
goto LABEL_9;
}
else
{
data = (unsigned __int8 *)a3->__r_.__value_.__s.__data_;
size = v4 >> 1;
v7 = (unsigned __int8 *)&a3->__r_.__value_.__l.0 + size + 1;
v165 = a3;
if ( size < 3 )
goto LABEL_9;
}
v8 = data;
do
{
v9 = memchr(v8, 105, size - 2);
if ( !v9 )
break;
if ( !(*v9 ^ 0x6469 | *((unsigned __int8 *)v9 + 2) ^ 0x3D) )
{
v10 = (int)v9;
goto LABEL_10;
}
v8 = (unsigned __int8 *)v9 + 1;
size = v7 - v8;
}
while ( v7 - v8 > 2 );
LABEL_9:
v10 = (int)v7;
v9 = v7;
LABEL_10:
v11 = v10 - (_DWORD)data;
v12 = v9 == (_WORD *)v7;
v13 = -1;
if ( !v12 )
v13 = v11;
v14 = v13;
v15 = std::string::find(v165, 32, v13);
v16 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v16 & 1) == 0 )
{
v17 = v16 >> 1;
if ( v14 <= v17 )
{
v18 = v165->__r_.__value_.__s.__data_;
goto LABEL_17;
}
LABEL_249:
sub_1000547C0();
}
v17 = v165->__r_.__value_.__l.__size_;
if ( v17 < v14 )
goto LABEL_249;
v18 = v165->__r_.__value_.__l.__data_;
LABEL_17:
v19 = v15 - (int)v14;
v20 = v17 - v14;
if ( v20 >= v19 )
v20 = v19;
if ( v20 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a1);
v21 = (char *)&__dst + 1;
if ( v20 >= 0x17 )
{
v22 = 26;
if ( (v20 | 7) != 0x17 )
v22 = (v20 | 7) + 1;
v21 = (char *)operator new(v22);
__p = v21;
*(_QWORD *)&__dst = v22 + 1;
*((_QWORD *)&__dst + 1) = v20;
goto LABEL_26;
}
LOBYTE(__dst) = 2 * v20;
if ( v20 )
LABEL_26:
memmove(v21, &v18[v14], v20);
v21[v20] = 0;
v23 = (const char *)__p;
if ( (__dst & 1) == 0 )
v23 = (char *)&__dst + 1;
sscanf(v23, "id=%u", a4);
v24 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = __dst & 1;
if ( (v24 & 1) != 0 )
{
v26 = v165->__r_.__value_.__l.__size_;
v25 = v165->__r_.__value_.__l.__data_;
v27 = &v25[v26];
if ( v26 < 2 )
goto LABEL_37;
}
else
{
v25 = v165->__r_.__value_.__s.__data_;
v26 = v24 >> 1;
v27 = (char *)&v165->__r_.__value_.__l.0 + v26 + 1;
if ( v26 < 2 )
goto LABEL_37;
}
v28 = v25;
do
{
v29 = (char *)memchr(v28, 120, v26 - 1);
if ( !v29 )
break;
if ( *(_WORD *)v29 == 15736 )
{
v30 = (int)v29;
goto LABEL_38;
}
v28 = v29 + 1;
v26 = v27 - v28;
}
while ( v27 - v28 > 1 );
LABEL_37:
v30 = (int)v27;
v29 = v27;
LABEL_38:
v31 = v30 - (_DWORD)v25;
v12 = v29 == v27;
v32 = -1;
if ( !v12 )
v32 = v31;
v33 = v32;
v34 = std::string::find(v165, 32, v32);
v35 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v35 & 1) == 0 )
{
v36 = v35 >> 1;
if ( v33 <= v36 )
{
v37 = v165->__r_.__value_.__s.__data_;
goto LABEL_45;
}
LABEL_251:
sub_1000547C0();
}
v36 = v165->__r_.__value_.__l.__size_;
if ( v36 < v33 )
goto LABEL_251;
v37 = v165->__r_.__value_.__l.__data_;
LABEL_45:
v38 = v34 - (int)v33;
v39 = v36 - v33;
if ( v39 >= v38 )
v39 = v38;
if ( v39 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a1);
if ( v39 >= 0x17 )
{
v47 = 26;
if ( (v39 | 7) != 0x17 )
v47 = (v39 | 7) + 1;
v40 = (char *)operator new(v47);
v167 = v40;
*(_QWORD *)&v166 = v47 | 1;
*((_QWORD *)&v166 + 1) = v39;
}
else
{
LOBYTE(v166) = 2 * v39;
v40 = (char *)&v166 + 1;
if ( !v39 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_52;
goto LABEL_51;
}
}
memmove(v40, &v37[v33], v39);
v40[v39] = 0;
if ( (__dst & 1) != 0 )
LABEL_51:
operator delete(__p);
LABEL_52:
__p = v167;
v41 = *(double *)&v166;
__dst = v166;
v42 = (const char *)v167;
if ( (v166 & 1) == 0 )
v42 = (char *)&__dst + 1;
sscanf(v42, "x=%f", a4 + 4);
v43 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = v166 & 1;
if ( (v43 & 1) != 0 )
{
v45 = v165->__r_.__value_.__l.__size_;
v44 = v165->__r_.__value_.__l.__data_;
v46 = &v44[v45];
if ( v45 < 2 )
goto LABEL_67;
}
else
{
v44 = v165->__r_.__value_.__s.__data_;
v45 = v43 >> 1;
v46 = (char *)&v165->__r_.__value_.__l.0 + v45 + 1;
if ( v45 < 2 )
goto LABEL_67;
}
v48 = v44;
do
{
v49 = (char *)memchr(v48, 121, v45 - 1);
if ( !v49 )
break;
if ( *(_WORD *)v49 == 15737 )
{
v50 = (int)v49;
goto LABEL_68;
}
v48 = v49 + 1;
v45 = v46 - v48;
}
while ( v46 - v48 > 1 );
LABEL_67:
v50 = (int)v46;
v49 = v46;
LABEL_68:
v51 = v50 - (_DWORD)v44;
v12 = v49 == v46;
v52 = -1;
if ( !v12 )
v52 = v51;
v53 = v52;
v54 = std::string::find(v165, 32, v52);
v55 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v55 & 1) == 0 )
{
v56 = v55 >> 1;
if ( v53 <= v56 )
{
v57 = v165->__r_.__value_.__s.__data_;
goto LABEL_75;
}
LABEL_253:
sub_1000547C0();
}
v56 = v165->__r_.__value_.__l.__size_;
if ( v56 < v53 )
goto LABEL_253;
v57 = v165->__r_.__value_.__l.__data_;
LABEL_75:
v58 = v54 - (int)v53;
v59 = v56 - v53;
if ( v59 >= v58 )
v59 = v58;
if ( v59 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v41);
if ( v59 >= 0x17 )
{
v67 = 26;
if ( (v59 | 7) != 0x17 )
v67 = (v59 | 7) + 1;
v60 = (char *)operator new(v67);
v167 = v60;
*(_QWORD *)&v166 = v67 | 1;
*((_QWORD *)&v166 + 1) = v59;
}
else
{
LOBYTE(v166) = 2 * v59;
v60 = (char *)&v166 + 1;
if ( !v59 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_82;
goto LABEL_81;
}
}
memmove(v60, &v57[v53], v59);
v60[v59] = 0;
if ( (__dst & 1) != 0 )
LABEL_81:
operator delete(__p);
LABEL_82:
__p = v167;
v61 = *(double *)&v166;
__dst = v166;
v62 = (const char *)v167;
if ( (v166 & 1) == 0 )
v62 = (char *)&__dst + 1;
sscanf(v62, "y=%f", a4 + 8);
v63 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = v166 & 1;
if ( (v63 & 1) != 0 )
{
v65 = v165->__r_.__value_.__l.__size_;
v64 = v165->__r_.__value_.__l.__data_;
v66 = &v64[v65];
if ( v65 < 6 )
goto LABEL_97;
}
else
{
v64 = v165->__r_.__value_.__s.__data_;
v65 = v63 >> 1;
v66 = (char *)&v165->__r_.__value_.__l.0 + v65 + 1;
if ( v65 < 6 )
goto LABEL_97;
}
v68 = v64;
do
{
v69 = (char *)memchr(v68, 119, v65 - 5);
if ( !v69 )
break;
if ( !(*(_DWORD *)v69 ^ 0x74646977 | *((unsigned __int16 *)v69 + 2) ^ 0x3D68) )
{
v70 = (int)v69;
goto LABEL_98;
}
v68 = v69 + 1;
v65 = v66 - v68;
}
while ( v66 - v68 > 5 );
LABEL_97:
v70 = (int)v66;
v69 = v66;
LABEL_98:
v71 = v70 - (_DWORD)v64;
v12 = v69 == v66;
v72 = -1;
if ( !v12 )
v72 = v71;
v73 = v72;
v74 = std::string::find(v165, 32, v72);
v75 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v75 & 1) == 0 )
{
v76 = v75 >> 1;
if ( v73 <= v76 )
{
v77 = v165->__r_.__value_.__s.__data_;
goto LABEL_105;
}
LABEL_255:
sub_1000547C0();
}
v76 = v165->__r_.__value_.__l.__size_;
if ( v76 < v73 )
goto LABEL_255;
v77 = v165->__r_.__value_.__l.__data_;
LABEL_105:
v78 = v74 - (int)v73;
v79 = v76 - v73;
if ( v79 >= v78 )
v79 = v78;
if ( v79 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v61);
if ( v79 >= 0x17 )
{
v91 = 26;
if ( (v79 | 7) != 0x17 )
v91 = (v79 | 7) + 1;
v80 = (char *)operator new(v91);
v167 = v80;
*(_QWORD *)&v166 = v91 | 1;
*((_QWORD *)&v166 + 1) = v79;
}
else
{
LOBYTE(v166) = 2 * v79;
v80 = (char *)&v166 + 1;
if ( !v79 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_112;
goto LABEL_111;
}
}
memmove(v80, &v77[v73], v79);
v80[v79] = 0;
if ( (__dst & 1) != 0 )
LABEL_111:
operator delete(__p);
LABEL_112:
__p = v167;
v81 = *(double *)&v166;
__dst = v166;
v82 = (const char *)v167;
if ( (v166 & 1) == 0 )
v82 = (char *)&__dst + 1;
sscanf(v82, "width=%f", a4 + 12);
v83 = v165;
v84 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = v166 & 1;
if ( (v84 & 1) == 0 )
{
v85 = v165->__r_.__value_.__s.__data_;
v86 = v84 >> 1;
v87 = (char *)&v165->__r_.__value_.__l.0 + v86 + 1;
if ( v86 >= 7 )
goto LABEL_116;
LABEL_127:
v90 = (int)v87;
v89 = v87;
goto LABEL_134;
}
v86 = v165->__r_.__value_.__l.__size_;
v85 = v165->__r_.__value_.__l.__data_;
v87 = &v85[v86];
if ( v86 < 7 )
goto LABEL_127;
LABEL_116:
v88 = v85;
while ( 1 )
{
v89 = memchr(v88, 104, v86 - 6);
if ( !v89 )
{
LABEL_120:
v90 = (int)v87;
v89 = v87;
goto LABEL_133;
}
if ( !(*v89 ^ 0x67696568 | *(_DWORD *)((char *)v89 + 3) ^ 0x3D746867) )
break;
v88 = (char *)v89 + 1;
v86 = v87 - v88;
if ( v87 - v88 <= 6 )
goto LABEL_120;
}
v90 = (int)v89;
LABEL_133:
v83 = v165;
LABEL_134:
v92 = v90 - (_DWORD)v85;
v12 = v89 == (_DWORD *)v87;
v93 = -1;
if ( !v12 )
v93 = v92;
v94 = v93;
v95 = std::string::find(v83, 32, v93);
v96 = (unsigned int)v83->__r_.__value_.__l.0;
if ( (v96 & 1) == 0 )
{
v97 = v96 >> 1;
if ( v94 <= v97 )
{
v98 = v83->__r_.__value_.__s.__data_;
goto LABEL_141;
}
LABEL_257:
sub_1000547C0();
}
v97 = v83->__r_.__value_.__l.__size_;
if ( v97 < v94 )
goto LABEL_257;
v98 = v83->__r_.__value_.__l.__data_;
LABEL_141:
v99 = v95 - (int)v94;
v100 = v97 - v94;
if ( v100 >= v99 )
v100 = v99;
if ( v100 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v81);
if ( v100 >= 0x17 )
{
v108 = 26;
if ( (v100 | 7) != 0x17 )
v108 = (v100 | 7) + 1;
v101 = (char *)operator new(v108);
v167 = v101;
*(_QWORD *)&v166 = v108 | 1;
*((_QWORD *)&v166 + 1) = v100;
}
else
{
LOBYTE(v166) = 2 * v100;
v101 = (char *)&v166 + 1;
if ( !v100 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_148;
goto LABEL_147;
}
}
memmove(v101, &v98[v94], v100);
v101[v100] = 0;
if ( (__dst & 1) != 0 )
LABEL_147:
operator delete(__p);
LABEL_148:
__p = v167;
v102 = *(double *)&v166;
__dst = v166;
v103 = (const char *)v167;
if ( (v166 & 1) == 0 )
v103 = (char *)&__dst + 1;
sscanf(v103, "height=%f", a4 + 16);
v104 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = v166 & 1;
if ( (v104 & 1) != 0 )
{
v106 = v165->__r_.__value_.__l.__size_;
v105 = v165->__r_.__value_.__l.__data_;
v107 = &v105[v106];
if ( v106 < 8 )
goto LABEL_163;
}
else
{
v105 = v165->__r_.__value_.__s.__data_;
v106 = v104 >> 1;
v107 = (char *)&v165->__r_.__value_.__l.0 + v106 + 1;
if ( v106 < 8 )
goto LABEL_163;
}
v109 = v105;
do
{
v110 = (char *)memchr(v109, 120, v106 - 7);
if ( !v110 )
break;
if ( *(_QWORD *)v110 == 0x3D74657366666F78LL )
{
v111 = (int)v110;
goto LABEL_164;
}
v109 = v110 + 1;
v106 = v107 - v109;
}
while ( v107 - v109 > 7 );
LABEL_163:
v111 = (int)v107;
v110 = v107;
LABEL_164:
v112 = v111 - (_DWORD)v105;
v12 = v110 == v107;
v113 = -1;
if ( !v12 )
v113 = v112;
v114 = v113;
v115 = std::string::find(v165, 32, v113);
v116 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v116 & 1) == 0 )
{
v117 = v116 >> 1;
if ( v114 <= v117 )
{
v118 = v165->__r_.__value_.__s.__data_;
goto LABEL_171;
}
LABEL_259:
sub_1000547C0();
}
v117 = v165->__r_.__value_.__l.__size_;
if ( v117 < v114 )
goto LABEL_259;
v118 = v165->__r_.__value_.__l.__data_;
LABEL_171:
v119 = v115 - (int)v114;
v120 = v117 - v114;
if ( v120 >= v119 )
v120 = v119;
if ( v120 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v102);
if ( v120 >= 0x17 )
{
v128 = 26;
if ( (v120 | 7) != 0x17 )
v128 = (v120 | 7) + 1;
v121 = (char *)operator new(v128);
v167 = v121;
*(_QWORD *)&v166 = v128 | 1;
*((_QWORD *)&v166 + 1) = v120;
}
else
{
LOBYTE(v166) = 2 * v120;
v121 = (char *)&v166 + 1;
if ( !v120 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_178;
goto LABEL_177;
}
}
memmove(v121, &v118[v114], v120);
v121[v120] = 0;
if ( (__dst & 1) != 0 )
LABEL_177:
operator delete(__p);
LABEL_178:
__p = v167;
v122 = *(double *)&v166;
__dst = v166;
v123 = (const char *)v167;
if ( (v166 & 1) == 0 )
v123 = (char *)&__dst + 1;
sscanf(v123, "xoffset=%hd", a4 + 20);
v124 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = v166 & 1;
if ( (v124 & 1) != 0 )
{
v126 = v165->__r_.__value_.__l.__size_;
v125 = v165->__r_.__value_.__l.__data_;
v127 = &v125[v126];
if ( v126 < 8 )
goto LABEL_193;
}
else
{
v125 = v165->__r_.__value_.__s.__data_;
v126 = v124 >> 1;
v127 = (char *)&v165->__r_.__value_.__l.0 + v126 + 1;
if ( v126 < 8 )
goto LABEL_193;
}
v129 = v125;
do
{
v130 = (char *)memchr(v129, 121, v126 - 7);
if ( !v130 )
break;
if ( *(_QWORD *)v130 == 0x3D74657366666F79LL )
{
v131 = (int)v130;
goto LABEL_194;
}
v129 = v130 + 1;
v126 = v127 - v129;
}
while ( v127 - v129 > 7 );
LABEL_193:
v131 = (int)v127;
v130 = v127;
LABEL_194:
v132 = v131 - (_DWORD)v125;
v12 = v130 == v127;
v133 = -1;
if ( !v12 )
v133 = v132;
v134 = v133;
v135 = std::string::find(v165, 32, v133);
v136 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v136 & 1) == 0 )
{
v137 = v136 >> 1;
if ( v134 <= v137 )
{
v138 = v165->__r_.__value_.__s.__data_;
goto LABEL_201;
}
LABEL_261:
sub_1000547C0();
}
v137 = v165->__r_.__value_.__l.__size_;
if ( v137 < v134 )
goto LABEL_261;
v138 = v165->__r_.__value_.__l.__data_;
LABEL_201:
v139 = v135 - (int)v134;
v140 = v137 - v134;
if ( v140 >= v139 )
v140 = v139;
if ( v140 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v122);
if ( v140 >= 0x17 )
{
v148 = 26;
if ( (v140 | 7) != 0x17 )
v148 = (v140 | 7) + 1;
v141 = (char *)operator new(v148);
v167 = v141;
*(_QWORD *)&v166 = v148 | 1;
*((_QWORD *)&v166 + 1) = v140;
}
else
{
LOBYTE(v166) = 2 * v140;
v141 = (char *)&v166 + 1;
if ( !v140 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_208;
goto LABEL_207;
}
}
memmove(v141, &v138[v134], v140);
v141[v140] = 0;
if ( (__dst & 1) != 0 )
LABEL_207:
operator delete(__p);
LABEL_208:
__p = v167;
v142 = *(double *)&v166;
__dst = v166;
v143 = (const char *)v167;
if ( (v166 & 1) == 0 )
v143 = (char *)&__dst + 1;
sscanf(v143, "yoffset=%hd", a4 + 22);
v144 = (unsigned int)v165->__r_.__value_.__l.0;
v170 = v166 & 1;
if ( (v144 & 1) != 0 )
{
v146 = v165->__r_.__value_.__l.__size_;
v145 = v165->__r_.__value_.__l.__data_;
v147 = &v145[v146];
if ( v146 < 9 )
goto LABEL_223;
}
else
{
v145 = v165->__r_.__value_.__s.__data_;
v146 = v144 >> 1;
v147 = (char *)&v165->__r_.__value_.__l.0 + v146 + 1;
if ( v146 < 9 )
goto LABEL_223;
}
v149 = v145;
do
{
v150 = (char *)memchr(v149, 120, v146 - 8);
if ( !v150 )
break;
if ( !(*(_QWORD *)v150 ^ 0x65636E6176646178LL | (unsigned __int8)v150[8] ^ 0x3DLL) )
{
v151 = (int)v150;
goto LABEL_224;
}
v149 = v150 + 1;
v146 = v147 - v149;
}
while ( v147 - v149 > 8 );
LABEL_223:
v151 = (int)v147;
v150 = v147;
LABEL_224:
v152 = v151 - (_DWORD)v145;
v12 = v150 == v147;
v153 = -1;
if ( !v12 )
v153 = v152;
v154 = v153;
v155 = std::string::find(v165, 32, v153);
v156 = (unsigned int)v165->__r_.__value_.__l.0;
if ( (v156 & 1) == 0 )
{
v157 = v156 >> 1;
if ( v154 <= v157 )
{
v158 = v165->__r_.__value_.__s.__data_;
goto LABEL_231;
}
LABEL_263:
sub_1000547C0();
}
v157 = v165->__r_.__value_.__l.__size_;
if ( v157 < v154 )
goto LABEL_263;
v158 = v165->__r_.__value_.__l.__data_;
LABEL_231:
v159 = v155 - (int)v154;
v160 = v157 - v154;
if ( v160 >= v159 )
v160 = v159;
if ( v160 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v142);
if ( v160 >= 0x17 )
{
v162 = 26;
if ( (v160 | 7) != 0x17 )
v162 = (v160 | 7) + 1;
v161 = (char *)operator new(v162);
v167 = v161;
*(_QWORD *)&v166 = v162 | 1;
*((_QWORD *)&v166 + 1) = v160;
}
else
{
LOBYTE(v166) = 2 * v160;
v161 = (char *)&v166 + 1;
if ( !v160 )
{
BYTE1(v166) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_238;
goto LABEL_237;
}
}
memmove(v161, &v158[v154], v160);
v161[v160] = 0;
if ( (__dst & 1) != 0 )
LABEL_237:
operator delete(__p);
LABEL_238:
__p = v167;
__dst = v166;
if ( (v166 & 1) != 0 )
{
v163 = __p;
sscanf((const char *)__p, "xadvance=%hd", a4 + 24);
operator delete(v163);
}
else
{
sscanf((const char *)&__dst + 1, "xadvance=%hd", a4 + 24);
}
}