//
// AudioAssetsBrowser::onInfo from 0xa8eaf0 to 0xa8f370 (2176 bytes)
//
// 3 xrefs:
// > ??> @ 0xb9550
// > AudioAssetsBrowser::init @ 0xa8f9d4
// > ??> @ 0x122e698
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void AudioAssetsBrowser::onInfo(AudioAssetsBrowser *a1, cocos2d::CCObject *a2)
{
int *m_start; // x19
int *m_finish; // x28
__int64 v5; // x1
void *v6; // x0
unsigned int v7; // w20
MusicDownloadManager *v8; // x0
unsigned int *v9; // x1
int v10; // w2
int *v11; // x28
int *v12; // x19
__int64 v13; // x1
void *v14; // x0
unsigned int v15; // w20
MusicDownloadManager *v16; // x0
unsigned int *v17; // x1
int v18; // w2
FLAlertLayer *v19; // x19
void *v20; // x0
void *v21; // x0
void *v22; // x0
void *v23; // x0
void *v24; // x0
void *v25; // x0
unsigned int *v26; // x1
unsigned int *v27; // x1
unsigned int *v28; // x1
int v29; // w2
unsigned int *v30; // x1
int v31; // w2
unsigned int *v32; // x19
int v33; // w1
unsigned int *v34; // x1
int v35; // w2
unsigned int *v36; // x1
int v37; // w2
unsigned int *v38; // x1
int v39; // w2
__int64 v41; // [xsp+88h] [xbp+88h] BYREF
__int64 v42; // [xsp+90h] [xbp+90h] BYREF
__int64 v43; // [xsp+98h] [xbp+98h] BYREF
__int64 v44; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v45; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v46; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v47; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v48; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v49; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v50; // [xsp+D0h] [xbp+D0h] BYREF
sub_D153B8((int)&v41, &byte_F288A0);
sub_D153B8((int)&v42, &byte_F288A0);
sub_D153B8((int)&v43, &byte_F288A0);
sub_D153B8((int)&v44, &byte_F288A0);
m_start = a1->m_songsIds.m_start;
m_finish = a1->m_songsIds.m_finish;
if ( m_start != m_finish )
{
while ( 1 )
{
v7 = *m_start;
v8 = MusicDownloadManager::sharedState();
if ( MusicDownloadManager::isSongDownloaded(v8, v7) )
{
if ( *(_QWORD *)(v41 - 24) )
sub_D15FD4(&v41, ", ", 2);
GameToolbox::intToString(&v45, (GameToolbox *)v7);
sub_D15E14(&v41, &v45);
v5 = v45;
v6 = (void *)(v45 - 24);
if ( (__int64 *)(v45 - 24) == &qword_124B6B0 )
goto LABEL_6;
if ( &pthread_create )
{
v26 = (unsigned int *)(v45 - 8);
do
v10 = __ldaxr(v26);
while ( __stlxr(v10 - 1, v26) );
goto LABEL_14;
}
}
else
{
if ( *(_QWORD *)(v42 - 24) )
sub_D15FD4(&v42, ", ", 2);
GameToolbox::intToString(&v46, (GameToolbox *)v7);
sub_D15E14(&v42, &v46);
v5 = v46;
v6 = (void *)(v46 - 24);
if ( (__int64 *)(v46 - 24) == &qword_124B6B0 )
goto LABEL_6;
if ( &pthread_create )
{
v9 = (unsigned int *)(v46 - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
goto LABEL_14;
}
}
v10 = *(_DWORD *)(v5 - 8);
*(_DWORD *)(v5 - 8) = v10 - 1;
LABEL_14:
if ( v10 > 0 )
{
LABEL_6:
if ( m_finish == ++m_start )
break;
}
else
{
++m_start;
operator delete(v6);
if ( m_finish == m_start )
break;
}
}
}
v11 = a1->m_sfxIds.m_finish;
v12 = a1->m_sfxIds.m_start;
if ( v11 != v12 )
{
while ( 1 )
{
v15 = *v12;
v16 = MusicDownloadManager::sharedState();
if ( MusicDownloadManager::isSFXDownloaded(v16, v15) )
{
if ( *(_QWORD *)(v43 - 24) )
sub_D15FD4(&v43, ", ", 2);
GameToolbox::intToString(&v47, (GameToolbox *)v15);
sub_D15E14(&v43, &v47);
v13 = v47;
v14 = (void *)(v47 - 24);
if ( (__int64 *)(v47 - 24) == &qword_124B6B0 )
goto LABEL_21;
if ( &pthread_create )
{
v27 = (unsigned int *)(v47 - 8);
do
v18 = __ldaxr(v27);
while ( __stlxr(v18 - 1, v27) );
goto LABEL_29;
}
}
else
{
if ( *(_QWORD *)(v44 - 24) )
sub_D15FD4(&v44, ", ", 2);
GameToolbox::intToString(&v48, (GameToolbox *)v15);
sub_D15E14(&v44, &v48);
v13 = v48;
v14 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) == &qword_124B6B0 )
goto LABEL_21;
if ( &pthread_create )
{
v17 = (unsigned int *)(v48 - 8);
do
v18 = __ldaxr(v17);
while ( __stlxr(v18 - 1, v17) );
goto LABEL_29;
}
}
v18 = *(_DWORD *)(v13 - 8);
*(_DWORD *)(v13 - 8) = v18 - 1;
LABEL_29:
if ( v18 > 0 )
{
LABEL_21:
if ( v11 == ++v12 )
break;
}
else
{
++v12;
operator delete(v14);
if ( v11 == v12 )
break;
}
}
}
sub_D153B8((int)&v49, &byte_F288A0);
if ( !*(_QWORD *)(v41 - 24) )
{
if ( !*(_QWORD *)(v42 - 24) )
goto LABEL_33;
LABEL_54:
sub_D15FD4(&v49, "Missing Songs: ", 19);
sub_D15E14(&v49, &v42);
sub_D15FD4(&v49, "\n", 5);
if ( !*(_QWORD *)(v43 - 24) )
goto LABEL_34;
goto LABEL_55;
}
sub_D15FD4(&v49, "Songs: ", 11);
sub_D15E14(&v49, &v41);
sub_D15FD4(&v49, "\n", 5);
if ( *(_QWORD *)(v42 - 24) )
goto LABEL_54;
LABEL_33:
if ( !*(_QWORD *)(v43 - 24) )
goto LABEL_34;
LABEL_55:
sub_D15FD4(&v49, "SFX: ", 9);
sub_D15E14(&v49, &v43);
sub_D15FD4(&v49, "\n", 5);
LABEL_34:
if ( *(_QWORD *)(v44 - 24) )
{
sub_D15FD4(&v49, "Missing SFX: ", 17);
sub_D15E14(&v49, &v44);
sub_D15FD4(&v49, "", 4);
}
sub_D18D28(&v50);
v19 = FLAlertLayer::create(0, (__int64)"Audio Assets", (__int64)&v50);
v20 = (void *)(v50 - 24);
if ( (__int64 *)(v50 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v34 = (unsigned int *)(v50 - 8);
do
v35 = __ldaxr(v34);
while ( __stlxr(v35 - 1, v34) );
}
else
{
v35 = *(_DWORD *)(v50 - 8);
*(_DWORD *)(v50 - 8) = v35 - 1;
}
if ( v35 <= 0 )
operator delete(v20);
}
v19->show(v19);
v21 = (void *)(v49 - 24);
if ( (__int64 *)(v49 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v36 = (unsigned int *)(v49 - 8);
do
v37 = __ldaxr(v36);
while ( __stlxr(v37 - 1, v36) );
}
else
{
v37 = *(_DWORD *)(v49 - 8);
*(_DWORD *)(v49 - 8) = v37 - 1;
}
if ( v37 <= 0 )
operator delete(v21);
}
v22 = (void *)(v44 - 24);
if ( (__int64 *)(v44 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v38 = (unsigned int *)(v44 - 8);
do
v39 = __ldaxr(v38);
while ( __stlxr(v39 - 1, v38) );
}
else
{
v39 = *(_DWORD *)(v44 - 8);
*(_DWORD *)(v44 - 8) = v39 - 1;
}
if ( v39 <= 0 )
operator delete(v22);
}
v23 = (void *)(v43 - 24);
if ( (__int64 *)(v43 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v28 = (unsigned int *)(v43 - 8);
do
v29 = __ldaxr(v28);
while ( __stlxr(v29 - 1, v28) );
}
else
{
v29 = *(_DWORD *)(v43 - 8);
*(_DWORD *)(v43 - 8) = v29 - 1;
}
if ( v29 <= 0 )
operator delete(v23);
}
v24 = (void *)(v42 - 24);
if ( (__int64 *)(v42 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v30 = (unsigned int *)(v42 - 8);
do
v31 = __ldaxr(v30);
while ( __stlxr(v31 - 1, v30) );
}
else
{
v31 = *(_DWORD *)(v42 - 8);
*(_DWORD *)(v42 - 8) = v31 - 1;
}
if ( v31 <= 0 )
operator delete(v24);
}
v25 = (void *)(v41 - 24);
if ( (__int64 *)(v41 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v32 = (unsigned int *)(v41 - 8);
do
v33 = __ldaxr(v32);
while ( __stlxr(v33 - 1, v32) );
}
else
{
v33 = *(_DWORD *)(v41 - 8);
*(_DWORD *)(v41 - 8) = v33 - 1;
}
if ( v33 <= 0 )
operator delete(v25);
}
}