//
// sub_1005298E4 from 0x1005298e4 to 0x100529a10 (300 bytes)
//
// 2 xrefs:
// > sub_100527F18 @ 0x100528b0c
// > sub_100529B54 @ 0x100529b98
//
// This function is hookable on this platform (idp: arm, 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 11:07:16 +0000
//
_QWORD *__fastcall sub_1005298E4(_QWORD *result)
{
__int64 v1; // x29
__int64 v2; // x30
_QWORD *v3; // x19
__int64 v4; // x21
__int64 v5; // x0
int v6; // w20
void *v7; // x0
__int64 CString; // x0
__int64 v9; // x0
__int16 v10; // w8
_BOOL8 v11; // x1
const char *v12; // x20
__int64 v13; // x0
__int16 v14; // [xsp+1Ch] [xbp-34h] BYREF
char v15; // [xsp+1Eh] [xbp-32h]
__int64 v16; // [xsp+40h] [xbp-10h]
__int64 v17; // [xsp+48h] [xbp-8h]
if ( *((_DWORD *)result + 168) == 2 )
{
v16 = v1;
v17 = v2;
v3 = result;
v4 = result[97];
if ( v4 )
{
if ( result[90] )
{
v5 = MusicDownloadManager::sharedState();
v6 = sub_1001D650C(v5, (__int64)(v3 + 88));
v4 = v3[97];
}
else
{
v6 = 0;
}
v7 = sub_1003065B0("Saved with this level: %i/%i entries", v6, 1000);
CString = cocos2d::CCString::getCString((__int64)v7);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 928LL))(v4, CString);
cocos2d::CCLabelBMFont::limitLabelWidth(v3[97], 280.0, 0.5, 0.3);
v9 = v3[97];
if ( v6 >= 1001 )
{
v15 = 90;
v10 = 23295;
}
else
{
v10 = -1;
v15 = -1;
}
v14 = v10;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v9 + 1072LL))(v9, &v14);
result = (_QWORD *)v3[96];
if ( result )
{
v11 = v6 < 1001;
if ( v6 >= 1001 )
v12 = "GJ_button_04.png";
else
v12 = "GJ_button_01.png";
(*(void (__fastcall **)(_QWORD *, _BOOL8))(*result + 1056LL))(result, v11);
v13 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v3[96] + 1072LL))(v3[96]);
return ButtonSprite::updateBGImage(v13, (__int64)v12);
}
}
}
return result;
}