//
// sub_1004F7D00 from 0x1004f7d00 to 0x1004f7ee3 (483 bytes)
//
// 1 xrefs:
// > RetryLevelLayer::customSetup @ 0x1004f7722
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:31:27 +0000
//
__int64 __fastcall sub_1004F7D00(__int64 a1)
{
__int64 v2; // rax
__int64 v3; // rax
char *ProgressBar; // r14
__int64 v5; // rax
__int64 CString; // rax
__int64 v7; // r12
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // r15
unsigned __int64 *v12; // rbx
char v14; // [rsp+0h] [rbp-40h]
char v15; // [rsp+0h] [rbp-40h]
unsigned __int64 v16; // [rsp+8h] [rbp-38h] BYREF
double v17; // [rsp+10h] [rbp-30h] BYREF
__int64 v18; // [rsp+18h] [rbp-28h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v18, v2);
v3 = GameManager::sharedState();
ProgressBar = GameToolbox::createProgressBar(*(_DWORD *)(*(_QWORD *)(v3 + 544) + 14640LL), 0xFF00u, 1.0);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 576) + 464LL))(
*(_QWORD *)(a1 + 576),
ProgressBar,
3);
sub_100278250((float *)&v17, *(float *)&v18 * 0.5, (float)((float)(*((float *)&v18 + 1) * 0.5) + 25.0) + -15.0);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)ProgressBar + 184LL))(ProgressBar, &v17);
GameManager::sharedState();
v5 = sub_10088E820("%i%%", v14);
CString = cocos2d::CCString::getCString(v5);
v7 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 576) + 464LL))(*(_QWORD *)(a1 + 576), v7, 4);
v8 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)ProgressBar + 192LL))(ProgressBar);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 184LL))(v7, v8);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 0.5);
GameManager::sharedState();
v9 = sub_10088E820("Attempt %i", v15);
v10 = cocos2d::CCString::getCString(v9);
v11 = cocos2d::CCLabelBMFont::create_3(v10, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 576) + 464LL))(*(_QWORD *)(a1 + 576), v11, 4);
v12 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)ProgressBar + 192LL))(ProgressBar);
sub_100278250((float *)&v16, 0.0, 23.0);
sub_100278350(&v17, v12, &v16);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v11 + 184LL))(v11, &v17);
return (*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.5);
}