//
// EditLevelLayer::setupLevelInfo from 0x4a0880 to 0x4a0e72 (1522 bytes)
//
// 1 xrefs:
// > EditLevelLayer::init @ 0x4a16ae
//
// 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:49:50 +0000
//
int __fastcall EditLevelLayer::setupLevelInfo(EditLevelLayer *this)
{
cocos2d::CCArray *WinSize; // r0
cocos2d::CCNode *v3; // r5
cocos2d::CCObject *v4; // r11
cocos2d::CCNode *v5; // r0
cocos2d::CCObject *v6; // r8
cocos2d::CCNode *v7; // r0
cocos2d::CCObject *v8; // r9
const char *v9; // r1
const char *v10; // r1
const char *v11; // r1
const char *v12; // r2
cocos2d::CCLabelBMFont *v13; // r0
cocos2d::CCObject *v14; // r6
void (__fastcall *v15)(cocos2d::CCObject *, _DWORD); // r7
float v16; // s15
cocos2d::CCLabelBMFont *v17; // r0
cocos2d::CCObject *v18; // r7
void (__fastcall *v19)(cocos2d::CCObject *, _DWORD); // r10
float v20; // s15
int v21; // r2
char *v22; // r1
const char *v23; // r2
cocos2d::CCLabelBMFont *v24; // r0
int v25; // r3
int *v26; // r1
_DWORD *v27; // r1
cocos2d::CCDirector *v28; // r0
float v29; // s17
cocos2d::CCDirector *v30; // r0
float v31; // r0
cocos2d::CCString *v32; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v34; // r2
int v35; // r6
int v36; // r3
int v37; // r1
int v38; // r3
cocos2d::CCString *v39; // r0
char *v40; // r1
int v41; // r3
const char *v42; // r2
const char *v43; // r3
cocos2d::CCString *v44; // r0
int v45; // r5
cocos2d::CCDirector *v46; // r0
float v47; // s16
cocos2d::CCDirector *v48; // r0
float v49; // r0
void (__fastcall *v50)(int, _BYTE *); // r9
void (__fastcall *v51)(int, _BYTE *); // r9
void (__fastcall *v52)(int, int); // r4
void (__fastcall *v53)(int, _DWORD); // r4
float *v54; // r0
int v55; // r1
cocos2d::CCObject *v57; // [sp+4h] [bp-50h]
cocos2d::CCLabelBMFont *v58; // [sp+8h] [bp-4Ch]
cocos2d::CCObject *v59; // [sp+Ch] [bp-48h]
cocos2d::CCObject *v60; // [sp+10h] [bp-44h]
void (__fastcall *v61)(cocos2d::CCObject *, _BYTE *); // [sp+18h] [bp-3Ch]
int v62; // [sp+1Ch] [bp-38h]
float v63[2]; // [sp+20h] [bp-34h] BYREF
_BYTE v64[8]; // [sp+28h] [bp-2Ch] BYREF
_BYTE v65[8]; // [sp+30h] [bp-24h] BYREF
_BYTE v66[8]; // [sp+38h] [bp-1Ch] BYREF
int v67[2]; // [sp+40h] [bp-14h] BYREF
cocos2d::CCLabelBMFont *v68; // [sp+48h] [bp-Ch]
cocos2d::CCDirector::sharedDirector(this);
WinSize = (cocos2d::CCArray *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v63);
v3 = (cocos2d::CCNode *)cocos2d::CCArray::create(WinSize);
v4 = (cocos2d::CCObject *)cocos2d::CCNode::create(v3);
v5 = (cocos2d::CCNode *)(*(int (__fastcall **)(EditLevelLayer *, cocos2d::CCObject *))(*(_DWORD *)this + 228))(
this,
v4);
v6 = (cocos2d::CCObject *)cocos2d::CCNode::create(v5);
v7 = (cocos2d::CCNode *)(*(int (__fastcall **)(EditLevelLayer *, cocos2d::CCObject *))(*(_DWORD *)this + 228))(
this,
v6);
v8 = (cocos2d::CCObject *)cocos2d::CCNode::create(v7);
(*(void (__fastcall **)(EditLevelLayer *, cocos2d::CCObject *))(*(_DWORD *)this + 228))(this, v8);
v59 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_timeIcon_001.png",
v9);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCObject *))(*(_DWORD *)v4 + 228))(v4, v59);
v60 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_noteIcon_001.png",
v10);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCObject *))(*(_DWORD *)v6 + 228))(v6, v60);
v57 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_infoIcon_001.png",
v11);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCObject *))(*(_DWORD *)v8 + 228))(v8, v57);
GJGameLevel::lengthKeyToString((GJGameLevel *)v67, *(_DWORD *)(*((_DWORD *)this + 87) + 724));
if ( (v67[0] & 1) != 0 )
v13 = v68;
else
v13 = (cocos2d::CCLabelBMFont *)((char *)v67 + 1);
v14 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v13, "bigFont.fnt", v12);
std::string::~string((int)v67);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCObject *))(*(_DWORD *)v4 + 228))(v4, v14);
v15 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v14 + 80);
if ( (float)(100.0 / *(float *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v14 + 164))(v14)) > 0.5 )
v16 = 0.5;
else
v16 = 100.0 / *(float *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v14 + 164))(v14);
v15(v14, LODWORD(v16));
GJGameLevel::getSongName((GJGameLevel *)v67);
if ( (v67[0] & 1) != 0 )
v17 = v68;
else
v17 = (cocos2d::CCLabelBMFont *)((char *)v67 + 1);
v18 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v17, "bigFont.fnt", (const char *)(LOBYTE(v67[0]) << 31));
std::string::~string((int)v67);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCObject *))(*(_DWORD *)v6 + 228))(v6, v18);
v19 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v18 + 80);
if ( (float)(100.0 / *(float *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v18 + 164))(v18)) > 0.5 )
v20 = 0.5;
else
v20 = 100.0 / *(float *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v18 + 164))(v18);
v19(v18, LODWORD(v20));
v67[0] = 0;
v67[1] = 0;
v68 = nullptr;
std::string::__init(v67, &unk_B6B226, 0);
v21 = *((_DWORD *)this + 87);
if ( *(_BYTE *)(v21 + 609) )
{
v22 = "Uploaded";
LABEL_15:
std::string::assign(v67, v22);
goto LABEL_16;
}
if ( *(_DWORD *)(v21 + 600) - *(_DWORD *)(v21 + 604) == 1 )
{
v22 = "Verified";
goto LABEL_15;
}
std::string::assign(v67, "Unverified");
if ( *(int *)(*((_DWORD *)this + 87) + 788) > 0 )
{
std::string::assign(v67, "Unverified\nReq. Coins: ");
v25 = *(_DWORD *)(*((_DWORD *)this + 87) + 832) - *(_DWORD *)(*((_DWORD *)this + 87) + 836);
if ( v25 != 1 )
{
std::string::append(v67, (char *)a1i2r3e45s789g);
v25 = 0;
}
v26 = *((int **)this + 87);
if ( v26[197] > 1 && v26[211] - v26[212] != 1 )
{
if ( !v25 )
std::string::append(v67, ", ");
std::string::append(v67, (char *)&a1i2r3e45s789g[2]);
v25 = 0;
}
v27 = *((_DWORD **)this + 87);
v23 = (const char *)v27[197];
if ( (int)v23 > 2 )
{
v23 = (const char *)(v27[214] - v27[215]);
if ( v23 != (_BYTE *)&dword_0 + 1 )
{
if ( !v25 )
std::string::append(v67, ", ");
std::string::append(v67, (char *)&a1i2r3e45s789g[4]);
}
}
}
LABEL_16:
if ( (v67[0] & 1) != 0 )
v24 = v68;
else
v24 = (cocos2d::CCLabelBMFont *)((char *)v67 + 1);
v58 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v24, "bigFont.fnt", v23);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCLabelBMFont *))(*(_DWORD *)v8 + 228))(v8, v58);
cocos2d::CCLabelBMFont::limitLabelWidth(v58, 100.0, 0.5, 0.0);
v61 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v57 + 92);
v62 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v57 + 96))(v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, 0.0, 2.0);
cocos2d::CCPoint::operator+(v66, v62, v65);
v61(v57, v66);
cocos2d::CCArray::removeAllObjects(v3);
cocos2d::CCArray::addObject(v3, v59);
cocos2d::CCArray::addObject(v3, v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (const cocos2d::CCPoint *)&unk_D2BA94);
GameToolbox::alignItemsHorisontally(*(float *)&v3, 4.0, (int)v66, 0);
cocos2d::CCArray::removeAllObjects(v3);
cocos2d::CCArray::addObject(v3, v60);
cocos2d::CCArray::addObject(v3, v18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (const cocos2d::CCPoint *)&unk_D2BA94);
GameToolbox::alignItemsHorisontally(*(float *)&v3, 4.0, (int)v66, 0);
cocos2d::CCArray::removeAllObjects(v3);
cocos2d::CCArray::addObject(v3, v57);
cocos2d::CCArray::addObject(v3, v58);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (const cocos2d::CCPoint *)&unk_D2BA94);
GameToolbox::alignItemsHorisontally(*(float *)&v3, 4.0, (int)v66, 0);
cocos2d::CCArray::removeAllObjects(v3);
cocos2d::CCArray::addObject(v3, v4);
cocos2d::CCArray::addObject(v3, v6);
v28 = (cocos2d::CCDirector *)cocos2d::CCArray::addObject(v3, v8);
v29 = v63[0] * 0.5;
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v28);
v31 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v30));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v29, v31 + 55.0);
GameToolbox::alignItemsHorisontally(*(float *)&v3, 140.0, (int)v66, 0);
v32 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Version: %i",
*(const char **)(*((_DWORD *)this + 87) + 612));
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v32);
v35 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v34);
(*(void (__fastcall **)(EditLevelLayer *, int))(*(_DWORD *)this + 228))(this, v35);
v36 = *((_DWORD *)this + 87);
v37 = *(_DWORD *)(v36 + 268);
v38 = *(_DWORD *)(v36 + 272);
if ( v37 == v38 )
{
v40 = "ID: na";
}
else
{
v39 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"ID: %i",
(const char *)(v37 - v38));
v40 = (char *)cocos2d::CCString::getCString(v39);
}
v41 = *((_DWORD *)this + 87);
v42 = *(const char **)(v41 + 812);
v43 = *(const char **)(v41 + 816);
if ( v42 != v43 )
{
v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s (%i)", v40, v42 - v43);
v40 = (char *)cocos2d::CCString::getCString(v44);
}
v45 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v40, "goldFont.fnt", v42);
v46 = (cocos2d::CCDirector *)(*(int (__fastcall **)(EditLevelLayer *, int))(*(_DWORD *)this + 228))(this, v45);
v47 = v63[0] * 0.5;
v48 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v46);
v49 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v48));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, v47, v49 + 14.0);
v50 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v35 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, -75.0, 0.0);
cocos2d::CCPoint::operator+(v66, v64, v65);
v50(v35, v66);
v51 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v45 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, 75.0, 0.0);
cocos2d::CCPoint::operator+(v66, v64, v65);
v51(v45, v66);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v35 + 80))(v35, 1058642330);
if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v45 + 164))(v45) > 150.0 )
{
v53 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v45 + 80);
v54 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v45 + 164))(v45);
v53(v45, 150.0 / *v54);
}
v52 = *(void (__fastcall **)(int, int))(*(_DWORD *)v45 + 80);
if ( (*(float (__fastcall **)(int))(*(_DWORD *)v45 + 84))(v45) < 0.6 )
v55 = (*(int (__fastcall **)(int))(*(_DWORD *)v45 + 84))(v45);
else
v55 = 1058642330;
v52(v45, v55);
return std::string::~string((int)v67);
}