//
// EditorSoundConfigInfoLayer::missingSFXIDs from 0xcd2de4 to 0xcd30e8 (772 bytes)
//
// 3 xrefs:
// > EditorSoundConfigInfoLayer::onDownloadSFX @ 0xcd3114
// > EditorSoundConfigInfoLayer::downloadMissingSFX @ 0xcd336c
// > ??> @ 0xac618
//
// 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:06:28 +0000
//
_QWORD *__usercall EditorSoundConfigInfoLayer::missingSFXIDs@(
EditorSoundConfigInfoLayer *this@,
_QWORD *a2@)
{
__int64 v3; // x1
__int64 v4; // x2
char v5; // w0
__int64 v6; // x2
__int64 v7; // x0
__int64 v8; // x1
char *v9; // x25
unsigned __int64 v10; // x22
char *v11; // x2
__int64 v12; // x21
unsigned __int64 v13; // x19
char *v14; // x0
__int64 v15; // x1
MusicDownloadManager *v16; // x0
MusicDownloadManager *v17; // x0
_DWORD *v18; // x3
int *v19; // x5
__int64 v20; // x2
__int64 v21; // x0
__int64 v22; // x0
char *v23; // x1
char *v24; // x0
char *v25; // x3
int v27; // [xsp+54h] [xbp+54h] BYREF
void *v28; // [xsp+58h] [xbp+58h] BYREF
char *v29; // [xsp+60h] [xbp+60h]
__int64 v30; // [xsp+70h] [xbp+70h] BYREF
__int64 v31; // [xsp+78h] [xbp+78h]
void *v32; // [xsp+80h] [xbp+80h]
__int64 v33; // [xsp+88h] [xbp+88h]
a2[1] = 0;
a2[2] = 0;
v3 = _stack_chk_guard;
*a2 = 0;
v33 = v3;
v4 = *((_QWORD *)this + 136);
if ( !v4 || !*(_BYTE *)(v4 + 496) )
return a2;
v5 = *(_BYTE *)(v4 + 472);
v30 = 0;
v6 = v4 + 472;
v31 = 0;
v32 = nullptr;
if ( (v5 & 1) != 0 )
{
std::string::__init(&v30, *(void **)(v6 + 16), *(_QWORD *)(v6 + 8));
}
else
{
v7 = *(_QWORD *)v6;
v8 = *(_QWORD *)(v6 + 8);
v32 = *(void **)(v6 + 16);
v30 = v7;
v31 = v8;
}
EditorSFXManager::summarizeBlob((__int64)&v30, (__int64)&v28);
if ( (v30 & 1) != 0 )
operator delete(v32);
v9 = (char *)v28;
v10 = 0;
v11 = v29;
if ( !((v29 - (_BYTE *)v28) >> 5) )
goto LABEL_23;
do
{
v12 = 32 * v10;
v13 = 0;
v14 = &v9[32 * v10];
v15 = *((_QWORD *)v14 + 1);
if ( !((*((_QWORD *)v14 + 2) - v15) >> 2) )
goto LABEL_22;
do
{
v16 = (MusicDownloadManager *)*(unsigned int *)(v15 + 4 * v13);
v27 = (int)v16;
if ( (int)v16 <= 0 )
goto LABEL_20;
v17 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v16);
if ( (unsigned __int8)MusicDownloadManager::isSFXDownloaded(v17, v27) )
goto LABEL_32;
v18 = (_DWORD *)*a2;
v19 = (int *)a2[1];
v20 = ((__int64)v19 - *a2) >> 2;
if ( v20 )
{
v21 = 0;
if ( *v18 == v27 )
goto LABEL_32;
while ( ++v21 != v20 )
{
if ( v18[v21] == v27 )
goto LABEL_32;
}
}
if ( (int *)a2[2] == v19 )
{
std::vector::__push_back_slow_path((__int64)a2, &v27);
LABEL_32:
v9 = (char *)v28;
goto LABEL_20;
}
if ( v19 )
{
*v19 = v27;
v22 = a2[1];
}
else
{
v22 = 0;
}
v9 = (char *)v28;
a2[1] = v22 + 4;
LABEL_20:
++v13;
v15 = *(_QWORD *)&v9[v12 + 8];
}
while ( v13 < (*(_QWORD *)&v9[v12 + 16] - v15) >> 2 );
v11 = v29;
LABEL_22:
++v10;
}
while ( v10 < (v11 - v9) >> 5 );
LABEL_23:
if ( v9 )
{
while ( 1 )
{
v23 = v29;
if ( v29 == v9 )
break;
while ( 1 )
{
v29 = v23 - 32;
v24 = *((char **)v23 - 3);
if ( !v24 )
break;
v25 = *((char **)v23 - 2);
if ( v24 != v25 )
*((_QWORD *)v23 - 2) = &v25[4 * ~((unsigned __int64)(v25 - 4 - v24) >> 2)];
operator delete(v24);
v23 = v29;
if ( v29 == v9 )
goto LABEL_29;
}
}
LABEL_29:
operator delete(v28);
}
return a2;
}