//
// RetryLevelLayer::customSetup from 0x547670 to 0x547b58 (1256 bytes)
//
// 0 xrefs:
//
// 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:24 +0000
//
int __fastcall RetryLevelLayer::customSetup(const cocos2d::CCPoint **this)
{
GameManager *WinSize; // r0
int v3; // r5
int *v4; // r5
int v5; // r1
cocos2d::CCLabelBMFont *v6; // r2
cocos2d::CCLabelBMFont *v7; // r0
cocos2d::CCLabelBMFont *v8; // r7
void (__fastcall *v9)(cocos2d::CCLabelBMFont *, _DWORD *); // r8
GameManager *v10; // r0
int v11; // r0
cocos2d::CCString *v12; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v14; // r2
int v15; // r5
GameManager *v16; // r0
int v17; // s15
int v18; // r8
cocos2d::CCString *v19; // r0
const char *v20; // r0
cocos2d::CCString *v21; // r0
cocos2d::CCLabelBMFont *v22; // r0
const char *v23; // r2
int v24; // r8
void (__fastcall *v25)(int, _DWORD *); // r11
int v26; // r9
cocos2d::CCMenu *v27; // r0
const cocos2d::CCPoint *v28; // r0
const cocos2d::CCPoint *v29; // r11
const cocos2d::CCPoint *v30; // r8
const char *v31; // r1
int v32; // r0
int v33; // r8
const char *v34; // r1
int v35; // r0
int v36; // r9
PlatformToolbox *v37; // r0
const char *v38; // r1
int v39; // r11
const cocos2d::CCPoint *v40; // r10
void (__fastcall *v41)(int, _BYTE *); // r8
const char *v42; // r1
int v43; // r8
const cocos2d::CCPoint *v44; // r4
const cocos2d::CCPoint *v45; // r11
void (__fastcall *v46)(int, _BYTE *); // r4
cocos2d::CCPoint *v48; // [sp+8h] [bp-5Ch]
cocos2d::CCPoint *v49; // [sp+8h] [bp-5Ch]
cocos2d::CCPoint *v50; // [sp+8h] [bp-5Ch]
float v51; // [sp+10h] [bp-54h] BYREF
float v52; // [sp+14h] [bp-50h]
_BYTE v53[8]; // [sp+18h] [bp-4Ch] BYREF
_BYTE v54[8]; // [sp+20h] [bp-44h] BYREF
_BYTE v55[8]; // [sp+28h] [bp-3Ch] BYREF
_BYTE v56[8]; // [sp+30h] [bp-34h] BYREF
_BYTE v57[8]; // [sp+38h] [bp-2Ch] BYREF
_DWORD v58[2]; // [sp+40h] [bp-24h] BYREF
_DWORD v59[2]; // [sp+48h] [bp-1Ch] BYREF
int v60; // [sp+50h] [bp-14h] BYREF
int v61; // [sp+54h] [bp-10h]
cocos2d::CCLabelBMFont *v62; // [sp+58h] [bp-Ch]
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
WinSize = (GameManager *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v51);
v3 = *(_DWORD *)(*(_DWORD *)(GameManager::sharedState(WinSize) + 404) + 1408);
v60 = 0;
v61 = 0;
v62 = nullptr;
if ( (*(_BYTE *)(v3 + 280) & 1) != 0 )
{
std::string::__init(&v60, *(const void **)(v3 + 288), *(_DWORD *)(v3 + 284));
}
else
{
v4 = (int *)(v3 + 280);
v5 = v4[1];
v6 = (cocos2d::CCLabelBMFont *)v4[2];
v60 = *v4;
v61 = v5;
v62 = v6;
}
if ( (v60 & 1) != 0 )
v7 = v62;
else
v7 = (cocos2d::CCLabelBMFont *)((char *)&v60 + 1);
v8 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v7, "bigFont.fnt", (const char *)v6);
std::string::~string((int)&v60);
v9 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v8 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, v51 * 0.5, (float)((float)(v52 * 0.5) + 80.0) - 15.0);
v9(v8, v59);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), v8);
cocos2d::CCLabelBMFont::limitLabelWidth(v8, 320.0, 0.0, 0.0);
RetryLevelLayer::setupLastProgress((RetryLevelLayer *)this);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(*(_DWORD *)*(this + 116) + 284))(*(this + 116), 0, 1);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 116) + 284))(*(this + 116), 1, 1);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 114) + 172))(*(this + 114), 0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, 0.0, 5.0);
cocos2d::CCPoint::operator+(v59, this + 110, v58);
cocos2d::CCPoint::operator=(this + 110, v59);
v10 = (GameManager *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v53,
v51 * 0.5,
(float)((float)(v52 * 0.5) - 10.0) - 15.0);
v11 = GameManager::sharedState(v10);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Jumps: %i",
*(const char **)(*(_DWORD *)(v11 + 404) + 12084));
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v12);
v15 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v14);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 116) + 232))(*(this + 116), v15, 3);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 92))(v15, v53);
v16 = (GameManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v15 + 80))(v15, 1061997773);
v17 = (int)*(double *)(*(_DWORD *)(GameManager::sharedState(v16) + 404) + 784);
v18 = v17 / 60 % 60;
if ( v17 / 3600 )
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d:%02d:%02d",
(const char *)(v17 / 3600),
v18,
v17 % 60);
else
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d:%02d",
(const char *)v18,
v17 % 60);
v20 = (const char *)cocos2d::CCString::getCString(v19);
v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Time: %s", v20);
v22 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v21);
v24 = cocos2d::CCLabelBMFont::create(v22, "goldFont.fnt", v23);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 116) + 232))(*(this + 116), v24, 3);
v25 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 92);
v26 = (*(int (__fastcall **)(int))(*(_DWORD *)v15 + 96))(v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, 0.0, -24.0);
cocos2d::CCPoint::operator+(v59, v26, v58);
v25(v24, v59);
v27 = (cocos2d::CCMenu *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v24 + 80))(v24, 1061997773);
v28 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v27);
*(this + 121) = v28;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 116) + 232))(
*(this + 116),
v28,
1);
v29 = *(this + 116);
v30 = *(this + 121);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, v51 * 0.5, (float)((float)(v52 * 0.5) - 115.0) - 10.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v59, v29);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v54, v30);
v32 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_replayBtn_001.png", v31);
v58[0] = RetryLevelLayer::onReplay;
v58[1] = 0;
v33 = CCMenuItemSpriteExtra::create(v32, 0, (int)this, (int)RetryLevelLayer::onReplay, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 121) + 228))(*(this + 121), v33);
v48 = *(cocos2d::CCPoint **)(*(_DWORD *)v33 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, -100.0, 0.0);
cocos2d::CCPoint::operator+(v59, v54, v57);
((void (__fastcall *)(int, _DWORD *))v48)(v33, v59);
v35 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v34);
v59[0] = RetryLevelLayer::onMenu;
v59[1] = 0;
v36 = CCMenuItemSpriteExtra::create(v35, 0, (int)this, (int)RetryLevelLayer::onMenu, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 121) + 228))(*(this + 121), v36);
v49 = *(cocos2d::CCPoint **)(*(_DWORD *)v36 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 100.0, 0.0);
cocos2d::CCPoint::operator+(v57, v54, v56);
((void (__fastcall *)(int, _BYTE *))v49)(v36, v57);
v37 = (PlatformToolbox *)(*(int (__fastcall **)(_DWORD, char *))(*(_DWORD *)*(this + 116) + 92))(
*(this + 116),
(char *)this + 440);
if ( PlatformToolbox::isControllerConnected(v37) )
{
v39 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Start_001.png", v38);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 116) + 232))(*(this + 116), v39, 10);
v50 = *(this + 116);
v40 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v33 + 256))(v33);
(*(void (__fastcall **)(int))(*(_DWORD *)v33 + 96))(v33);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v57, v40);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v55, v50);
v41 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v39 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, -25.0);
cocos2d::CCPoint::operator+(v57, v55, v56);
v41(v39, v57);
v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_B_001.png", v42);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 116) + 232))(*(this + 116), v43, 10);
v44 = *(this + 116);
v45 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v36 + 256))(v36);
(*(void (__fastcall **)(int))(*(_DWORD *)v36 + 96))(v36);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v56, v45);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v57, v44);
cocos2d::CCPoint::operator=(v55, v57);
v46 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v43 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, -25.0);
cocos2d::CCPoint::operator+(v57, v55, v56);
v46(v43, v57);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1061997773);
}
v60 = 0;
v61 = 0;
v62 = nullptr;
std::string::__init(&v60, "Geometry Dash", 0xDu);
PlatformToolbox::tryShowRateDialog((int)&v60);
return std::string::~string((int)&v60);
}