//
// AchievementBar::init from 0x5370c8 to 0x537ec4 (3580 bytes)
//
// 1 xrefs:
// > AchievementBar::create @ 0x537f12
//
// 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:52:09 +0000
//
cocos2d::CCDirector *__fastcall AchievementBar::init(
AchievementBar *this,
cocos2d::CCLabelBMFont *a2,
const char *a3,
cocos2d::CCSprite *a4,
bool a5)
{
cocos2d::CCDirector *v7; // r0
int v8; // r0
int v9; // r3
int v10; // r6
void (__fastcall *v11)(int, _BYTE *); // r7
const char *v12; // r1
char *v13; // r6
int v14; // r6
void (__fastcall *v15)(int, _BYTE *); // r7
const char *v16; // r1
int v17; // r0
cocos2d::extension::CCScale9Sprite *v18; // r5
void (__fastcall *v19)(cocos2d::extension::CCScale9Sprite *, _BYTE *); // r7
void (__fastcall *v20)(cocos2d::extension::CCScale9Sprite *, int); // r4
int v21; // r0
const char *v22; // r1
const char *v23; // r1
int *v24; // r6
void (__fastcall *v25)(int *, _DWORD); // r4
float *v26; // r0
const char *v27; // r7
float v28; // r5
size_t v29; // r0
cocos2d::CCArray *v30; // r0
cocos2d::CCArray *v31; // r8
int v32; // r6
unsigned __int8 *v33; // r3
unsigned __int8 *v34; // r6
unsigned __int8 *v35; // r2
unsigned __int8 *v36; // r4
int v37; // r0
int v38; // r4
int v39; // r9
unsigned int v40; // r5
size_t v41; // r2
unsigned int v42; // r3
std::logic_error *exception; // r4
char *v44; // r1
size_t v45; // r3
char *v46; // r1
char *v47; // r1
size_t v48; // r0
cocos2d::CCObject *v49; // r0
unsigned __int8 *v50; // r2
unsigned int v51; // r3
unsigned __int8 *v52; // r1
unsigned __int8 *v53; // r3
unsigned __int8 *v54; // r4
int v55; // r0
cocos2d::CCString *v56; // r0
const char *CString; // r4
cocos2d::CCString *v58; // r0
int v59; // r6
size_t v60; // r0
_BOOL4 v61; // r9
size_t v62; // r0
_BOOL4 v63; // r8
size_t v64; // r0
_BOOL4 v65; // r8
size_t v66; // r0
_BOOL4 v67; // r8
size_t v68; // r0
_BOOL4 v69; // r8
size_t v70; // r0
_BOOL4 v71; // r8
size_t v72; // r0
_BOOL4 v73; // r8
size_t v74; // r0
_BOOL4 v75; // r8
size_t v76; // r0
_BOOL4 v77; // r8
size_t v78; // r0
_BOOL4 v79; // r8
size_t v80; // r0
_BOOL4 v81; // r8
size_t v82; // r0
_BOOL4 v83; // r8
size_t v84; // r0
_BOOL4 v85; // r7
int v86; // r4
const char *v87; // r1
cocos2d::CCString *v88; // r0
cocos2d::CCNode *v89; // r0
int v90; // r8
float v91; // s16
const char *v92; // r4
size_t v93; // r0
const char *v94; // r2
char *v95; // r1
int v96; // r4
void (__fastcall *v97)(int, _BYTE *); // r10
void (__fastcall *v98)(int, int); // r9
void (__fastcall *v99)(int, _DWORD); // r9
float *v100; // r0
int v101; // r1
size_t v102; // r0
int v103; // r7
void (__fastcall *v104)(int, _BYTE *); // r10
void (__fastcall *v105)(int, _BYTE *); // r10
float v106; // s16
int v107; // r0
float v108; // s14
float v109; // s18
float v110; // s15
float v111; // s18
float v112; // s16
float v113; // r10
float v114; // s15
float v115; // s16
float v116; // s19
float v117; // s18
float v118; // s18
float v119; // s16
float v120; // r0
float v121; // s15
float v122; // s19
float v123; // s16
void (__fastcall *v124)(int *, _BYTE *); // r4
void (__fastcall *v125)(int, _BYTE *); // r4
float *v126; // r0
float *v128; // [sp+18h] [bp-1E4h]
cocos2d::CCDirector *v129; // [sp+1Ch] [bp-1E0h]
char *v131; // [sp+20h] [bp-1DCh]
char *v132; // [sp+20h] [bp-1DCh]
char *v134; // [sp+2Ch] [bp-1D0h]
int v135; // [sp+34h] [bp-1C8h]
float v136[2]; // [sp+3Ch] [bp-1C0h] BYREF
_DWORD v137[2]; // [sp+44h] [bp-1B8h] BYREF
_BYTE v138[8]; // [sp+4Ch] [bp-1B0h] BYREF
float v139[2]; // [sp+54h] [bp-1A8h] BYREF
char v140[4]; // [sp+5Ch] [bp-1A0h] BYREF
float v141; // [sp+60h] [bp-19Ch]
int v142[2]; // [sp+64h] [bp-198h] BYREF
char *v143; // [sp+6Ch] [bp-190h]
int v144; // [sp+70h] [bp-18Ch] BYREF
unsigned int v145; // [sp+74h] [bp-188h]
char *v146; // [sp+78h] [bp-184h]
int v147[3]; // [sp+7Ch] [bp-180h] BYREF
int v148[3]; // [sp+88h] [bp-174h] BYREF
int v149[3]; // [sp+94h] [bp-168h] BYREF
int v150[3]; // [sp+A0h] [bp-15Ch] BYREF
int v151[3]; // [sp+ACh] [bp-150h] BYREF
int v152[3]; // [sp+B8h] [bp-144h] BYREF
int v153[3]; // [sp+C4h] [bp-138h] BYREF
int v154[3]; // [sp+D0h] [bp-12Ch] BYREF
int v155[3]; // [sp+DCh] [bp-120h] BYREF
int v156[3]; // [sp+E8h] [bp-114h] BYREF
int v157[3]; // [sp+F4h] [bp-108h] BYREF
int v158[3]; // [sp+100h] [bp-FCh] BYREF
int v159[3]; // [sp+10Ch] [bp-F0h] BYREF
int v160[3]; // [sp+118h] [bp-E4h] BYREF
int v161[3]; // [sp+124h] [bp-D8h] BYREF
int v162[3]; // [sp+130h] [bp-CCh] BYREF
int v163[3]; // [sp+13Ch] [bp-C0h] BYREF
int v164[3]; // [sp+148h] [bp-B4h] BYREF
int v165[3]; // [sp+154h] [bp-A8h] BYREF
int v166[3]; // [sp+160h] [bp-9Ch] BYREF
int v167[3]; // [sp+16Ch] [bp-90h] BYREF
int v168[3]; // [sp+178h] [bp-84h] BYREF
int v169[3]; // [sp+184h] [bp-78h] BYREF
int v170[3]; // [sp+190h] [bp-6Ch] BYREF
int v171[3]; // [sp+19Ch] [bp-60h] BYREF
int v172[3]; // [sp+1A8h] [bp-54h] BYREF
int v173[2]; // [sp+1B4h] [bp-48h] BYREF
char *v174; // [sp+1BCh] [bp-40h]
int v175[3]; // [sp+1C0h] [bp-3Ch] BYREF
int v176; // [sp+1CCh] [bp-30h] BYREF
int v177; // [sp+1D0h] [bp-2Ch]
char *v178; // [sp+1D4h] [bp-28h]
int v179[3]; // [sp+1D8h] [bp-24h] BYREF
_BYTE v180[16]; // [sp+1E4h] [bp-18h] BYREF
v7 = (cocos2d::CCDirector *)cocos2d::CCNodeRGBA::init(this);
v129 = v7;
if ( !v7 )
return v129;
cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v136);
v180[0] = 0;
v180[1] = 0;
v180[2] = 0;
v180[3] = 0;
v8 = cocos2d::CCLayerColor::create(v180, 0, 0);
v9 = *(_DWORD *)this;
*((_DWORD *)this + 70) = v8;
(*(void (__fastcall **)(AchievementBar *, int))(v9 + 228))(this, v8);
v10 = *((_DWORD *)this + 70);
v11 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, v136[0] * 0.5, 40.0);
v11(v10, v180);
if ( a5 )
v12 = "GJ_square02.png";
else
v12 = "GJ_square01.png";
v142[0] = 0;
v142[1] = 0;
v143 = nullptr;
std::string::__init(v142, v12, 0xFu);
if ( (v142[0] & 1) != 0 )
v13 = v143;
else
v13 = (char *)v142 + 1;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v180, 0.0, 0.0, 80.0, 80.0);
v14 = cocos2d::extension::CCScale9Sprite::create(v13, v180);
v15 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v14 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v180, 300.0, 80.0);
v15(v14, v180);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 70) + 232))(*((_DWORD *)this + 70), v14, 1);
*((_DWORD *)this + 73) = v14;
v17 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"achievementGlow_001.png", v16);
*((_DWORD *)this + 75) = v17;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 80))(v17, 1082130432);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 70) + 232))(
*((_DWORD *)this + 70),
*((_DWORD *)this + 75),
-1);
v137[0] = 770;
v137[1] = 1;
(*(void (__fastcall **)(_DWORD, int, int, _DWORD *))(**((_DWORD **)this + 75) + 540))(
*((_DWORD *)this + 75),
770,
1,
v137);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v138, 40.0, 40.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v180, 0.0, 0.0, 80.0, 80.0);
v18 = (cocos2d::extension::CCScale9Sprite *)cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v180);
v19 = *(void (__fastcall **)(cocos2d::extension::CCScale9Sprite *, _BYTE *))(*(_DWORD *)v18 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v180, 300.0, 80.0);
v19(v18, v180);
(*(void (__fastcall **)(_DWORD, cocos2d::extension::CCScale9Sprite *, int))(**((_DWORD **)this + 70) + 232))(
*((_DWORD *)this + 70),
v18,
100);
v20 = *(void (__fastcall **)(cocos2d::extension::CCScale9Sprite *, int))(*(_DWORD *)v18 + 92);
v21 = (*(int (__fastcall **)(int))(*(_DWORD *)v14 + 96))(v14);
v20(v18, v21);
(*(void (__fastcall **)(cocos2d::extension::CCScale9Sprite *, _DWORD))(*(_DWORD *)v18 + 456))(v18, 0);
cocos2d::extension::CCScale9Sprite::setBlendAdditive(v18, 1);
*((_DWORD *)this + 74) = v18;
v128 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"playerSquare_001.png", v22);
if ( a5 )
{
v24 = (int *)cocos2d::CCSprite::createWithSpriteFrameName(a4, v23);
v25 = *(void (__fastcall **)(int *, _DWORD))(*v24 + 80);
v26 = (float *)(*(int (__fastcall **)(int *))(*v24 + 164))(v24);
v25(v24, 30.0 / *v26);
v27 = a3;
v28 = 0.0;
goto LABEL_86;
}
if ( !a4 )
{
LABEL_110:
v28 = 0.0;
v27 = nullptr;
goto LABEL_85;
}
v144 = 0;
v145 = 0;
v146 = nullptr;
v29 = strlen((const char *)a4);
v30 = (cocos2d::CCArray *)std::string::__init(&v144, a4, v29);
v31 = (cocos2d::CCArray *)cocos2d::CCArray::create(v30);
if ( (v144 & 1) == 0 )
{
v32 = (int)(unsigned __int8)v144 >> 1;
if ( !v32 )
{
v38 = -1;
goto LABEL_24;
}
v33 = (unsigned __int8 *)&v144 + 1;
LABEL_13:
v34 = &v33[v32];
v35 = v33;
while ( 1 )
{
v36 = v35;
if ( v35 == v34 )
break;
v37 = *v35++;
if ( v37 == 95 )
{
v38 = v36 - v33;
goto LABEL_18;
}
}
v38 = -1;
LABEL_18:
if ( (v144 & 1) != 0 )
goto LABEL_21;
LABEL_24:
v39 = (int)(unsigned __int8)v144 >> 1;
goto LABEL_25;
}
v32 = v145;
v33 = (unsigned __int8 *)v146;
if ( v145 )
goto LABEL_13;
v38 = -1;
LABEL_21:
v39 = v145;
LABEL_25:
v40 = 0;
while ( 1 )
{
v41 = v38 - v40;
v176 = 0;
v177 = 0;
v178 = nullptr;
if ( (v144 & 1) != 0 )
{
v42 = v145;
if ( v40 > v145 )
goto LABEL_30;
v44 = v146;
}
else
{
v42 = (int)(unsigned __int8)v144 >> 1;
if ( v40 > v42 )
{
LABEL_30:
exception = (std::logic_error *)_cxa_allocate_exception(8u);
std::logic_error::logic_error(exception, "basic_string");
*(_DWORD *)exception = &off_D1548C;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::length_error::~length_error);
}
v44 = (char *)&v144 + 1;
}
v45 = v42 - v40;
v46 = &v44[v40];
if ( v41 >= v45 )
v41 = v45;
std::string::__init(&v176, v46, v41);
if ( (v176 & 1) != 0 )
{
if ( v177 || v40 != v39 )
{
v47 = v178;
LABEL_44:
v134 = v47;
memset(v179, 0, sizeof(v179));
v48 = strlen(v47);
std::string::__init(v179, v134, v48);
v49 = (cocos2d::CCObject *)cocos2d::CCString::create(v179);
cocos2d::CCArray::addObject(v31, v49);
std::string::~string((int)v179);
}
}
else if ( (unsigned __int8)v176 >> 1 || v40 != v39 )
{
v47 = (char *)&v176 + 1;
goto LABEL_44;
}
if ( v38 == -1 )
break;
v40 = v38 + 1;
if ( (v144 & 1) != 0 )
{
v50 = (unsigned __int8 *)v146;
v51 = v145;
}
else
{
v51 = (int)(unsigned __int8)v144 >> 1;
v50 = (unsigned __int8 *)&v144 + 1;
}
if ( v40 < v51 )
{
v52 = &v50[v40];
v53 = &v50[v51];
while ( 1 )
{
v54 = v52;
if ( v52 == v53 )
break;
v55 = *v52++;
if ( v55 == 95 )
{
v38 = v54 - v50;
goto LABEL_54;
}
}
}
v38 = -1;
LABEL_54:
std::string::~string((int)&v176);
}
std::string::~string((int)&v176);
std::string::~string((int)&v144);
if ( cocos2d::CCArray::count(v31) <= 1u )
goto LABEL_110;
v56 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v31, 0);
CString = (const char *)cocos2d::CCString::getCString(v56);
v58 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v31, 1u);
v59 = cocos2d::CCString::intValue(v58);
memset(v147, 0, sizeof(v147));
v60 = strlen(CString);
std::string::__init(v147, CString, v60);
memset(v148, 0, sizeof(v148));
std::string::__init(v148, "ship", 4u);
v61 = sub_536EA6((unsigned __int8 *)v147, (unsigned __int8 *)v148);
std::string::~string((int)v148);
std::string::~string((int)v147);
if ( v61 )
{
v86 = 4;
v87 = "Ship";
goto LABEL_83;
}
memset(v149, 0, sizeof(v149));
v62 = strlen(CString);
std::string::__init(v149, CString, v62);
memset(v150, 0, sizeof(v150));
std::string::__init(v150, "ball", 4u);
v63 = sub_536EA6((unsigned __int8 *)v149, (unsigned __int8 *)v150);
std::string::~string((int)v150);
std::string::~string((int)v149);
if ( v63 )
{
v86 = 5;
v87 = "Ball";
goto LABEL_83;
}
memset(v151, 0, sizeof(v151));
v64 = strlen(CString);
std::string::__init(v151, CString, v64);
memset(v152, 0, sizeof(v152));
std::string::__init(v152, "bird", 4u);
v65 = sub_536EA6((unsigned __int8 *)v151, (unsigned __int8 *)v152);
std::string::~string((int)v152);
std::string::~string((int)v151);
if ( v65 )
{
v86 = 6;
v28 = -8.0;
v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Unlocked new %s!", "UFO");
}
else
{
memset(v153, 0, sizeof(v153));
v66 = strlen(CString);
std::string::__init(v153, CString, v66);
memset(v154, 0, sizeof(v154));
std::string::__init(v154, "dart", 4u);
v67 = sub_536EA6((unsigned __int8 *)v153, (unsigned __int8 *)v154);
std::string::~string((int)v154);
std::string::~string((int)v153);
if ( v67 )
{
v86 = 7;
v87 = "Wave";
}
else
{
memset(v155, 0, sizeof(v155));
v68 = strlen(CString);
std::string::__init(v155, CString, v68);
memset(v156, 0, sizeof(v156));
std::string::__init(v156, "robot", 5u);
v69 = sub_536EA6((unsigned __int8 *)v155, (unsigned __int8 *)v156);
std::string::~string((int)v156);
std::string::~string((int)v155);
if ( v69 )
{
v86 = 8;
v87 = "Robot";
}
else
{
memset(v157, 0, sizeof(v157));
v70 = strlen(CString);
std::string::__init(v157, CString, v70);
memset(v158, 0, sizeof(v158));
std::string::__init(v158, "spider", 6u);
v71 = sub_536EA6((unsigned __int8 *)v157, (unsigned __int8 *)v158);
std::string::~string((int)v158);
std::string::~string((int)v157);
if ( v71 )
{
v86 = 9;
v87 = "Spider";
}
else
{
memset(v159, 0, sizeof(v159));
v72 = strlen(CString);
std::string::__init(v159, CString, v72);
memset(v160, 0, sizeof(v160));
std::string::__init(v160, "death", 5u);
v73 = sub_536EA6((unsigned __int8 *)v159, (unsigned __int8 *)v160);
std::string::~string((int)v160);
std::string::~string((int)v159);
if ( v73 )
{
v86 = 11;
v87 = "Death Effect";
}
else
{
memset(v161, 0, sizeof(v161));
v74 = strlen(CString);
std::string::__init(v161, CString, v74);
memset(v162, 0, sizeof(v162));
std::string::__init(v162, "special", 7u);
v75 = sub_536EA6((unsigned __int8 *)v161, (unsigned __int8 *)v162);
std::string::~string((int)v162);
std::string::~string((int)v161);
if ( v75 )
{
v86 = 10;
v87 = "Trail";
}
else
{
memset(v163, 0, sizeof(v163));
v76 = strlen(CString);
std::string::__init(v163, CString, v76);
memset(v164, 0, sizeof(v164));
std::string::__init(v164, "color", 5u);
v77 = sub_536EA6((unsigned __int8 *)v163, (unsigned __int8 *)v164);
std::string::~string((int)v164);
std::string::~string((int)v163);
if ( v77 )
{
v86 = 2;
v87 = "Main Color";
}
else
{
memset(v165, 0, sizeof(v165));
v78 = strlen(CString);
std::string::__init(v165, CString, v78);
memset(v166, 0, sizeof(v166));
std::string::__init(v166, "color2", 6u);
v79 = sub_536EA6((unsigned __int8 *)v165, (unsigned __int8 *)v166);
std::string::~string((int)v166);
std::string::~string((int)v165);
if ( v79 )
{
v86 = 3;
v87 = "Secondary Color";
}
else
{
memset(v167, 0, sizeof(v167));
v80 = strlen(CString);
std::string::__init(v167, CString, v80);
memset(v168, 0, sizeof(v168));
std::string::__init(v168, "swing", 5u);
v81 = sub_536EA6((unsigned __int8 *)v167, (unsigned __int8 *)v168);
std::string::~string((int)v168);
std::string::~string((int)v167);
if ( v81 )
{
v86 = 13;
v87 = "Swing";
}
else
{
memset(v169, 0, sizeof(v169));
v82 = strlen(CString);
std::string::__init(v169, CString, v82);
memset(v170, 0, sizeof(v170));
std::string::__init(v170, "jetpack", 7u);
v83 = sub_536EA6((unsigned __int8 *)v169, (unsigned __int8 *)v170);
std::string::~string((int)v170);
std::string::~string((int)v169);
if ( v83 )
{
v86 = 14;
v87 = "Jetpack";
}
else
{
memset(v171, 0, sizeof(v171));
v84 = strlen(CString);
std::string::__init(v171, CString, v84);
memset(v172, 0, sizeof(v172));
std::string::__init(v172, "shipfire", 8u);
v85 = sub_536EA6((unsigned __int8 *)v171, (unsigned __int8 *)v172);
std::string::~string((int)v172);
std::string::~string((int)v171);
if ( v85 )
{
v86 = 15;
v87 = "Ship Fire";
}
else
{
v86 = 1;
v87 = "Icon";
}
}
}
}
}
}
}
}
}
}
LABEL_83:
v28 = 0.0;
v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Unlocked new %s!", v87);
}
v27 = (const char *)cocos2d::CCString::getCString(v88);
LOWORD(v135) = -20561;
BYTE2(v135) = -81;
v24 = GJItemIcon::create(v86, v59, v135, 255, 0, 0, 1);
if ( !v24 )
LABEL_85:
v24 = (int *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_achImage_001.png", v23);
LABEL_86:
(*(void (__fastcall **)(int *, _BYTE *))(*v24 + 92))(v24, v138);
v89 = (cocos2d::CCNode *)(*(int (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 70) + 232))(
*((_DWORD *)this + 70),
v24,
3);
*((_DWORD *)this + 76) = v24;
v90 = cocos2d::CCNode::create(v89);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 70) + 232))(*((_DWORD *)this + 70), v90, 2);
if ( a5 )
{
v91 = 0.8;
v92 = "goldFont.fnt";
}
else
{
v91 = 0.7;
v92 = "bigFont.fnt";
}
v173[0] = 0;
v173[1] = 0;
v174 = nullptr;
v93 = strlen(v92);
std::string::__init(v173, v92, v93);
if ( (v173[0] & 1) != 0 )
v95 = v174;
else
v95 = (char *)v173 + 1;
v96 = cocos2d::CCLabelBMFont::create(a2, v95, v94);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v90 + 228))(v90, v96);
v97 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v96 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, 0.0, 0.5);
v97(v96, v180);
(*(void (__fastcall **)(int, float))(*(_DWORD *)v96 + 80))(v96, COERCE_FLOAT(LODWORD(v91)));
*((_DWORD *)this + 77) = v96;
if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v96 + 164))(v96) > 200.0 )
{
v99 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v96 + 80);
v100 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v96 + 164))(v96);
v99(v96, 200.0 / *v100);
}
v98 = *(void (__fastcall **)(int, int))(*(_DWORD *)v96 + 80);
if ( v91 > (*(float (__fastcall **)(int))(*(_DWORD *)v96 + 84))(v96) )
v101 = (*(int (__fastcall **)(int))(*(_DWORD *)v96 + 84))(v96);
else
v101 = LODWORD(v91);
v98(v96, v101);
if ( !v27 )
v27 = a3;
memset(v175, 0, sizeof(v175));
v102 = strlen(v27);
std::string::__init(v175, v27, v102);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, 0.0, 1.0);
v103 = TextArea::create(
(int)v175,
"chatFont.fnt",
1065353216,
1130102784,
(const cocos2d::CCPoint *)v180,
1101004800,
0,
0);
std::string::~string((int)v175);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v90 + 228))(v90, v103);
v104 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v103 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, 0.0, 0.5);
v104(v103, v180);
v105 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v103 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, 0.0, 5.0);
v105(v103, v180);
*(_DWORD *)(v103 + 544) = 1098907648;
*((_DWORD *)this + 78) = v103;
v106 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v96 + 164))(v96) + 4);
v107 = (*(int (__fastcall **)(int))(*(_DWORD *)v103 + 164))(v103);
v131 = *(char **)(*(_DWORD *)v96 + 92);
v108 = *(float *)(v107 + 4) + 17.0;
v109 = (float)(v106 + v108) * 0.5;
v110 = v109 - (float)(v106 * 0.5);
v111 = v109 - (float)(v108 * 0.5);
v112 = v110;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 0.0, 1.0);
v113 = v139[0];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, 0.0, 1.0);
v114 = 2.5;
v115 = (float)(v112 + v141) + 2.0;
if ( !a5 )
v114 = 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, v113, v115 + v114);
((void (__fastcall *)(int, _BYTE *))v131)(v96, v180);
v132 = *(char **)(*(_DWORD *)v103 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 0.0, -1.0);
v116 = v139[0] + 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, 0.0, -1.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, v116, (float)((float)(15.0 - v111) + v141) - 1.0);
((void (__fastcall *)(int, _BYTE *))v132)(v103, v180);
(*(void (__fastcall **)(float *, float))(*(_DWORD *)v128 + 80))(v128, 1.0);
if ( !a5 )
(*(void (__fastcall **)(int *, int))(*v24 + 80))(v24, 1065353216);
v117 = v128[86];
v118 = v117 * COERCE_FLOAT((*(int (__fastcall **)(float *))(*(_DWORD *)v128 + 84))(v128));
v119 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v96 + 164))(v96);
v120 = (*(float (__fastcall **)(int))(*(_DWORD *)v96 + 84))(v96);
v121 = *(float *)(v103 + 576);
if ( (float)(v119 * v120) < v121 )
{
v123 = v121 + 5.0;
}
else
{
v122 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v96 + 164))(v96);
v123 = (float)(v122 * (*(float (__fastcall **)(int))(*(_DWORD *)v96 + 84))(v96)) + 5.0;
}
v124 = *(void (__fastcall **)(int *, _BYTE *))(*v24 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v180,
(float)(v118 * 0.5) - (float)((float)((float)((float)(v118 * 0.5) + v123) + 30.0) * 0.5),
v28);
v124(v24, v180);
v125 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v90 + 92);
v126 = (float *)(*(int (__fastcall **)(int *))(*v24 + 96))(v24);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, *v126 + 30.0, 0.0);
v125(v90, v180);
*((_DWORD *)this + 71) = 1118568448;
std::string::~string((int)v173);
std::string::~string((int)v142);
return v129;
}