//
// CustomSongWidget::updateWithMultiAssets from 0x3e08f4 to 0x3e0a66 (370 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::init @ 0x3b4afc
// > LevelInfoLayer::levelDownloadFinished @ 0x3b58aa
//
// 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 **__fastcall CustomSongWidget::updateWithMultiAssets(void **result, _DWORD *a2, _DWORD *a3, void *a4)
{
void **v6; // r4
_DWORD *v8; // r1
int v9; // r2
char *v10; // r5
MusicDownloadManager *v11; // r0
bool isSongDownloaded; // r10
int v13; // r2
char *v14; // r9
char *i; // r5
MusicDownloadManager *v16; // r0
bool isSFXDownloaded; // r11
int v18; // r2
char *v19; // [sp+8h] [bp-34h]
char *v20; // [sp+14h] [bp-28h] BYREF
int v21; // [sp+18h] [bp-24h] BYREF
char *v22; // [sp+1Ch] [bp-20h] BYREF
char *v23; // [sp+20h] [bp-1Ch]
int v24; // [sp+24h] [bp-18h]
char *v25; // [sp+28h] [bp-14h] BYREF
char *v26; // [sp+2Ch] [bp-10h]
int v27; // [sp+30h] [bp-Ch]
v6 = result;
if ( *((_BYTE *)result + 373) || *(_DWORD *)(*a2 - 12) || *(_DWORD *)(*a3 - 12) )
{
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
(int)(result + 94),
result[96]);
v6[97] = v6 + 95;
v6[98] = v6 + 95;
v8 = v6[102];
v6[96] = nullptr;
v6[99] = nullptr;
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
(int)(v6 + 100),
v8);
v6[109] = a4;
v6[102] = nullptr;
v6[103] = v6 + 101;
v6[104] = v6 + 101;
v6[105] = nullptr;
v22 = nullptr;
v23 = nullptr;
v24 = 0;
sub_3E033C(a2, (int)&v22, (int)(v6 + 101));
v25 = nullptr;
v26 = nullptr;
v27 = 0;
sub_3E033C(a3, (int)&v25, v9);
v10 = v22;
v19 = v23;
while ( v10 != v19 )
{
sub_775C20(&v20);
v21 = atoi(v20);
v11 = MusicDownloadManager::sharedState();
isSongDownloaded = MusicDownloadManager::isSongDownloaded(v11, v21);
*(_BYTE *)std::map::operator[](v6 + 94, &v21, v13) = isSongDownloaded;
sub_774008(&v20);
v10 += 4;
}
v14 = v26;
for ( i = v25; i != v14; i += 4 )
{
sub_775C20(&v20);
v21 = atoi(v20);
v16 = MusicDownloadManager::sharedState();
isSFXDownloaded = MusicDownloadManager::isSFXDownloaded(v16, v21);
*(_BYTE *)std::map::operator[](v6 + 100, &v21, v18) = isSFXDownloaded;
sub_774008(&v20);
}
CustomSongWidget::updateMultiAssetInfo((CustomSongWidget *)v6, 1);
std::vector::~vector((void **)&v25);
return std::vector::~vector((void **)&v22);
}
return result;
}