//
// RetryLevelLayer::setupLastProgress from 0x547178 to 0x5472e4 (364 bytes)
//
// 1 xrefs:
// > RetryLevelLayer::customSetup @ 0x54775a
//
// 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::setupLastProgress(RetryLevelLayer *this)
{
GameManager *WinSize; // r0
int v3; // r0
int ProgressBar; // r4
int (__fastcall *v5)(int, _BYTE *); // r9
GameManager *v6; // r0
int v7; // r0
cocos2d::CCString *v8; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v10; // r2
int v11; // r6
void (__fastcall *v12)(int, int); // r10
int v13; // r0
GameManager *v14; // r0
int v15; // r0
cocos2d::CCString *v16; // r0
cocos2d::CCLabelBMFont *v17; // r0
const char *v18; // r2
int v19; // r6
void (__fastcall *v20)(int, _BYTE *); // r8
int v21; // r9
float v23[2]; // [sp+4h] [bp-1Ch] BYREF
_BYTE v24[8]; // [sp+Ch] [bp-14h] BYREF
_BYTE v25[8]; // [sp+14h] [bp-Ch] BYREF
cocos2d::CCDirector::sharedDirector(this);
WinSize = (GameManager *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v23);
v3 = GameManager::sharedState(WinSize);
ProgressBar = GameToolbox::createProgressBar(1065353216, *(const char **)(*(_DWORD *)(v3 + 404) + 12100), 65280);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), ProgressBar, 3);
v5 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)ProgressBar + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, v23[0] * 0.5, (float)((float)(v23[1] * 0.5) + 25.0) - 15.0);
v6 = (GameManager *)v5(ProgressBar, v25);
v7 = GameManager::sharedState(v6);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
*(const char **)(*(_DWORD *)(v7 + 404) + 12100));
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v8);
v11 = cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v10);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v11, 4);
v12 = *(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 92);
v13 = (*(int (__fastcall **)(int))(*(_DWORD *)ProgressBar + 96))(ProgressBar);
v12(v11, v13);
v14 = (GameManager *)(*(int (__fastcall **)(int, float))(*(_DWORD *)v11 + 80))(v11, 0.5);
v15 = GameManager::sharedState(v14);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Attempt %i",
*(const char **)(*(_DWORD *)(v15 + 404) + 10588));
v17 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v16);
v19 = cocos2d::CCLabelBMFont::create(v17, "bigFont.fnt", v18);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v19, 4);
v20 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v19 + 92);
v21 = (*(int (__fastcall **)(int))(*(_DWORD *)ProgressBar + 96))(ProgressBar);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 0.0, 23.0);
cocos2d::CCPoint::operator+(v25, v21, v24);
v20(v19, v25);
return (*(int (__fastcall **)(int, float))(*(_DWORD *)v19 + 80))(v19, 0.5);
}