//
// CustomSFXWidget::onShowInfo from 0xb60828 to 0xb60e74 (1612 bytes)
//
// 3 xrefs:
// > ??> @ 0xe78b0
// > CustomSFXWidget::init @ 0xb5fa80
// > ??> @ 0x1546fc0
//
// 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 13:02:12 +0000
//
__int64 __fastcall CustomSFXWidget::onShowInfo(CustomSFXWidget *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
char v4; // w1
__int64 v5; // x2
__int64 v6; // x5
char v7; // w1
__int64 v8; // x0
MusicDownloadManager *v9; // x1
__int64 v10; // t2
int v11; // w19
unsigned __int64 v12; // x0
MusicDownloadManager *v13; // x0
MusicDownloadManager *CustomSFXObject; // x0
MusicDownloadManager *v15; // x0
char *v16; // x27
int v17; // w28
MusicDownloadManager *v18; // x1
char *v19; // x2
const char *v20; // x1
char *v21; // x3
cocos2d::CCString *v22; // x0
size_t v23; // x0
__int64 v24; // x19
char *v26; // x19
__int64 v27; // x0
size_t v28; // x27
size_t v29; // x0
char *v30; // x27
MusicDownloadManager *v31; // x2
char *v32; // x28
__int64 v33; // x0
MusicDownloadManager *v34; // x0
__int64 *SFXObject; // x0
const void *v36; // x1
size_t v37; // x2
MusicDownloadManager *v38; // x0
char *v39; // x0
char *v40; // x0
unsigned __int64 v41; // x19
unsigned __int64 v42; // x0
char *CString; // [xsp+68h] [xbp+68h]
__int64 v44; // [xsp+78h] [xbp+78h] BYREF
__int64 v45; // [xsp+80h] [xbp+80h]
void *v46; // [xsp+88h] [xbp+88h]
__int64 v47; // [xsp+90h] [xbp+90h] BYREF
MusicDownloadManager *v48; // [xsp+98h] [xbp+98h]
void *v49; // [xsp+A0h] [xbp+A0h]
__int64 v50[3]; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v51[3]; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v52; // [xsp+D8h] [xbp+D8h] BYREF
size_t v53; // [xsp+E0h] [xbp+E0h]
void *v54; // [xsp+E8h] [xbp+E8h]
__int64 v55; // [xsp+F0h] [xbp+F0h] BYREF
size_t v56; // [xsp+F8h] [xbp+F8h]
void *v57; // [xsp+100h] [xbp+100h]
v3 = *((_QWORD *)this + 42);
if ( !v3 )
return _stack_chk_guard;
v4 = *(_BYTE *)(v3 + 80);
v44 = 0;
v45 = 0;
v46 = nullptr;
if ( (v4 & 1) != 0 )
{
std::string::__init(&v44, *(void **)(v3 + 96), *(_QWORD *)(v3 + 88));
v47 = 0;
v3 = *((_QWORD *)this + 42);
v48 = nullptr;
v49 = nullptr;
v5 = v3 + 128;
if ( (*(_BYTE *)(v3 + 128) & 1) == 0 )
goto LABEL_4;
}
else
{
v46 = *(void **)(v3 + 96);
v5 = v3 + 128;
v6 = *(_QWORD *)(v3 + 88);
v7 = *(_BYTE *)(v3 + 128);
v44 = *(_QWORD *)(v3 + 80);
v45 = v6;
v47 = 0;
v48 = nullptr;
v49 = nullptr;
if ( (v7 & 1) == 0 )
{
LABEL_4:
v10 = v3 + 128;
v8 = *(_QWORD *)(v3 + 128);
v9 = *(MusicDownloadManager **)(v10 + 8);
v49 = *(void **)(v5 + 16);
v47 = v8;
v48 = v9;
goto LABEL_5;
}
}
std::string::__init(&v47, *(void **)(v5 + 16), *(_QWORD *)(v5 + 8));
LABEL_5:
v11 = (unsigned __int8)v47;
if ( (v47 & 1) != 0 )
{
v12 = (unsigned __int64)v48;
if ( v48 )
goto LABEL_17;
if ( *(int *)(*((_QWORD *)this + 42) + 76LL) <= 0 )
{
LABEL_11:
if ( v12 )
goto LABEL_17;
goto LABEL_12;
}
}
else
{
if ( (int)(unsigned __int8)v47 >> 1 )
goto LABEL_37;
v12 = *(unsigned int *)(*((_QWORD *)this + 42) + 76LL);
if ( (int)v12 <= 0 )
{
LABEL_36:
v12 = (unsigned int)(v11 >> 1);
if ( !(_DWORD)v12 )
{
LABEL_12:
v15 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v12);
MusicDownloadManager::getSFXFolderPathForID(v15, *(_DWORD *)(*((_QWORD *)this + 42) + 60LL), 0, v51);
if ( (v47 & 1) != 0 )
{
*(_BYTE *)v49 = 0;
v48 = nullptr;
}
else
{
LOWORD(v47) = 0;
}
std::string::reserve(&v47, 0);
v47 = v51[0];
v48 = (MusicDownloadManager *)v51[1];
v49 = (void *)v51[2];
goto LABEL_15;
}
LABEL_37:
v12 = (unsigned __int8)v11 >> 1;
v16 = (char *)&v47 + 1;
if ( v12 <= 2 )
goto LABEL_18;
goto LABEL_38;
}
}
v13 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v12);
CustomSFXObject = (MusicDownloadManager *)MusicDownloadManager::getCustomSFXObject(
v13,
*(_DWORD *)(*((_QWORD *)this + 42) + 76LL));
if ( *((MusicDownloadManager **)this + 42) != CustomSFXObject )
{
v11 = (unsigned __int8)v47;
if ( (v47 & 1) != 0 )
{
v12 = (unsigned __int64)v48;
goto LABEL_11;
}
goto LABEL_36;
}
v34 = (MusicDownloadManager *)MusicDownloadManager::sharedState(CustomSFXObject);
SFXObject = (__int64 *)MusicDownloadManager::getSFXObject(v34, *(_DWORD *)(*((_QWORD *)this + 42) + 56LL));
if ( SFXObject && &v44 != SFXObject + 10 )
{
if ( (SFXObject[10] & 1) != 0 )
{
v36 = (const void *)SFXObject[12];
v37 = SFXObject[11];
}
else
{
v36 = (char *)SFXObject + 81;
v37 = *((_BYTE *)SFXObject + 80) >> 1;
}
SFXObject = std::string::assign(&v44, v36, v37);
}
v38 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)SFXObject);
MusicDownloadManager::getCustomSFXLocationText(v38, *((SFXInfoObject **)this + 42), v50);
if ( (v47 & 1) != 0 )
{
*(_BYTE *)v49 = 0;
v48 = nullptr;
}
else
{
LOWORD(v47) = 0;
}
std::string::reserve(&v47, 0);
v49 = (void *)v50[2];
v47 = v50[0];
v48 = (MusicDownloadManager *)v50[1];
LABEL_15:
v11 = (unsigned __int8)v47;
if ( (v47 & 1) == 0 )
goto LABEL_37;
v12 = (unsigned __int64)v48;
LABEL_17:
v16 = (char *)v49;
if ( v12 <= 2 )
{
LABEL_18:
v17 = v11 & 1;
goto LABEL_19;
}
LABEL_38:
v26 = &v16[v12];
v27 = std::__search(
(__int64)v16,
(__int64)&v16[v12],
" / ",
(unsigned __int8 *)"",
(unsigned __int8 (__fastcall *)(__int64, _QWORD))std::char_traits::eq);
if ( v26 == (char *)v27 || (v28 = v27 - (_QWORD)v16, v28 == -1) )
{
LABEL_46:
v11 = (unsigned __int8)v47;
v17 = v47 & 1;
}
else
{
while ( 1 )
{
std::string::replace(&v47, v28, 3u, " \\ ", 3u);
v29 = v28 + 3;
v17 = v47 & 1;
if ( v17 )
{
v30 = (char *)v49;
v31 = v48;
}
else
{
v31 = (MusicDownloadManager *)((unsigned __int8)v47 >> 1);
v30 = (char *)&v47 + 1;
}
if ( v29 > (unsigned __int64)v31 || (unsigned __int64)v31 - v29 <= 2 )
break;
v32 = (char *)v31 + (_QWORD)v30;
v33 = std::__search(
(__int64)&v30[v29],
(__int64)v31 + (_QWORD)v30,
" / ",
(unsigned __int8 *)"",
(unsigned __int8 (__fastcall *)(__int64, _QWORD))std::char_traits::eq);
if ( v32 != (char *)v33 )
{
v28 = v33 - (_QWORD)v30;
if ( v28 != -1 )
continue;
}
goto LABEL_46;
}
v11 = (unsigned __int8)v47;
}
LABEL_19:
if ( !v17 )
{
v18 = (MusicDownloadManager *)(v11 >> 1);
if ( v11 >> 1 <= 2 )
{
v20 = (const char *)*(unsigned int *)(*((_QWORD *)this + 42) + 56LL);
if ( (v44 & 1) == 0 )
{
v19 = (char *)&v44 + 1;
v21 = (char *)&v47 + 1;
goto LABEL_23;
}
goto LABEL_57;
}
LABEL_60:
v39 = (char *)v18 - 3;
if ( v18 < (MusicDownloadManager *)((char *)v18 - 3) )
sub_62F13C();
if ( v17 )
{
if ( memcmp(&v39[(_QWORD)v49], " \\ ", 3u) )
goto LABEL_65;
v40 = (char *)v48 - 3;
if ( (unsigned __int64)v48 >= 3 )
{
v48 = (MusicDownloadManager *)((char *)v48 - 3);
v40[(_QWORD)v49] = 0;
v17 = v47 & 1;
goto LABEL_65;
}
}
else
{
if ( memcmp(&v39[(_QWORD)&v47 + 1], " \\ ", 3u) )
{
v20 = (const char *)*(unsigned int *)(*((_QWORD *)this + 42) + 56LL);
if ( (v44 & 1) == 0 )
{
v19 = (char *)&v44 + 1;
v21 = (char *)&v47 + 1;
goto LABEL_23;
}
goto LABEL_57;
}
v41 = v11 >> 1;
v42 = v41 - 3;
if ( v41 >= v41 - 3 )
{
LOBYTE(v47) = 2 * v42;
*((_BYTE *)&v47 + v42 + 1) = 0;
v17 = v47 & 1;
LABEL_65:
v19 = (char *)&v44 + 1;
v20 = (const char *)*(unsigned int *)(*((_QWORD *)this + 42) + 56LL);
if ( (v44 & 1) == 0 )
{
LABEL_58:
v21 = (char *)&v47 + 1;
if ( !v17 )
goto LABEL_23;
goto LABEL_22;
}
LABEL_57:
v19 = (char *)v46;
goto LABEL_58;
}
}
sub_62F13C();
}
v18 = v48;
if ( (unsigned __int64)v48 > 2 )
goto LABEL_60;
v19 = (char *)&v44 + 1;
v20 = (const char *)*(unsigned int *)(*((_QWORD *)this + 42) + 56LL);
if ( (v44 & 1) != 0 )
{
v17 = 1;
goto LABEL_57;
}
LABEL_22:
v21 = (char *)v49;
LABEL_23:
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i: %s\n%s",
v20,
v19,
v21);
CString = (char *)cocos2d::CCString::getCString(v22);
v52 = 0;
v53 = 0;
v54 = nullptr;
v23 = strlen(CString);
std::string::__init(&v52, CString, v23);
v55 = 0;
v56 = 0;
v57 = nullptr;
if ( (v52 & 1) != 0 )
{
std::string::__init(&v55, v54, v53);
}
else
{
v57 = v54;
v55 = v52;
v56 = v53;
}
v24 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"Sound Info",
(char *)&v55,
(ButtonSprite *)"OK",
nullptr,
340.0);
if ( (v55 & 1) != 0 )
operator delete(v57);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v24 + 1312LL))(v24);
if ( (v52 & 1) != 0 )
operator delete(v54);
if ( (v47 & 1) != 0 )
operator delete(v49);
if ( (v44 & 1) != 0 )
operator delete(v46);
return _stack_chk_guard;
}