//
// GJRateLevelLayer::setupRateInfo from 0x567f14 to 0x56860e (1786 bytes)
//
// 1 xrefs:
// > GJRateLevelLayer::rateInfoFinished @ 0x56868e
//
// 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:29 +0000
//
int __fastcall GJRateLevelLayer::setupRateInfo(int a1, cocos2d::CCArray *a2)
{
cocos2d::CCString *v3; // r0
const char *CString; // r6
size_t v5; // r0
cocos2d::CCArray *v6; // r6
unsigned int v7; // r7
int v8; // r5
cocos2d::CCString *v9; // r0
const char *v10; // r0
int v11; // r0
unsigned int v12; // r8
float v13; // s14
float v14; // s16
const char *v15; // r1
cocos2d::CCString *v16; // r0
const char *v17; // r0
int v18; // r7
float v19; // s15
int v20; // r5
void (__fastcall *v21)(int, _DWORD); // r6
int v22; // r0
void (__fastcall *v23)(int, _BYTE *); // r3
void (__fastcall *v24)(int, _BYTE *); // r7
cocos2d::CCString *v25; // r0
const char *v26; // r0
const char *v27; // r5
size_t v28; // r0
cocos2d::CCArray *v29; // r7
unsigned int v30; // r6
int v31; // r5
cocos2d::CCString *v32; // r0
const char *v33; // r0
int v34; // r0
unsigned int v35; // r6
float v36; // s17
float v37; // s15
bool v38; // cc
cocos2d::CCString *v39; // r0
const char *v40; // r0
int v41; // r9
char *v42; // r1
float v43; // s15
int v44; // r3
float v45; // s10
float v46; // s9
float v47; // s11
float v48; // s13
cocos2d::CCString *v49; // r0
char *v50; // r0
const char *v51; // r2
cocos2d::CCLabelBMFont *v52; // r0
int v53; // r5
void (__fastcall *v54)(int, _BYTE *); // r6
void (__fastcall *v55)(int, _BYTE *); // r7
cocos2d::CCArray *v57; // [sp+30h] [bp-5Ch]
char v58; // [sp+54h] [bp-38h]
char v59; // [sp+54h] [bp-38h]
char v60; // [sp+58h] [bp-34h]
char v61; // [sp+58h] [bp-34h]
_BYTE v62[4]; // [sp+5Ch] [bp-30h] BYREF
float v63; // [sp+60h] [bp-2Ch]
_BYTE v64[8]; // [sp+64h] [bp-28h] BYREF
int v65[3]; // [sp+6Ch] [bp-20h] BYREF
int v66; // [sp+78h] [bp-14h] BYREF
int v67; // [sp+7Ch] [bp-10h]
cocos2d::CCLabelBMFont *v68; // [sp+80h] [bp-Ch]
v57 = sub_567D2C(a2, ":");
v3 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v57, 0);
v66 = 0;
v67 = 0;
v68 = nullptr;
CString = (const char *)cocos2d::CCString::getCString(v3);
v5 = strlen(CString);
std::string::__init(&v66, CString, v5);
v6 = sub_567D2C((cocos2d::CCArray *)&v66, ",");
std::string::~string((int)&v66);
v7 = 0;
v8 = 0;
while ( v7 < cocos2d::CCArray::count(v6) )
{
v9 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v6, v7++);
v10 = (const char *)cocos2d::CCString::getCString(v9);
v11 = atoi(v10);
if ( v8 < v11 )
v8 = v11;
}
v12 = 0;
v13 = (float)v8 * 10.0;
if ( v13 <= 100.0 )
v14 = 10.0;
else
v14 = 100.0 / (float)v8;
while ( v12 < cocos2d::CCArray::count(v6) )
{
v16 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v6, v12);
v17 = (const char *)cocos2d::CCString::getCString(v16);
v18 = atoi(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (float)(int)(15 * v12 - 120), -42.0);
cocos2d::CCPoint::operator+(v62, a1 + 772, v64);
v58 = -106;
v60 = 0;
GameToolbox::intToString((GameToolbox *)v65, v12 + 1);
if ( v18 <= 0 )
{
v58 = 83;
v60 = 55;
std::string::assign(v65, (char *)&unk_B6B226);
v18 = 1;
if ( v14 < 10.0 )
{
v19 = v14;
}
else
{
v19 = v14 * 0.5;
v13 = v63 - (float)((float)(v14 * 0.5) * 0.5);
}
if ( v14 >= 10.0 )
v63 = v13;
}
else
{
switch ( v12 )
{
case 0u:
v58 = 3;
break;
case 1u:
v58 = 0;
break;
case 2u:
v58 = 0;
break;
case 3u:
v58 = 94;
break;
case 4u:
v58 = -2;
break;
case 5u:
v58 = -1;
break;
case 6u:
v58 = -1;
break;
case 7u:
v58 = -1;
break;
case 8u:
v58 = -1;
break;
case 9u:
v58 = -1;
break;
default:
break;
}
v19 = v14;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (const cocos2d::CCPoint *)v62);
std::string::basic_string(&v66, (int)v65);
GJRateLevelLayer::createStatPillar(a1, 10, (int)v19, v18, v58, v60, (int)v64, (unsigned __int8 *)&v66);
std::string::~string((int)&v66);
std::string::~string((int)v65);
++v12;
}
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare60_001.png", v15);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 64))(v20, 1031127695);
v21 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v20 + 72);
v22 = (*(int (__fastcall **)(int))(*(_DWORD *)v20 + 164))(v20);
v21(v20, 110.0 / *(float *)(v22 + 4));
v23 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v20 + 480);
qmemcpy(v64, "N+", 2);
v64[2] = 24;
v23(v20, v64);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 456))(v20, 200);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v20, 3);
v24 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v20 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, 38.0, 0.0);
cocos2d::CCPoint::operator+(v64, a1 + 772, v62);
v24(v20, v64);
v25 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v57, 1u);
v26 = (const char *)cocos2d::CCString::getCString(v25);
v66 = 0;
v67 = 0;
v68 = nullptr;
v27 = v26;
v28 = strlen(v26);
std::string::__init(&v66, v27, v28);
v29 = sub_567D2C((cocos2d::CCArray *)&v66, ",");
std::string::~string((int)&v66);
v30 = 0;
v31 = 0;
while ( v30 < cocos2d::CCArray::count(v29) )
{
v32 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v29, v30++);
v33 = (const char *)cocos2d::CCString::getCString(v32);
v34 = atoi(v33);
if ( v31 < v34 )
v31 = v34;
}
v35 = 0;
v36 = (float)v31;
v37 = (float)v31 * 10.0;
v38 = v37 <= 100.0;
if ( v37 <= 100.0 )
v36 = 10.0;
else
v37 = 100.0;
if ( !v38 )
v36 = v37 / v36;
while ( v35 < cocos2d::CCArray::count(v29) )
{
v39 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v29, v35);
v40 = (const char *)cocos2d::CCString::getCString(v39);
v41 = atoi(v40);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (float)(int)(15 * v35 + 60), -42.0);
cocos2d::CCPoint::operator+(v62, a1 + 772, v64);
v59 = -106;
v61 = 0;
memset(v65, 0, sizeof(v65));
std::string::__init(v65, &unk_B6B226, 0);
if ( v41 <= 0 )
{
v59 = 83;
v61 = 55;
std::string::assign(v65, (char *)&unk_B6B226);
if ( v36 < 10.0 )
{
v43 = v36;
}
else
{
v43 = v36 * 0.5;
v63 = v63 - (float)((float)(v36 * 0.5) * 0.5);
}
v41 = 1;
}
else
{
switch ( v35 )
{
case 1u:
v59 = -1;
v42 = "F";
break;
case 2u:
v59 = -1;
v42 = "E";
break;
case 3u:
v59 = -1;
v42 = "L";
break;
case 4u:
v59 = 0;
v42 = "M";
break;
default:
v42 = "R";
break;
}
std::string::assign(v65, v42);
v43 = v36;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (const cocos2d::CCPoint *)v62);
std::string::basic_string(&v66, (int)v65);
GJRateLevelLayer::createStatPillar(a1, 10, (int)v43, v41, v59, v61, (int)v64, (unsigned __int8 *)&v66);
++v35;
std::string::~string((int)&v66);
std::string::~string((int)v65);
}
v66 = 0;
v67 = 0;
v68 = nullptr;
v44 = *(_DWORD *)(a1 + 728);
v45 = (float)*(int *)(v44 + 876);
if ( v45 <= 0.0 )
{
v49 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Req: %i",
*(const char **)(v44 + 868));
}
else
{
v46 = (float)*(int *)(v44 + 884);
v47 = (float)*(int *)(v44 + 888);
v48 = (float)*(int *)(v44 + 880);
v49 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"R: %i (%i- / %i+)\n%.1f | +%.1f | -%.1f | +-%.1f\nReq: %i",
(const char *)(int)v45,
(int)v47,
(int)v46,
(float)(v48 / v45),
(float)((float)(v48 - v47) / (float)(v45 - v47)),
(float)((float)(v48 - (float)(v46 * 10.0)) / (float)(v45 - v46)),
(float)((float)((float)(v48 - (float)(v46 * 10.0)) - v47)
/ (float)((float)(v45 - v46) - v47)),
*(_DWORD *)(v44 + 868));
}
v50 = (char *)cocos2d::CCString::getCString(v49);
std::string::assign(&v66, v50);
if ( (v66 & 1) != 0 )
v52 = v68;
else
v52 = (cocos2d::CCLabelBMFont *)((char *)&v66 + 1);
v53 = cocos2d::CCLabelBMFont::create(v52, "chatFont.fnt", v51);
v54 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v53 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, 0.0, 1.0);
v54(v53, v64);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v53 + 80))(v53, 1058642330);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v53 + 536))(v53, &unk_BED0BE);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v53 + 512))(v53, 225);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v53, 2);
v55 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v53 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, -130.0, 48.0);
cocos2d::CCPoint::operator+(v64, a1 + 772, v62);
v55(v53, v64);
return std::string::~string((int)&v66);
}