//
// MultilineBitmapFont::readColorInfo from 0x3d54b0 to 0x3d5cca (2074 bytes)
//
// 1 xrefs:
// > MultilineBitmapFont::initWithFont @ 0x3d5f06
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:46:44 +0000
//
_DWORD *__fastcall MultilineBitmapFont::readColorInfo(_DWORD *a1, cocos2d::CCArray **a2, unsigned __int8 *a3)
{
int v5; // r7
unsigned int v6; // r7
unsigned __int8 *v7; // r8
unsigned __int8 *v8; // r7
unsigned __int8 *v9; // r6
int v10; // r3
unsigned int v11; // r3
unsigned __int8 *v12; // r0
int v13; // r3
unsigned int v14; // r3
int v15; // r5
_BOOL4 v16; // r7
int i; // r9
char v18; // r11
int v19; // r8
unsigned __int8 *v20; // r0
int v21; // r3
unsigned int v22; // r3
unsigned __int8 *v23; // r9
unsigned __int8 *v24; // r8
unsigned __int8 *v25; // r9
unsigned __int8 *v26; // r0
char v27; // r3
char v28; // r1
cocos2d::CCArray *v29; // r5
cocos2d::CCObject *InstantSection; // r0
int v31; // r3
unsigned int v32; // r3
unsigned __int8 *v33; // r5
unsigned __int8 *v34; // r9
TextStyleSection *v35; // r6
char *v36; // r0
int v37; // s16
unsigned __int8 *v38; // r0
int v39; // r5
unsigned int v40; // r5
unsigned __int8 *v41; // r9
unsigned __int8 *v42; // r5
unsigned __int8 *v43; // r9
int v44; // r1
int v45; // r2
unsigned __int8 *v47; // r0
float v48; // r3
cocos2d::CCObject *v49; // r1
cocos2d::CCArray *v50; // r0
int v51; // r6
unsigned int v52; // r6
unsigned __int8 *v53; // r5
unsigned __int8 *v54; // r6
TextStyleSection *v55; // r5
int v56; // r3
unsigned int v57; // r3
const char *v58; // r0
const char *v59; // r0
int v60; // r9
unsigned __int8 *v61; // r0
int v62; // r6
unsigned int v63; // r6
unsigned __int8 *v64; // r11
unsigned __int8 *v65; // r6
unsigned __int8 *v66; // r11
unsigned __int8 *v67; // r0
cocos2d::CCArray *v68; // r6
cocos2d::CCObject *DelaySection; // r0
int v70; // r6
unsigned int v71; // r6
unsigned __int8 *v72; // r5
unsigned __int8 *v73; // r6
TextStyleSection *v74; // r5
char *v75; // r0
int v76; // s16
unsigned __int8 *v77; // r0
float v78; // r2
const char *v79; // r0
int v80; // r8
const char *v81; // r0
const char *v82; // r0
int v83; // r9
const char *v84; // r0
const char *v85; // r0
char *v86; // r0
int v87; // [sp+0h] [bp-9Ch]
char v88; // [sp+14h] [bp-88h]
int v89; // [sp+14h] [bp-88h]
char v90; // [sp+18h] [bp-84h]
unsigned __int8 *v92[2]; // [sp+44h] [bp-58h] BYREF
int v93[3]; // [sp+4Ch] [bp-50h] BYREF
int v94[3]; // [sp+58h] [bp-44h] BYREF
int v95[3]; // [sp+64h] [bp-38h] BYREF
int v96[3]; // [sp+70h] [bp-2Ch] BYREF
int v97[3]; // [sp+7Ch] [bp-20h] BYREF
int v98[2]; // [sp+88h] [bp-14h] BYREF
char *v99; // [sp+90h] [bp-Ch]
while ( 1 )
{
v5 = *a3;
if ( (v5 & 1) != 0 )
{
v6 = *((_DWORD *)a3 + 1);
v7 = *((unsigned __int8 **)a3 + 2);
}
else
{
v6 = v5 >> 1;
v7 = a3 + 1;
}
if ( v6 > 1 )
{
v8 = &v7[v6];
std::__search(
v92,
v7,
v8,
"::eq);
if ( v92[0] != v8 )
{
v9 = (unsigned __int8 *)(v92[0] - v7);
if ( v92[0] - v7 != -1 )
break;
}
}
v31 = *a3;
if ( (v31 & 1) != 0 )
{
v32 = *((_DWORD *)a3 + 1);
v33 = *((unsigned __int8 **)a3 + 2);
}
else
{
v32 = v31 >> 1;
v33 = a3 + 1;
}
if ( v32 > 1 )
{
v34 = &v33[v32];
std::__search(
v92,
v33,
&v33[v32],
"::eq);
if ( v92[0] != v34 )
{
v35 = (TextStyleSection *)(v92[0] - v33);
if ( v92[0] - v33 != -1 )
{
std::string::basic_string(v98, a3, (unsigned int)v35 + 2, 3u);
if ( (v98[0] & 1) != 0 )
v36 = v99;
else
v36 = (char *)v98 + 1;
*(float *)&v37 = (float)atoi(v36) / 100.0;
std::string::~string((int)v98);
v38 = (unsigned __int8 *)std::string::replace(a3, (size_t)v35, 6u, (char *)&unk_B6B226);
std::string::operator=(a3, v38);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v35, 6);
v39 = *a3;
if ( (v39 & 1) != 0 )
{
v40 = *((_DWORD *)a3 + 1);
v41 = *((unsigned __int8 **)a3 + 2);
}
else
{
v40 = v39 >> 1;
v41 = a3 + 1;
}
if ( v40 <= 3 )
goto LABEL_81;
v42 = &v41[v40];
std::__search(
v92,
v41,
v42,
"",
(unsigned __int8 *)"",
(int (__fastcall *)(int, _DWORD))std::char_traits::eq);
if ( v92[0] == v42 )
goto LABEL_81;
v43 = (unsigned __int8 *)(v92[0] - v41);
if ( v43 == (unsigned __int8 *)-1 )
goto LABEL_81;
v47 = (unsigned __int8 *)std::string::replace(a3, (size_t)v43, 4u, (char *)&unk_B6B226);
std::string::operator=(a3, v47);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v43, 4);
v29 = a2[132];
InstantSection = TextStyleSection::createInstantSection(v35, (int)(v43 - 1), v37, v48);
goto LABEL_83;
}
}
}
v51 = *a3;
if ( (v51 & 1) != 0 )
{
v52 = *((_DWORD *)a3 + 1);
v53 = *((unsigned __int8 **)a3 + 2);
}
else
{
v52 = v51 >> 1;
v53 = a3 + 1;
}
if ( v52 <= 1
|| (v54 = &v53[v52],
std::__search(
v92,
v53,
v54,
"::eq),
v92[0] == v54)
|| (v55 = (TextStyleSection *)(v92[0] - v53), v55 == (TextStyleSection *)-1) )
{
v70 = *a3;
if ( (v70 & 1) != 0 )
{
v71 = *((_DWORD *)a3 + 1);
v72 = *((unsigned __int8 **)a3 + 2);
}
else
{
v71 = v70 >> 1;
v72 = a3 + 1;
}
if ( v71 <= 1 )
goto LABEL_81;
v73 = &v72[v71];
std::__search(
v92,
v72,
v73,
"::eq);
if ( v92[0] == v73 )
goto LABEL_81;
v74 = (TextStyleSection *)(v92[0] - v72);
if ( v74 == (TextStyleSection *)-1 )
goto LABEL_81;
std::string::basic_string(v98, a3, (unsigned int)v74 + 2, 3u);
if ( (v98[0] & 1) != 0 )
v75 = v99;
else
v75 = (char *)v98 + 1;
v76 = atoi(v75);
std::string::~string((int)v98);
v77 = (unsigned __int8 *)std::string::replace(a3, (size_t)v74, 6u, (char *)&unk_B6B226);
std::string::operator=(a3, v77);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v74, 6);
v68 = a2[132];
DelaySection = TextStyleSection::createDelaySection(v74, COERCE_INT((float)v76 / 100.0), v78);
}
else
{
v56 = *a3;
if ( (v56 & 1) != 0 )
v57 = *((_DWORD *)a3 + 1);
else
v57 = v56 >> 1;
if ( v57 < (unsigned int)v55 + 6 )
goto LABEL_81;
std::string::basic_string(v98, a3, (unsigned int)v55 + 2, 1u);
v58 = (v98[0] & 1) != 0 ? v99 : (char *)v98 + 1;
v89 = atoi(v58);
std::string::~string((int)v98);
std::string::basic_string(v98, a3, (unsigned int)v55 + 3, 2u);
v59 = (v98[0] & 1) != 0 ? v99 : (char *)v98 + 1;
v60 = atoi(v59);
std::string::~string((int)v98);
v61 = (unsigned __int8 *)std::string::replace(a3, (size_t)v55, 6u, (char *)&unk_B6B226);
std::string::operator=(a3, v61);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v55, 6);
v62 = *a3;
if ( (v62 & 1) != 0 )
{
v63 = *((_DWORD *)a3 + 1);
v64 = *((unsigned __int8 **)a3 + 2);
}
else
{
v63 = v62 >> 1;
v64 = a3 + 1;
}
if ( v63 <= 3 )
goto LABEL_81;
v65 = &v64[v63];
std::__search(
v92,
v64,
v65,
"",
(unsigned __int8 *)"",
(int (__fastcall *)(int, _DWORD))std::char_traits::eq);
if ( v92[0] == v65 )
goto LABEL_81;
v66 = (unsigned __int8 *)(v92[0] - v64);
if ( v66 == (unsigned __int8 *)-1 )
goto LABEL_81;
v67 = (unsigned __int8 *)std::string::replace(a3, (size_t)v66, 4u, (char *)&unk_B6B226);
std::string::operator=(a3, v67);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v66, 4);
v68 = a2[132];
DelaySection = TextStyleSection::createShakeSection(v55, (int)(v66 - 1), v89, v60, v87);
}
v49 = DelaySection;
v50 = v68;
LABEL_118:
cocos2d::CCArray::addObject(v50, v49);
}
v10 = *a3;
if ( (v10 & 1) != 0 )
v11 = *((_DWORD *)a3 + 1);
else
v11 = v10 >> 1;
if ( v11 >= (unsigned int)(v9 + 4) )
{
v12 = std::string::at(a3, (unsigned int)(v9 + 2));
v13 = *a3;
v14 = (v13 & 1) != 0 ? *((_DWORD *)a3 + 1) : v13 >> 1;
v15 = *v12;
v16 = v14 >= (unsigned int)(v9 + 12) && *std::string::at(a3, (unsigned int)(v9 + 11)) == 62;
for ( i = 2; ; ++i )
{
if ( !v16 )
{
v18 = 0;
v19 = 4;
v88 = 0;
v90 = -1;
goto LABEL_25;
}
if ( i == 11 )
break;
v16 = *std::string::at(a3, (unsigned int)&v9[i]) > 0x2Fu && *std::string::at(a3, (unsigned int)&v9[i]) <= 0x39u;
}
std::string::basic_string(v93, a3, (unsigned int)(v9 + 2), 3u);
if ( (v93[0] & 1) != 0 )
v79 = (const char *)v93[2];
else
v79 = (char *)v93 + 1;
if ( atoi(v79) > 255 )
{
v80 = 0;
v90 = -1;
}
else
{
std::string::basic_string(v94, a3, (unsigned int)(v9 + 2), 3u);
v80 = 1;
if ( (v94[0] & 1) != 0 )
v81 = (const char *)v94[2];
else
v81 = (char *)v94 + 1;
v90 = atoi(v81);
}
std::string::basic_string(v95, a3, (unsigned int)(v9 + 5), 3u);
if ( (v95[0] & 1) != 0 )
v82 = (const char *)v95[2];
else
v82 = (char *)v95 + 1;
if ( atoi(v82) > 255 )
{
v83 = 0;
v18 = -1;
}
else
{
std::string::basic_string(v96, a3, (unsigned int)(v9 + 5), 3u);
v83 = 1;
if ( (v96[0] & 1) != 0 )
v84 = (const char *)v96[2];
else
v84 = (char *)v96 + 1;
v18 = atoi(v84);
}
std::string::basic_string(v97, a3, (unsigned int)(v9 + 8), 3u);
if ( (v97[0] & 1) != 0 )
v85 = (const char *)v97[2];
else
v85 = (char *)v97 + 1;
if ( atoi(v85) > 255 )
{
v88 = -1;
}
else
{
std::string::basic_string(v98, a3, (unsigned int)(v9 + 8), 3u);
if ( (v98[0] & 1) != 0 )
v86 = v99;
else
v86 = (char *)v98 + 1;
v88 = atoi(v86);
std::string::~string((int)v98);
}
std::string::~string((int)v97);
if ( v83 )
std::string::~string((int)v96);
std::string::~string((int)v95);
if ( v80 )
std::string::~string((int)v94);
v19 = 12;
std::string::~string((int)v93);
LABEL_25:
v20 = (unsigned __int8 *)std::string::replace(a3, (size_t)v9, v19, (char *)&unk_B6B226);
std::string::operator=(a3, v20);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v9, v19);
v21 = *a3;
if ( (v21 & 1) != 0 )
{
v22 = *((_DWORD *)a3 + 1);
v23 = *((unsigned __int8 **)a3 + 2);
}
else
{
v22 = v21 >> 1;
v23 = a3 + 1;
}
if ( v22 > 3 )
{
v24 = &v23[v22];
std::__search(
v92,
v23,
&v23[v22],
"",
(unsigned __int8 *)"",
(int (__fastcall *)(int, _DWORD))std::char_traits::eq);
if ( v92[0] != v24 )
{
v25 = (unsigned __int8 *)(v92[0] - v23);
if ( v25 != (unsigned __int8 *)-1 )
{
v26 = (unsigned __int8 *)std::string::replace(a3, (size_t)v25, 4u, (char *)&unk_B6B226);
std::string::operator=(a3, v26);
MultilineBitmapFont::moveSpecialDescriptors(a2, (int)v25, 4);
if ( v16 )
{
BYTE1(v92[0]) = v18;
LOBYTE(v92[0]) = v90;
v27 = v88;
LABEL_64:
BYTE2(v92[0]) = v27;
goto LABEL_65;
}
switch ( v15 )
{
case 'b':
LOWORD(v92[0]) = 21066;
v27 = -31;
goto LABEL_64;
case 'g':
LOWORD(v92[0]) = -7360;
v27 = 72;
goto LABEL_64;
case 'l':
LOWORD(v92[0]) = -21664;
v27 = -17;
goto LABEL_64;
case 'j':
LOWORD(v92[0]) = -14286;
v27 = -1;
goto LABEL_64;
case 'y':
LOWORD(v92[0]) = -1;
BYTE2(v92[0]) = 0;
LABEL_65:
v29 = a2[132];
InstantSection = TextStyleSection::createColoredSection((int)v92[0], (int)v9, (int)(v25 - 1));
LABEL_83:
v49 = InstantSection;
v50 = v29;
goto LABEL_118;
case 'o':
LOWORD(v92[0]) = -23041;
v27 = 75;
goto LABEL_64;
}
v27 = -1;
switch ( v15 )
{
case 'r':
LOBYTE(v92[0]) = -1;
v27 = 90;
goto LABEL_63;
case 'p':
LOBYTE(v92[0]) = -1;
v28 = 0;
break;
case 'a':
LOBYTE(v92[0]) = -106;
v28 = 50;
break;
case 'd':
v28 = -106;
LOBYTE(v92[0]) = -1;
break;
default:
switch ( v15 )
{
case 'c':
LOWORD(v92[0]) = -1;
v27 = -106;
goto LABEL_64;
case 'f':
LOBYTE(v92[0]) = -106;
break;
case 's':
LOWORD(v92[0]) = -8961;
v27 = 65;
goto LABEL_64;
case 't':
LOWORD(v92[0]) = -106;
v27 = -56;
goto LABEL_64;
default:
LOBYTE(v92[0]) = -1;
v27 = 0;
break;
}
LABEL_63:
BYTE1(v92[0]) = v27;
goto LABEL_64;
}
BYTE1(v92[0]) = v28;
goto LABEL_64;
}
}
}
}
LABEL_81:
v44 = *((_DWORD *)a3 + 1);
v45 = *((_DWORD *)a3 + 2);
*a1 = *(_DWORD *)a3;
a1[1] = v44;
a1[2] = v45;
*(_DWORD *)a3 = 0;
*((_DWORD *)a3 + 1) = 0;
*((_DWORD *)a3 + 2) = 0;
return a1;
}