//
// sub_DC5D74 from 0xdc5d74 to 0xdc8048 (8916 bytes)
//
// 5 xrefs:
// > sub_DC5D74 @ 0xdc5ed8
// > sub_DC5D74 @ 0xdc6710
// > sub_DC5D74 @ 0xdc69e4
// > pugi::xml_node::print @ 0xdca210
// > pugi::xml_document::save @ 0xdce320
//
// 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 13:08:53 +0000
//
__int64 __fastcall sub_DC5D74(__int64 a1, pugi::xml_node *a2, char *a3, unsigned int a4, unsigned int a5)
{
char *v10; // x20
unsigned __int64 v11; // x2
__int64 v12; // x0
int v13; // w3
int v14; // w4
int v15; // w5
int v16; // w6
int v17; // w7
bool v18; // w0
unsigned __int64 v19; // x2
__int64 v20; // x0
unsigned int v21; // w22
unsigned __int64 v22; // x2
__int64 v23; // x0
__int64 v24; // x1
unsigned __int64 v25; // x2
__int64 v26; // x0
int v28; // w20
__int64 v29; // x19
void *v30; // x0
char *v31; // x25
size_t v32; // x27
unsigned __int64 v33; // x2
int v34; // w6
unsigned __int8 *v35; // x1
unsigned __int64 v36; // x23
unsigned __int64 v37; // x0
unsigned __int8 *v38; // x2
int v39; // w3
bool v40; // zf
unsigned __int8 v41; // w3
unsigned __int8 v42; // w6
unsigned __int8 v43; // w6
unsigned __int8 v44; // w9
int v45; // w3
unsigned __int64 v46; // x2
_WORD *v47; // x0
int v48; // w3
__int16 v49; // w3
__int64 v50; // x2
unsigned __int64 v51; // x1
unsigned __int64 v52; // x3
__int64 v53; // x0
uint16x8_t *v54; // x7
unsigned __int64 v55; // x6
__int64 v56; // x6
unsigned __int64 v57; // x0
unsigned __int8 v58; // w7
unsigned __int8 v59; // w7
unsigned __int8 v60; // w8
unsigned __int8 v61; // w7
unsigned __int8 v62; // w8
unsigned __int8 v63; // w9
int v64; // w3
__int64 v65; // x2
__int64 v66; // x0
unsigned __int64 v67; // x2
__int64 v68; // x0
_BYTE *v69; // x1
__int64 v70; // x3
__int64 v71; // x2
__int64 v72; // x4
__int64 v73; // x5
unsigned __int64 v74; // x2
unsigned __int64 v75; // x0
__int64 v76; // x2
char *v77; // x0
unsigned __int8 *v78; // x19
unsigned __int64 v79; // x2
__int64 v80; // x0
char *v81; // x0
unsigned __int64 v82; // x2
__int64 v83; // x1
__int64 v84; // x5
__int64 v85; // x4
__int64 v86; // x3
char *v87; // x0
unsigned __int64 v88; // x2
__int64 v89; // x1
unsigned __int64 v90; // x0
__int64 v91; // x2
unsigned __int64 v92; // x2
__int64 v93; // x0
__int64 v94; // x3
char *v95; // x1
int v96; // w3
int v97; // w4
int v98; // w5
int v99; // w6
int v100; // w7
unsigned __int64 v101; // x2
int v102; // w3
size_t v103; // x21
unsigned __int64 v104; // x2
int v105; // w26
__int64 v106; // x20
unsigned __int8 *v107; // x25
unsigned __int64 v108; // x22
unsigned __int64 v109; // x2
__int64 v110; // x0
__int64 v111; // x4
__int64 v112; // x3
__int64 v113; // x1
__int64 v114; // x0
__int64 v115; // x3
__int64 v116; // x1
void *v117; // x0
unsigned __int64 v118; // x2
__int64 v119; // x0
char *v120; // x0
char *v121; // x0
char *v122; // x0
int v123; // w20
unsigned __int8 *v124; // x1
__int64 v125; // x19
__int64 v126; // x0
unsigned __int64 v127; // x2
_WORD *v128; // x0
int v129; // w3
unsigned __int8 *v130; // x1
__int16 v131; // w3
__int64 v132; // x0
unsigned __int64 v133; // x2
unsigned __int64 v134; // x3
__int64 v135; // x1
uint16x8_t *v136; // x5
unsigned __int64 v137; // x4
unsigned __int8 v138; // w1
unsigned __int8 v139; // w4
unsigned __int8 v140; // w1
unsigned __int8 v141; // w4
unsigned __int8 v142; // w5
int v143; // w1
int v144; // w19
unsigned __int64 v145; // x0
unsigned __int8 *v146; // x2
int v147; // w1
int v148; // w1
unsigned __int8 v149; // w1
unsigned __int8 v150; // w6
int v151; // w1
char *v152; // x0
char *v153; // x21
__int64 v154; // x2
__int64 v155; // x0
size_t v156; // x22
unsigned __int64 v157; // x2
int v158; // w25
unsigned __int8 *v159; // x0
__int64 v160; // x19
char *v161; // x1
char v162; // w2
unsigned __int64 v163; // x24
__int64 v164; // x4
unsigned __int64 v165; // x1
int v166; // w1
void *v167; // x0
unsigned __int8 *v168; // x0
int v169; // w4
unsigned __int8 *v170; // x3
unsigned __int8 v171; // w1
unsigned __int8 v172; // w6
int v173; // w4
int v174; // w4
_WORD *v175; // x0
int v176; // w3
unsigned __int8 *v177; // x4
__int16 v178; // w1
unsigned __int8 v179; // w5
unsigned __int8 v180; // w5
unsigned __int8 v181; // w5
unsigned __int8 v182; // w6
int v183; // w3
__int64 v184; // x1
unsigned __int64 v185; // x5
unsigned __int64 v186; // x3
__int64 v187; // x1
uint16x8_t *v188; // x4
unsigned __int64 v189; // x2
__int64 v190; // x3
unsigned __int64 v191; // x1
unsigned __int64 v192; // x5
unsigned __int8 *v193; // x2
int v194; // w3
unsigned __int8 *v195; // x1
unsigned __int8 v196; // w0
int v197; // w3
unsigned __int8 v198; // w6
int v199; // w3
__int64 v200; // x2
__int64 v201; // x0
unsigned __int64 v202; // x4
_WORD *v203; // x2
int v204; // w1
unsigned __int8 *v205; // x3
__int16 v206; // w0
unsigned __int8 v207; // w5
unsigned __int8 v208; // w6
int v209; // w1
__int64 v210; // x2
unsigned __int64 v211; // x4
unsigned __int64 v212; // x1
__int64 v213; // x0
uint16x8_t *v214; // x5
unsigned __int64 v215; // x3
__int64 v216; // x3
unsigned __int64 v217; // x0
unsigned __int8 v218; // w5
unsigned __int8 v219; // w5
char v220; // [xsp+0h] [xbp+0h]
int v221; // [xsp+60h] [xbp+60h]
int v222; // [xsp+6Ch] [xbp+6Ch]
__int64 child; // [xsp+78h] [xbp+78h] BYREF
__int64 v224; // [xsp+80h] [xbp+80h] BYREF
__int64 v225; // [xsp+88h] [xbp+88h] BYREF
__int64 i; // [xsp+90h] [xbp+90h] BYREF
v222 = a4 & 5;
if ( v222 == 1 && a5 )
{
v28 = 0;
v29 = a1 + 2048;
while ( 1 )
{
v32 = strlen(a3);
v33 = *(_QWORD *)(a1 + 10248);
if ( v32 + v33 <= 0x800 )
{
v30 = (void *)(a1 + v33);
v31 = a3;
goto LABEL_23;
}
sub_DBEB98(a1, (unsigned __int8 *)a1, v33);
*(_QWORD *)(a1 + 10248) = 0;
if ( v32 <= 0x800 )
{
v30 = (void *)a1;
v31 = a3;
goto LABEL_23;
}
v34 = *(_DWORD *)(a1 + 10256);
if ( v34 == 1 )
{
(*(void (__fastcall **)(_QWORD, char *, size_t))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
a3,
v32);
goto LABEL_24;
}
v35 = (unsigned __int8 *)a3;
LABEL_34:
if ( (v35[2047] & 0xC0) == 0x80 )
{
if ( (v35[2046] & 0xC0) == 0x80 )
{
if ( (v35[2045] & 0xC0) == 0x80 )
{
v31 = (char *)(v35 + 2048);
v36 = 2048;
if ( (v35[2044] & 0xC0) != 0x80 )
{
v36 = 2044;
v31 = (char *)(v35 + 2044);
}
}
else
{
v36 = 2045;
v31 = (char *)(v35 + 2045);
}
}
else
{
v36 = 2046;
v31 = (char *)(v35 + 2046);
}
}
else
{
v36 = 2047;
v31 = (char *)(v35 + 2047);
}
if ( v34 != 1 )
break;
v32 -= v36;
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 10240) + 16LL))(*(_QWORD *)(a1 + 10240));
if ( v32 > 0x800 )
goto LABEL_33;
LABEL_41:
*(_QWORD *)(a1 + 10248) = 0;
v30 = (void *)a1;
LABEL_23:
memcpy(v30, v31, v32);
*(_QWORD *)(a1 + 10248) += v32;
LABEL_24:
if ( ++v28 == a5 )
goto LABEL_2;
}
if ( (unsigned int)(v34 - 2) > 1 )
{
if ( (unsigned int)(v34 - 5) <= 1 )
{
v221 = v34;
v65 = (__int64)sub_DBE2E0(v35, v36, (int *)(a1 + 2048)) - v29;
if ( v221 != 5 && v65 >> 2 )
{
v66 = 0;
do
{
*(_DWORD *)(v29 + 4 * v66) = bswap32(*(_DWORD *)(v29 + 4 * v66));
++v66;
}
while ( v65 >> 2 != v66 );
}
goto LABEL_32;
}
if ( v34 != 9 )
goto LABEL_32;
v37 = v36;
v38 = (unsigned __int8 *)(a1 + 2048);
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
LABEL_44:
while ( 1 )
{
v39 = *v35;
if ( (v39 & 0x80) != 0 )
break;
*v38++ = v39;
--v37;
if ( ((unsigned __int64)(v35 + 1) & 3) != 0 || v37 <= 3 )
{
++v35;
if ( !v37 )
goto LABEL_32;
}
else
{
v40 = (*(_DWORD *)++v35 & 0x80808080) == 0;
if ( v40 )
{
while ( 1 )
{
v41 = *v35;
v35 += 4;
*v38 = v41;
v38 += 4;
v37 -= 4LL;
*(v38 - 3) = *(v35 - 3);
*(v38 - 2) = *(v35 - 2);
*(v38 - 1) = *(v35 - 1);
if ( v37 <= 3 )
break;
if ( (*(_DWORD *)v35 & 0x80808080) != 0 )
goto LABEL_44;
}
if ( !v37 )
goto LABEL_32;
}
}
}
if ( (unsigned int)(v39 - 192) > 0x1F || v37 == 1 )
break;
v42 = v35[1];
if ( (v42 & 0xC0) != 0x80 )
goto LABEL_58;
v102 = ((v39 & 0x3F) << 6) | v42 & 0x3F;
v37 -= 2LL;
v35 += 2;
if ( v102 > 255 )
LOBYTE(v102) = 63;
*v38++ = v102;
if ( !v37 )
goto LABEL_32;
}
if ( (unsigned int)(v39 - 224) > 0xF || v37 <= 2 )
break;
v43 = v35[1];
if ( (v43 & 0xC0) != 0x80 )
goto LABEL_58;
v44 = v35[2];
if ( (v44 & 0xC0) != 0x80 )
goto LABEL_58;
v45 = ((v39 & 0x1F) << 12) | ((v43 & 0x3F) << 6) | v44 & 0x3F;
v37 -= 3LL;
v35 += 3;
if ( v45 > 255 )
LOBYTE(v45) = 63;
*v38++ = v45;
if ( !v37 )
goto LABEL_32;
}
if ( (unsigned int)(v39 - 240) > 7
|| v37 <= 3
|| (v35[1] & 0xC0) != 0x80
|| (v35[2] & 0xC0) != 0x80
|| (v35[3] & 0xC0) != 0x80 )
{
LABEL_58:
--v37;
++v35;
if ( !v37 )
goto LABEL_32;
goto LABEL_44;
}
*v38++ = 63;
v37 -= 4LL;
v35 += 4;
if ( !v37 )
goto LABEL_32;
}
}
v46 = v36;
v47 = (_WORD *)(a1 + 2048);
while ( 1 )
{
LABEL_76:
while ( 1 )
{
v48 = *v35;
if ( (v48 & 0x80) != 0 )
break;
*v47++ = v48;
--v46;
if ( ((unsigned __int64)(v35 + 1) & 3) != 0 || v46 <= 3 )
{
++v35;
if ( !v46 )
goto LABEL_84;
}
else
{
v40 = (*(_DWORD *)++v35 & 0x80808080) == 0;
if ( v40 )
{
while ( 1 )
{
v49 = *v35;
v35 += 4;
*v47 = v49;
v47 += 4;
v46 -= 4LL;
*(v47 - 3) = *(v35 - 3);
*(v47 - 2) = *(v35 - 2);
*(v47 - 1) = *(v35 - 1);
if ( v46 <= 3 )
break;
if ( (*(_DWORD *)v35 & 0x80808080) != 0 )
goto LABEL_76;
}
if ( !v46 )
{
LABEL_84:
v50 = (__int64)v47 - v29;
if ( v34 != 2 )
{
v51 = v50 >> 1;
if ( v50 >> 1 )
{
v52 = ((v51 - 8) >> 3) + 1;
v53 = 8 * v52;
if ( v51 - 1 <= 6 )
{
v53 = 0;
LABEL_90:
*(_WORD *)(v29 + 2 * v53) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * v53))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * v53) << 8);
if ( v51 > v53 + 1 )
{
*(_WORD *)(v29 + 2 * (v53 + 1)) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * (v53 + 1)))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * (v53 + 1)) << 8);
if ( v51 > v53 + 2 )
{
*(_WORD *)(v29 + 2 * (v53 + 2)) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * (v53 + 2)))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * (v53 + 2)) << 8);
if ( v51 > v53 + 3 )
{
*(_WORD *)(v29 + 2 * (v53 + 3)) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * (v53 + 3)))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * (v53 + 3)) << 8);
if ( v51 > v53 + 4 )
{
v56 = v53 + 5;
*(_WORD *)(v29 + 2 * (v53 + 4)) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * (v53 + 4)))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * (v53 + 4)) << 8);
if ( v51 > v53 + 5 )
{
v57 = v53 + 6;
*(_WORD *)(v29 + 2 * v56) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * v56))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * v56) << 8);
if ( v51 > v57 )
*(_WORD *)(v29 + 2 * v57) = (unsigned __int8)HIBYTE(*(_WORD *)(v29 + 2 * v57))
| (unsigned __int16)(*(_WORD *)(v29 + 2 * v57) << 8);
}
}
}
}
}
}
else
{
v54 = (uint16x8_t *)(a1 + 2048);
v55 = 0;
do
{
++v55;
*v54 = vorrq_s8(vshlq_n_s16(*v54, 8u), vshrq_n_u16(*v54, 8u));
++v54;
}
while ( v52 > v55 );
if ( v51 != v53 )
goto LABEL_90;
}
}
}
LABEL_32:
v32 -= v36;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
a1 + 2048);
if ( v32 <= 0x800 )
goto LABEL_41;
LABEL_33:
v34 = *(_DWORD *)(a1 + 10256);
v35 = (unsigned __int8 *)v31;
goto LABEL_34;
}
}
}
}
if ( (unsigned int)(v48 - 192) > 0x1F || v46 == 1 )
{
if ( (unsigned int)(v48 - 224) > 0xF || v46 <= 2 )
{
if ( (unsigned int)(v48 - 240) > 7 )
goto LABEL_102;
if ( v46 <= 3 )
goto LABEL_102;
v61 = v35[1];
if ( (v61 & 0xC0) != 0x80 )
goto LABEL_102;
v62 = v35[2];
if ( (v62 & 0xC0) != 0x80 )
goto LABEL_102;
v63 = v35[3];
if ( (v63 & 0xC0) != 0x80 )
goto LABEL_102;
v64 = ((v48 & 0xF) << 18) | v63 & 0x3F | ((v61 & 0x3F) << 12) | ((v62 & 0x3F) << 6);
v47 += 2;
*(v47 - 1) = (v64 & 0x3FF) - 9216;
*(v47 - 2) = ((unsigned int)(v64 - 0x10000) >> 10) - 10240;
v46 -= 4LL;
v35 += 4;
if ( !v46 )
goto LABEL_84;
}
else
{
v59 = v35[1];
if ( (v59 & 0xC0) != 0x80 )
goto LABEL_102;
v60 = v35[2];
if ( (v60 & 0xC0) != 0x80 )
goto LABEL_102;
v46 -= 3LL;
*v47++ = ((v48 & 0x1F) << 12) | ((v59 & 0x3F) << 6) | v60 & 0x3F;
v35 += 3;
if ( !v46 )
goto LABEL_84;
}
}
else
{
v58 = v35[1];
if ( (v58 & 0xC0) == 0x80 )
{
v46 -= 2LL;
*v47++ = ((v48 & 0x3F) << 6) | v58 & 0x3F;
v35 += 2;
if ( !v46 )
goto LABEL_84;
}
else
{
LABEL_102:
--v46;
++v35;
if ( !v46 )
goto LABEL_84;
}
}
}
}
LABEL_2:
switch ( (unsigned int)pugi::xml_node::type(a2) )
{
case 1u:
for ( i = pugi::xml_node::first_child(a2);
pugi::xml_node::operator void (*)(pugi::xml_node***)(&i);
i = pugi::xml_node::next_sibling((pugi::xml_node *)&i) )
{
sub_DC5D74(a1, &i, a3, a4, a5);
}
return _stack_chk_guard;
case 2u:
if ( *pugi::xml_node::name(a2) )
v10 = pugi::xml_node::name(a2);
else
v10 = ":anonymous";
v11 = *(_QWORD *)(a1 + 10248);
v12 = v11 + 1;
if ( v11 + 1 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v11);
v12 = 1;
v11 = 0;
}
*(_BYTE *)(a1 + v11) = 60;
*(_QWORD *)(a1 + 10248) = v12;
sub_DC23B0(a1, v10);
sub_DC582C(a1, a2, a4, v13, v14, v15, v16, v17, v220);
if ( (a4 & 4) == 0 )
{
i = pugi::xml_node::first_child(a2);
if ( pugi::xml_node::operator!(&i) )
{
v109 = *(_QWORD *)(a1 + 10248);
v110 = v109 + 4;
if ( v109 + 4 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v109);
v110 = 4;
v113 = 3;
v112 = 2;
v111 = 1;
v109 = 0;
}
else
{
v111 = v109 + 1;
v112 = v109 + 2;
v113 = v109 + 3;
}
*(_BYTE *)(a1 + v109) = 32;
*(_BYTE *)(a1 + v111) = 47;
*(_BYTE *)(a1 + v112) = 62;
*(_BYTE *)(a1 + v113) = 10;
*(_QWORD *)(a1 + 10248) = v110;
return _stack_chk_guard;
}
child = pugi::xml_node::first_child(a2);
v224 = pugi::xml_node::last_child(a2);
if ( !pugi::xml_node::operator==(&child, &v224)
|| (v225 = pugi::xml_node::first_child(a2), (unsigned int)pugi::xml_node::type((pugi::xml_node *)&v225) != 3)
&& (i = pugi::xml_node::first_child(a2), (unsigned int)pugi::xml_node::type((pugi::xml_node *)&i) != 4) )
{
sub_DC1DDC((uint16x8_t *)a1, 0x3Eu, 0xAu);
for ( i = pugi::xml_node::first_child(a2);
pugi::xml_node::operator void (*)(pugi::xml_node***)(&i);
i = pugi::xml_node::next_sibling((pugi::xml_node *)&i) )
{
sub_DC5D74(a1, &i, a3, a4, a5 + 1);
}
if ( v222 == 1 && a5 )
{
v144 = 0;
do
{
++v144;
sub_DC23B0(a1, a3);
}
while ( v144 != a5 );
}
goto LABEL_177;
}
sub_DC1828(a1, 62);
i = pugi::xml_node::first_child(a2);
if ( (unsigned int)pugi::xml_node::type((pugi::xml_node *)&i) != 3 )
{
i = pugi::xml_node::first_child(a2);
v122 = pugi::xml_node::value((pugi::xml_node *)&i);
sub_DC0060(a1, v122);
goto LABEL_177;
}
i = pugi::xml_node::first_child(a2);
v152 = pugi::xml_node::value((pugi::xml_node *)&i);
v153 = v152;
if ( (a4 & 0x10) == 0 )
{
sub_DC2A74(a1, v152, 1u);
goto LABEL_177;
}
v156 = strlen(v152);
v157 = *(_QWORD *)(a1 + 10248);
if ( v156 + v157 <= 0x800 )
{
v167 = (void *)(a1 + v157);
goto LABEL_337;
}
sub_DBEB98(a1, (unsigned __int8 *)a1, v157);
*(_QWORD *)(a1 + 10248) = 0;
if ( v156 <= 0x800 )
{
v167 = (void *)a1;
goto LABEL_337;
}
v158 = *(_DWORD *)(a1 + 10256);
if ( v158 == 1 )
{
(*(void (__fastcall **)(_QWORD, char *, size_t))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
v153,
v156);
goto LABEL_177;
}
v159 = (unsigned __int8 *)v153;
v160 = a1 + 2048;
LABEL_322:
v161 = v153 + 2047;
if ( (v153[2047] & 0xC0) == 0x80 )
{
v161 = v153 + 2046;
if ( (v153[2046] & 0xC0) == 0x80 )
{
v161 = v153 + 2045;
if ( (v153[2045] & 0xC0) == 0x80 )
{
v162 = v153[2044];
v163 = 2048;
v161 = v153 + 2044;
v153 += 2048;
if ( (v162 & 0xC0) == 0x80 )
{
LABEL_315:
if ( v158 == 1 )
{
(*(void (__fastcall **)(_QWORD, unsigned __int8 *, unsigned __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
v159,
v163);
goto LABEL_320;
}
if ( (unsigned int)(v158 - 2) > 1 )
{
if ( (unsigned int)(v158 - 5) <= 1 )
{
v200 = (__int64)sub_DBE2E0(v159, v163, (int *)(a1 + 2048)) - v160;
if ( v158 != 5 && v200 >> 2 )
{
v201 = 0;
do
{
*(_DWORD *)(v160 + 4 * v201) = bswap32(*(_DWORD *)(v160 + 4 * v201));
++v201;
}
while ( v200 >> 2 != v201 );
}
goto LABEL_319;
}
if ( v158 != 9 )
goto LABEL_319;
v192 = v163;
v193 = (unsigned __int8 *)(a1 + 2048);
while ( 2 )
{
v194 = *v159;
if ( (v194 & 0x80) == 0 )
{
v195 = v159 + 1;
*v193++ = v194;
--v192;
if ( ((unsigned __int64)(v159 + 1) & 3) == 0 && v192 > 3 )
{
if ( (*(_DWORD *)(v159 + 1) & 0x80808080) == 0 )
{
do
{
v196 = *v195;
v195 += 4;
*v193 = v196;
v193 += 4;
v192 -= 4LL;
*(v193 - 3) = *(v195 - 3);
*(v193 - 2) = *(v195 - 2);
*(v193 - 1) = *(v195 - 1);
if ( v192 <= 3 )
goto LABEL_441;
}
while ( (*(_DWORD *)v195 & 0x80808080) == 0 );
}
LABEL_434:
v159 = v195;
continue;
}
LABEL_441:
if ( !v192 )
goto LABEL_319;
goto LABEL_434;
}
break;
}
if ( (unsigned int)(v194 - 192) > 0x1F || v192 == 1 )
{
if ( (unsigned int)(v194 - 224) > 0xF || v192 <= 2 )
{
if ( (unsigned int)(v194 - 240) <= 7
&& v192 > 3
&& (v159[1] & 0xC0) == 0x80
&& (v159[2] & 0xC0) == 0x80
&& (v159[3] & 0xC0) == 0x80 )
{
*v193++ = 63;
v195 = v159 + 4;
v192 -= 4LL;
goto LABEL_441;
}
}
else
{
v198 = v159[1];
if ( (v198 & 0xC0) == 0x80 && (v159[2] & 0xC0) == 0x80 )
{
v199 = ((v194 & 0x1F) << 12) | ((v198 & 0x3F) << 6) | v159[2] & 0x3F;
v192 -= 3LL;
v195 = v159 + 3;
if ( v199 > 255 )
LOBYTE(v199) = 63;
*v193++ = v199;
if ( !v192 )
goto LABEL_319;
goto LABEL_434;
}
}
}
else if ( (v159[1] & 0xC0) == 0x80 )
{
v197 = ((v194 & 0x3F) << 6) | v159[1] & 0x3F;
v192 -= 2LL;
v195 = v159 + 2;
if ( v197 > 255 )
LOBYTE(v197) = 63;
*v193++ = v197;
if ( !v192 )
goto LABEL_319;
goto LABEL_434;
}
--v192;
v195 = v159 + 1;
if ( !v192 )
goto LABEL_319;
goto LABEL_434;
}
v202 = v163;
v203 = (_WORD *)(a1 + 2048);
while ( 1 )
{
v204 = *v159;
if ( (v204 & 0x80) == 0 )
{
v205 = v159 + 1;
*v203++ = v204;
--v202;
if ( ((unsigned __int64)(v159 + 1) & 3) == 0 && v202 > 3 )
{
if ( (*(_DWORD *)(v159 + 1) & 0x80808080) != 0 )
goto LABEL_473;
while ( 1 )
{
v206 = *v205;
v205 += 4;
*v203 = v206;
v203 += 4;
v202 -= 4LL;
*(v203 - 3) = *(v205 - 3);
*(v203 - 2) = *(v205 - 2);
*(v203 - 1) = *(v205 - 1);
if ( v202 <= 3 )
break;
if ( (*(_DWORD *)v205 & 0x80808080) != 0 )
goto LABEL_473;
}
}
goto LABEL_480;
}
if ( (unsigned int)(v204 - 192) > 0x1F || v202 == 1 )
{
if ( (unsigned int)(v204 - 224) > 0xF || v202 <= 2 )
{
if ( (unsigned int)(v204 - 240) <= 7 && v202 > 3 )
{
v207 = v159[1];
if ( (v207 & 0xC0) == 0x80 && (v159[2] & 0xC0) == 0x80 )
{
v208 = v159[3];
if ( (v208 & 0xC0) == 0x80 )
{
v209 = ((v204 & 0xF) << 18) | v208 & 0x3F | ((v207 & 0x3F) << 12) | ((v159[2] & 0x3F) << 6);
v203 += 2;
*(v203 - 1) = (v209 & 0x3FF) - 9216;
*(v203 - 2) = ((unsigned int)(v209 - 0x10000) >> 10) - 10240;
v202 -= 4LL;
v205 = v159 + 4;
LABEL_480:
if ( !v202 )
goto LABEL_481;
goto LABEL_473;
}
}
}
LABEL_501:
--v202;
v205 = v159 + 1;
if ( !v202 )
goto LABEL_481;
goto LABEL_473;
}
v219 = v159[1];
if ( (v219 & 0xC0) != 0x80 || (v159[2] & 0xC0) != 0x80 )
goto LABEL_501;
v202 -= 3LL;
*v203++ = ((v204 & 0x1F) << 12) | ((v219 & 0x3F) << 6) | v159[2] & 0x3F;
v205 = v159 + 3;
if ( !v202 )
{
LABEL_481:
v210 = (__int64)v203 - v160;
if ( v158 != 2 )
{
v211 = v210 >> 1;
if ( v210 >> 1 )
{
v212 = ((v211 - 8) >> 3) + 1;
v213 = 8 * v212;
if ( v211 - 1 <= 6 )
{
v213 = 0;
LABEL_487:
*(_WORD *)(v160 + 2 * v213) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * v213))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * v213) << 8);
if ( v211 > v213 + 1 )
{
*(_WORD *)(v160 + 2 * (v213 + 1)) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * (v213 + 1)))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * (v213 + 1)) << 8);
if ( v211 > v213 + 2 )
{
*(_WORD *)(v160 + 2 * (v213 + 2)) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * (v213 + 2)))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * (v213 + 2)) << 8);
if ( v211 > v213 + 3 )
{
*(_WORD *)(v160 + 2 * (v213 + 3)) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * (v213 + 3)))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * (v213 + 3)) << 8);
if ( v211 > v213 + 4 )
{
v216 = v213 + 5;
*(_WORD *)(v160 + 2 * (v213 + 4)) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * (v213 + 4)))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * (v213 + 4)) << 8);
if ( v211 > v213 + 5 )
{
v217 = v213 + 6;
*(_WORD *)(v160 + 2 * v216) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * v216))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * v216) << 8);
if ( v211 > v217 )
*(_WORD *)(v160 + 2 * v217) = (unsigned __int8)HIBYTE(*(_WORD *)(v160 + 2 * v217))
| (unsigned __int16)(*(_WORD *)(v160 + 2 * v217) << 8);
}
}
}
}
}
}
else
{
v214 = (uint16x8_t *)(a1 + 2048);
v215 = 0;
do
{
++v215;
*v214 = vorrq_s8(vshlq_n_s16(*v214, 8u), vshrq_n_u16(*v214, 8u));
++v214;
}
while ( v215 < v212 );
if ( v211 != v213 )
goto LABEL_487;
}
}
}
LABEL_319:
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
a1 + 2048);
LABEL_320:
v156 -= v163;
if ( v156 > 0x800 )
{
v158 = *(_DWORD *)(a1 + 10256);
v159 = (unsigned __int8 *)v153;
goto LABEL_322;
}
*(_QWORD *)(a1 + 10248) = 0;
v167 = (void *)a1;
LABEL_337:
memcpy(v167, v153, v156);
*(_QWORD *)(a1 + 10248) += v156;
LABEL_177:
sub_DC1DDC((uint16x8_t *)a1, 0x3Cu, 0x2Fu);
sub_DC23B0(a1, v10);
sub_DC1DDC((uint16x8_t *)a1, 0x3Eu, 0xAu);
return _stack_chk_guard;
}
}
else
{
v218 = v159[1];
if ( (v218 & 0xC0) != 0x80 )
goto LABEL_501;
v202 -= 2LL;
*v203++ = ((v204 & 0x3F) << 6) | v218 & 0x3F;
v205 = v159 + 2;
if ( !v202 )
goto LABEL_481;
}
LABEL_473:
v159 = v205;
}
}
v163 = 2044;
}
else
{
v163 = 2045;
}
}
else
{
v163 = 2046;
}
}
else
{
v163 = 2047;
}
v153 = v161;
goto LABEL_315;
}
i = pugi::xml_node::first_child(a2);
v18 = pugi::xml_node::operator!(&i);
v19 = *(_QWORD *)(a1 + 10248);
if ( !v18 )
{
v20 = v19 + 1;
if ( v19 + 1 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v19);
v20 = 1;
v19 = 0;
}
*(_BYTE *)(a1 + v19) = 62;
*(_QWORD *)(a1 + 10248) = v20;
v21 = a5 + 1;
for ( i = pugi::xml_node::first_child(a2);
pugi::xml_node::operator void (*)(pugi::xml_node***)(&i);
i = pugi::xml_node::next_sibling((pugi::xml_node *)&i) )
{
sub_DC5D74(a1, &i, a3, a4, v21);
}
v22 = *(_QWORD *)(a1 + 10248);
v23 = v22 + 2;
v24 = v22 + 1;
if ( v22 + 2 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v22);
v23 = 2;
v24 = 1;
v22 = 0;
}
*(_BYTE *)(a1 + v22) = 60;
*(_BYTE *)(a1 + v24) = 47;
*(_QWORD *)(a1 + 10248) = v23;
sub_DC23B0(a1, v10);
v25 = *(_QWORD *)(a1 + 10248);
v26 = v25 + 1;
if ( v25 + 1 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v25);
v26 = 1;
v25 = 0;
}
*(_BYTE *)(a1 + v25) = 62;
*(_QWORD *)(a1 + 10248) = v26;
return _stack_chk_guard;
}
v114 = v19 + 3;
if ( v19 + 3 <= 0x800 )
{
v115 = v19 + 1;
v116 = v19 + 2;
goto LABEL_208;
}
v123 = *(_DWORD *)(a1 + 10256);
v124 = (unsigned __int8 *)a1;
if ( v123 == 1 )
{
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(*(_QWORD *)(a1 + 10240), a1);
goto LABEL_231;
}
v125 = a1 + 2048;
if ( (unsigned int)(v123 - 2) > 1 )
{
if ( (unsigned int)(v123 - 5) <= 1 )
{
v126 = (__int64)sub_DBE2E0((unsigned __int8 *)a1, *(_QWORD *)(a1 + 10248), (int *)(a1 + 2048)) - v125;
if ( v123 != 5 && v126 >> 2 )
{
v184 = 0;
do
{
*(_DWORD *)(v125 + 4 * v184) = bswap32(*(_DWORD *)(v125 + 4 * v184));
++v184;
}
while ( v126 >> 2 != v184 );
}
goto LABEL_230;
}
v126 = 0;
if ( v123 != 9 )
goto LABEL_230;
v168 = (unsigned __int8 *)(a1 + 2048);
while ( 1 )
{
v169 = *v124;
if ( (v169 & 0x80) != 0 )
{
if ( (unsigned int)(v169 - 192) > 0x1F || v19 == 1 )
{
if ( (unsigned int)(v169 - 224) > 0xF || v19 <= 2 )
{
if ( (unsigned int)(v169 - 240) > 7
|| v19 <= 3
|| (v124[1] & 0xC0) != 0x80
|| (v124[2] & 0xC0) != 0x80
|| (v124[3] & 0xC0) != 0x80 )
{
LABEL_355:
--v19;
v170 = v124 + 1;
if ( !v19 )
goto LABEL_411;
goto LABEL_351;
}
*v168++ = 63;
v19 -= 4LL;
v170 = v124 + 4;
if ( !v19 )
goto LABEL_411;
}
else
{
v172 = v124[1];
if ( (v172 & 0xC0) != 0x80 || (v124[2] & 0xC0) != 0x80 )
goto LABEL_355;
v173 = ((v169 & 0x1F) << 12) | ((v172 & 0x3F) << 6) | v124[2] & 0x3F;
v19 -= 3LL;
v170 = v124 + 3;
if ( v173 > 255 )
LOBYTE(v173) = 63;
*v168++ = v173;
if ( !v19 )
{
LABEL_411:
v126 = (__int64)&v168[-v125];
goto LABEL_230;
}
}
}
else
{
if ( (v124[1] & 0xC0) != 0x80 )
goto LABEL_355;
v174 = ((v169 & 0x3F) << 6) | v124[1] & 0x3F;
v19 -= 2LL;
v170 = v124 + 2;
if ( v174 > 255 )
LOBYTE(v174) = 63;
*v168++ = v174;
if ( !v19 )
goto LABEL_411;
}
}
else
{
v170 = v124 + 1;
*v168++ = v169;
--v19;
if ( ((unsigned __int64)(v124 + 1) & 3) == 0 && v19 > 3 )
{
if ( (*(_DWORD *)(v124 + 1) & 0x80808080) != 0 )
goto LABEL_351;
while ( 1 )
{
v171 = *v170;
v170 += 4;
*v168 = v171;
v168 += 4;
v19 -= 4LL;
*(v168 - 3) = *(v170 - 3);
*(v168 - 2) = *(v170 - 2);
*(v168 - 1) = *(v170 - 1);
if ( v19 <= 3 )
break;
if ( (*(_DWORD *)v170 & 0x80808080) != 0 )
goto LABEL_351;
}
}
if ( !v19 )
goto LABEL_411;
}
LABEL_351:
v124 = v170;
}
}
v175 = (_WORD *)(a1 + 2048);
while ( 1 )
{
v176 = *v124;
if ( (v176 & 0x80) == 0 )
{
v177 = v124 + 1;
*v175++ = v176;
--v19;
if ( ((unsigned __int64)(v124 + 1) & 3) == 0 && v19 > 3 )
{
if ( (*(_DWORD *)(v124 + 1) & 0x80808080) != 0 )
goto LABEL_385;
while ( 1 )
{
v178 = *v177;
v177 += 4;
*v175 = v178;
v175 += 4;
v19 -= 4LL;
*(v175 - 3) = *(v177 - 3);
*(v175 - 2) = *(v177 - 2);
*(v175 - 1) = *(v177 - 1);
if ( v19 <= 3 )
break;
if ( (*(_DWORD *)v177 & 0x80808080) != 0 )
goto LABEL_385;
}
}
if ( !v19 )
goto LABEL_413;
goto LABEL_385;
}
if ( (unsigned int)(v176 - 192) <= 0x1F && v19 != 1 )
break;
if ( (unsigned int)(v176 - 224) > 0xF || v19 <= 2 )
{
if ( (unsigned int)(v176 - 240) > 7 )
goto LABEL_389;
if ( v19 <= 3 )
goto LABEL_389;
v181 = v124[1];
if ( (v181 & 0xC0) != 0x80 )
goto LABEL_389;
if ( (v124[2] & 0xC0) != 0x80 )
goto LABEL_389;
v182 = v124[3];
if ( (v182 & 0xC0) != 0x80 )
goto LABEL_389;
v183 = ((v176 & 0xF) << 18) | v182 & 0x3F | ((v181 & 0x3F) << 12) | ((v124[2] & 0x3F) << 6);
v175 += 2;
*(v175 - 1) = (v183 & 0x3FF) - 9216;
*(v175 - 2) = ((unsigned int)(v183 - 0x10000) >> 10) - 10240;
v19 -= 4LL;
v177 = v124 + 4;
if ( !v19 )
goto LABEL_413;
}
else
{
v180 = v124[1];
if ( (v180 & 0xC0) != 0x80 || (v124[2] & 0xC0) != 0x80 )
goto LABEL_389;
v19 -= 3LL;
*v175++ = ((v176 & 0x1F) << 12) | ((v180 & 0x3F) << 6) | v124[2] & 0x3F;
v177 = v124 + 3;
if ( !v19 )
goto LABEL_413;
}
LABEL_385:
v124 = v177;
}
v179 = v124[1];
if ( (v179 & 0xC0) != 0x80 )
{
LABEL_389:
--v19;
v177 = v124 + 1;
if ( !v19 )
goto LABEL_413;
goto LABEL_385;
}
v19 -= 2LL;
*v175++ = ((v176 & 0x3F) << 6) | v179 & 0x3F;
v177 = v124 + 2;
if ( v19 )
goto LABEL_385;
LABEL_413:
v126 = (__int64)v175 - v125;
if ( v123 != 2 )
{
v185 = v126 >> 1;
if ( v126 >> 1 )
{
v186 = ((v185 - 8) >> 3) + 1;
v187 = 8 * v186;
if ( v185 - 1 <= 6 )
{
v187 = 0;
LABEL_419:
*(_WORD *)(v125 + 2 * v187) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * v187))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * v187) << 8);
if ( v185 > v187 + 1 )
{
*(_WORD *)(v125 + 2 * (v187 + 1)) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * (v187 + 1)))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * (v187 + 1)) << 8);
if ( v185 > v187 + 2 )
{
*(_WORD *)(v125 + 2 * (v187 + 2)) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * (v187 + 2)))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * (v187 + 2)) << 8);
if ( v185 > v187 + 3 )
{
*(_WORD *)(v125 + 2 * (v187 + 3)) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * (v187 + 3)))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * (v187 + 3)) << 8);
if ( v185 > v187 + 4 )
{
v190 = v187 + 5;
*(_WORD *)(v125 + 2 * (v187 + 4)) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * (v187 + 4)))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * (v187 + 4)) << 8);
if ( v185 > v187 + 5 )
{
v191 = v187 + 6;
*(_WORD *)(v125 + 2 * v190) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * v190))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * v190) << 8);
if ( v185 > v191 )
*(_WORD *)(v125 + 2 * v191) = (unsigned __int8)HIBYTE(*(_WORD *)(v125 + 2 * v191))
| (unsigned __int16)(*(_WORD *)(v125 + 2 * v191) << 8);
}
}
}
}
}
}
else
{
v188 = (uint16x8_t *)(a1 + 2048);
v189 = 0;
do
{
++v189;
*v188 = vorrq_s8(vshlq_n_s16(*v188, 8u), vshrq_n_u16(*v188, 8u));
++v188;
}
while ( v186 > v189 );
if ( v185 != v187 )
goto LABEL_419;
}
}
}
LABEL_230:
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
a1 + 2048,
v126);
LABEL_231:
v114 = 3;
v116 = 2;
v115 = 1;
v19 = 0;
LABEL_208:
*(_BYTE *)(a1 + v19) = 32;
*(_BYTE *)(a1 + v115) = 47;
*(_BYTE *)(a1 + v116) = 62;
*(_QWORD *)(a1 + 10248) = v114;
return _stack_chk_guard;
case 3u:
v77 = pugi::xml_node::value(a2);
v78 = (unsigned __int8 *)v77;
if ( (a4 & 0x10) == 0 )
{
sub_DC2A74(a1, v77, 1u);
goto LABEL_139;
}
v103 = strlen(v77);
v104 = *(_QWORD *)(a1 + 10248);
if ( v103 + v104 <= 0x800 )
{
v117 = (void *)(a1 + v104);
goto LABEL_210;
}
sub_DBEB98(a1, (unsigned __int8 *)a1, v104);
*(_QWORD *)(a1 + 10248) = 0;
if ( v103 <= 0x800 )
{
v117 = (void *)a1;
goto LABEL_210;
}
v105 = *(_DWORD *)(a1 + 10256);
if ( v105 == 1 )
{
(*(void (__fastcall **)(_QWORD, unsigned __int8 *, size_t))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
v78,
v103);
LABEL_139:
if ( (a4 & 4) == 0 )
{
v79 = *(_QWORD *)(a1 + 10248);
v80 = v79 + 1;
if ( v79 + 1 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v79);
v80 = 1;
v79 = 0;
}
*(_BYTE *)(a1 + v79) = 10;
*(_QWORD *)(a1 + 10248) = v80;
}
return _stack_chk_guard;
}
v106 = a1 + 2048;
LABEL_193:
if ( (v78[2047] & 0xC0) == 0x80 )
{
if ( (v78[2046] & 0xC0) == 0x80 )
{
if ( (v78[2045] & 0xC0) == 0x80 )
{
v107 = v78 + 2048;
v108 = 2048;
if ( (v78[2044] & 0xC0) != 0x80 )
{
v108 = 2044;
v107 = v78 + 2044;
}
}
else
{
v108 = 2045;
v107 = v78 + 2045;
}
}
else
{
v108 = 2046;
v107 = v78 + 2046;
}
}
else
{
v108 = 2047;
v107 = v78 + 2047;
}
if ( v105 == 1 )
{
(*(void (__fastcall **)(_QWORD, unsigned __int8 *, unsigned __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(
*(_QWORD *)(a1 + 10240),
v78,
v108);
goto LABEL_191;
}
if ( (unsigned int)(v105 - 2) > 1 )
{
if ( (unsigned int)(v105 - 5) <= 1 )
{
v154 = (__int64)sub_DBE2E0(v78, v108, (int *)(a1 + 2048)) - v106;
if ( v105 != 5 && v154 >> 2 )
{
v155 = 0;
do
{
*(_DWORD *)(v106 + 4 * v155) = bswap32(*(_DWORD *)(v106 + 4 * v155));
++v155;
}
while ( v154 >> 2 != v155 );
}
goto LABEL_190;
}
if ( v105 != 9 )
goto LABEL_190;
v145 = v108;
v146 = (unsigned __int8 *)(a1 + 2048);
while ( 1 )
{
LABEL_271:
while ( 1 )
{
v147 = *v78;
if ( (v147 & 0x80) == 0 )
break;
if ( (unsigned int)(v147 - 192) > 0x1F || v145 == 1 )
{
if ( (unsigned int)(v147 - 224) > 0xF || v145 <= 2 )
{
if ( (unsigned int)(v147 - 240) <= 7
&& v145 > 3
&& (v78[1] & 0xC0) == 0x80
&& (v78[2] & 0xC0) == 0x80
&& (v78[3] & 0xC0) == 0x80 )
{
*v146++ = 63;
v78 += 4;
v145 -= 4LL;
goto LABEL_278;
}
}
else
{
v150 = v78[1];
if ( (v150 & 0xC0) == 0x80 && (v78[2] & 0xC0) == 0x80 )
{
v151 = ((v147 & 0x1F) << 12) | ((v150 & 0x3F) << 6) | v78[2] & 0x3F;
v78 += 3;
v145 -= 3LL;
if ( v151 > 255 )
LOBYTE(v151) = 63;
*v146++ = v151;
goto LABEL_278;
}
}
}
else if ( (v78[1] & 0xC0) == 0x80 )
{
v166 = ((v147 & 0x3F) << 6) | v78[1] & 0x3F;
v78 += 2;
v145 -= 2LL;
if ( v166 > 255 )
LOBYTE(v166) = 63;
*v146++ = v166;
goto LABEL_278;
}
++v78;
--v145;
LABEL_278:
if ( !v145 )
goto LABEL_190;
}
*v146++ = v147;
--v145;
if ( ((unsigned __int64)(v78 + 1) & 3) != 0 || v145 <= 3 )
{
++v78;
goto LABEL_278;
}
v148 = *(_DWORD *)++v78;
if ( (v148 & 0x80808080) == 0 )
{
while ( 1 )
{
v149 = *v78;
v78 += 4;
*v146 = v149;
v146 += 4;
v145 -= 4LL;
*(v146 - 3) = *(v78 - 3);
*(v146 - 2) = *(v78 - 2);
*(v146 - 1) = *(v78 - 1);
if ( v145 <= 3 )
goto LABEL_278;
if ( (*(_DWORD *)v78 & 0x80808080) != 0 )
goto LABEL_271;
}
}
}
}
v127 = v108;
v128 = (_WORD *)(a1 + 2048);
break;
case 4u:
v81 = pugi::xml_node::value(a2);
sub_DC0060(a1, v81);
goto LABEL_139;
case 5u:
v82 = *(_QWORD *)(a1 + 10248);
v83 = v82 + 4;
if ( v82 + 4 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v82);
v83 = 4;
v86 = 3;
v85 = 2;
v84 = 1;
v82 = 0;
}
else
{
v84 = v82 + 1;
v85 = v82 + 2;
v86 = v82 + 3;
}
*(_BYTE *)(a1 + v82) = 60;
*(_BYTE *)(a1 + v84) = 33;
*(_BYTE *)(a1 + v85) = 45;
*(_BYTE *)(a1 + v86) = 45;
*(_QWORD *)(a1 + 10248) = v83;
v87 = pugi::xml_node::value(a2);
sub_DC23B0(a1, v87);
v88 = *(_QWORD *)(a1 + 10248);
v89 = v88 + 3;
if ( v88 + 3 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v88);
*(_BYTE *)a1 = 45;
v89 = 3;
*(_BYTE *)(a1 + 1) = 45;
*(_BYTE *)(a1 + 2) = 62;
*(_QWORD *)(a1 + 10248) = 3;
if ( (a4 & 4) != 0 )
return _stack_chk_guard;
v91 = 4;
}
else
{
v90 = a1 + v88;
*(_BYTE *)(a1 + v88) = 45;
*(_BYTE *)(v90 + 1) = 45;
*(_BYTE *)(v90 + 2) = 62;
*(_QWORD *)(a1 + 10248) = v89;
if ( (a4 & 4) != 0 )
return _stack_chk_guard;
if ( v88 == 2045 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, 0x800u);
v91 = 1;
v89 = 0;
}
else
{
v91 = v88 + 4;
}
}
*(_BYTE *)(a1 + v89) = 10;
*(_QWORD *)(a1 + 10248) = v91;
return _stack_chk_guard;
case 6u:
case 7u:
v92 = *(_QWORD *)(a1 + 10248);
v93 = v92 + 2;
v94 = v92 + 1;
if ( v92 + 2 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v92);
v93 = 2;
v94 = 1;
v92 = 0;
}
*(_BYTE *)(a1 + v92) = 60;
*(_BYTE *)(a1 + v94) = 63;
*(_QWORD *)(a1 + 10248) = v93;
if ( *pugi::xml_node::name(a2) )
v95 = pugi::xml_node::name(a2);
else
v95 = ":anonymous";
sub_DC23B0(a1, v95);
if ( (unsigned int)pugi::xml_node::type(a2) == 7 )
{
sub_DC582C(a1, a2, a4, v96, v97, v98, v99, v100, v220);
}
else if ( *pugi::xml_node::value(a2) )
{
sub_DC1828(a1, 32);
v121 = pugi::xml_node::value(a2);
sub_DC23B0(a1, v121);
}
v101 = *(_QWORD *)(a1 + 10248);
v75 = v101 + 2;
if ( v101 + 2 <= 0x800 )
{
*(_BYTE *)(a1 + v101) = 63;
*(_BYTE *)(a1 + v101 + 1) = 62;
*(_QWORD *)(a1 + 10248) = v75;
if ( (a4 & 4) != 0 )
return _stack_chk_guard;
if ( v101 != 2046 )
{
v76 = v101 + 3;
goto LABEL_162;
}
goto LABEL_211;
}
sub_DBEB98(a1, (unsigned __int8 *)a1, v101);
v75 = 2;
*(_BYTE *)a1 = 63;
*(_QWORD *)(a1 + 10248) = 2;
*(_BYTE *)(a1 + 1) = 62;
if ( (a4 & 4) != 0 )
return _stack_chk_guard;
v76 = 3;
goto LABEL_162;
case 8u:
v67 = *(_QWORD *)(a1 + 10248);
v68 = v67 + 5;
if ( v67 + 5 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v67);
*(_BYTE *)a1 = 60;
*(_BYTE *)(a1 + 1) = 33;
*(_BYTE *)(a1 + 2) = 68;
*(_BYTE *)(a1 + 3) = 79;
v70 = 9;
*(_BYTE *)(a1 + 4) = 67;
v71 = 8;
v72 = 7;
v73 = 6;
v68 = 5;
}
else
{
v69 = (_BYTE *)(a1 + v67);
*(_BYTE *)(a1 + v67) = 60;
v69[1] = 33;
v69[3] = 79;
v69[2] = 68;
v70 = v67 + 9;
v69[4] = 67;
*(_QWORD *)(a1 + 10248) = v68;
if ( v67 + 9 <= 0x800 )
{
v73 = v67 + 6;
v72 = v67 + 7;
v71 = v67 + 8;
}
else
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v67 + 5);
v70 = 4;
v71 = 3;
v72 = 2;
v73 = 1;
v68 = 0;
}
}
*(_BYTE *)(a1 + v68) = 84;
*(_BYTE *)(a1 + v73) = 89;
*(_BYTE *)(a1 + v72) = 80;
*(_BYTE *)(a1 + v71) = 69;
*(_QWORD *)(a1 + 10248) = v70;
if ( *pugi::xml_node::value(a2) )
{
v118 = *(_QWORD *)(a1 + 10248);
v119 = v118 + 1;
if ( v118 + 1 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v118);
v119 = 1;
v118 = 0;
}
*(_BYTE *)(a1 + v118) = 32;
*(_QWORD *)(a1 + 10248) = v119;
v120 = pugi::xml_node::value(a2);
sub_DC23B0(a1, v120);
}
v74 = *(_QWORD *)(a1 + 10248);
v75 = v74 + 1;
if ( v74 + 1 > 0x800 )
{
sub_DBEB98(a1, (unsigned __int8 *)a1, v74);
v75 = 1;
*(_QWORD *)(a1 + 10248) = 1;
*(_BYTE *)a1 = 62;
if ( (a4 & 4) != 0 )
return _stack_chk_guard;
v76 = 2;
}
else
{
*(_BYTE *)(a1 + v74) = 62;
*(_QWORD *)(a1 + 10248) = v75;
if ( (a4 & 4) != 0 )
return _stack_chk_guard;
if ( v74 == 2047 )
{
LABEL_211:
sub_DBEB98(a1, (unsigned __int8 *)a1, v75);
v76 = 1;
v75 = 0;
}
else
{
v76 = v74 + 2;
}
}
LABEL_162:
*(_BYTE *)(a1 + v75) = 10;
*(_QWORD *)(a1 + 10248) = v76;
return _stack_chk_guard;
default:
return _stack_chk_guard;
}
while ( 1 )
{
while ( 1 )
{
v129 = *v78;
if ( (v129 & 0x80) == 0 )
break;
if ( (unsigned int)(v129 - 192) > 0x1F || v127 == 1 )
{
if ( (unsigned int)(v129 - 224) > 0xF || v127 <= 2 )
{
if ( (unsigned int)(v129 - 240) <= 7 && v127 > 3 && (v78[1] & 0xC0) == 0x80 )
{
v141 = v78[2];
if ( (v141 & 0xC0) == 0x80 )
{
v142 = v78[3];
if ( (v142 & 0xC0) == 0x80 )
{
v143 = ((v129 & 0xF) << 18) | v142 & 0x3F | ((v78[1] & 0x3F) << 12) | ((v141 & 0x3F) << 6);
v128 += 2;
*(v128 - 1) = (v142 & 0x3F | ((v141 & 0x3F) << 6) & 0x3FF) - 9216;
*(v128 - 2) = ((unsigned int)(v143 - 0x10000) >> 10) - 10240;
v78 += 4;
v127 -= 4LL;
goto LABEL_242;
}
}
}
}
else
{
v139 = v78[1];
if ( (v139 & 0xC0) == 0x80 )
{
v140 = v78[2];
if ( (v140 & 0xC0) == 0x80 )
{
v78 += 3;
*v128++ = ((v129 & 0x1F) << 12) | ((v139 & 0x3F) << 6) | v140 & 0x3F;
v127 -= 3LL;
goto LABEL_242;
}
}
}
}
else
{
v138 = v78[1];
if ( (v138 & 0xC0) == 0x80 )
{
v78 += 2;
*v128++ = ((v129 & 0x3F) << 6) | v138 & 0x3F;
v127 -= 2LL;
goto LABEL_242;
}
}
++v78;
--v127;
LABEL_242:
if ( !v127 )
{
v132 = (__int64)v128 - v106;
if ( v105 != 2 )
{
v133 = v132 >> 1;
if ( v132 >> 1 )
{
v134 = ((v133 - 8) >> 3) + 1;
v135 = 8 * v134;
if ( v133 - 1 <= 6 )
{
v135 = 0;
}
else
{
v136 = (uint16x8_t *)(a1 + 2048);
v137 = 0;
do
{
++v137;
*v136 = vorrq_s8(vshlq_n_s16(*v136, 8u), vshrq_n_u16(*v136, 8u));
++v136;
}
while ( v134 > v137 );
if ( v135 == v133 )
goto LABEL_190;
}
*(_WORD *)(v106 + 2 * v135) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * v135))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * v135) << 8);
if ( v133 > v135 + 1 )
{
*(_WORD *)(v106 + 2 * (v135 + 1)) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * (v135 + 1)))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * (v135 + 1)) << 8);
if ( v133 > v135 + 2 )
{
*(_WORD *)(v106 + 2 * (v135 + 2)) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * (v135 + 2)))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * (v135 + 2)) << 8);
if ( v133 > v135 + 3 )
{
*(_WORD *)(v106 + 2 * (v135 + 3)) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * (v135 + 3)))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * (v135 + 3)) << 8);
if ( v133 > v135 + 4 )
{
v164 = v135 + 5;
*(_WORD *)(v106 + 2 * (v135 + 4)) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * (v135 + 4)))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * (v135 + 4)) << 8);
if ( v133 > v135 + 5 )
{
v165 = v135 + 6;
*(_WORD *)(v106 + 2 * v164) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * v164))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * v164) << 8);
if ( v133 > v165 )
*(_WORD *)(v106 + 2 * v165) = (unsigned __int8)HIBYTE(*(_WORD *)(v106 + 2 * v165))
| (unsigned __int16)(*(_WORD *)(v106 + 2 * v165) << 8);
}
}
}
}
}
}
}
LABEL_190:
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 10240) + 16LL))(*(_QWORD *)(a1 + 10240), a1 + 2048);
LABEL_191:
v103 -= v108;
if ( v103 > 0x800 )
{
v105 = *(_DWORD *)(a1 + 10256);
v78 = v107;
goto LABEL_193;
}
v78 = v107;
*(_QWORD *)(a1 + 10248) = 0;
v117 = (void *)a1;
LABEL_210:
memcpy(v117, v78, v103);
*(_QWORD *)(a1 + 10248) += v103;
goto LABEL_139;
}
}
v130 = v78 + 1;
*v128++ = v129;
--v127;
if ( ((unsigned __int64)(v78 + 1) & 3) != 0 || v127 <= 3 )
goto LABEL_241;
if ( (*(_DWORD *)(v78 + 1) & 0x80808080) == 0 )
break;
LABEL_265:
v78 = v130;
}
while ( 1 )
{
v131 = *v130;
v130 += 4;
*v128 = v131;
v128 += 4;
v127 -= 4LL;
*(v128 - 3) = *(v130 - 3);
*(v128 - 2) = *(v130 - 2);
*(v128 - 1) = *(v130 - 1);
if ( v127 <= 3 )
break;
if ( (*(_DWORD *)v130 & 0x80808080) != 0 )
goto LABEL_265;
}
LABEL_241:
v78 = v130;
goto LABEL_242;
}