//
// CustomSongWidget::getSongInfoIfUnloaded from 0x1006fb220 to 0x1006fb2fe (222 bytes)
//
// 3 xrefs:
// > CustomSongLayer::init @ 0x1001f8e4f
// > CustomSongLayer::onSearch @ 0x1001f917f
// > AudioAssetsPopup::init @ 0x1008b3a10
//
// This function is hookable on this platform (idp: pc, 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 12:35:56 +0000
//
void __fastcall CustomSongWidget::getSongInfoIfUnloaded(__int64 a1)
{
__int64 v2; // rdi
__int64 v3; // rdi
__int64 v4; // rax
std::string __str; // [rsp+0h] [rbp-20h] BYREF
v2 = *(_QWORD *)(a1 + 336);
if ( v2 && *(_BYTE *)(v2 + 432) == 1 )
{
__str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;
strcpy(__str.__r_.__value_.__s.__data_, "Loading");
std::string::operator=((std::string *)(v2 + 320), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
CustomSongWidget::updateSongInfo(a1);
if ( *(_QWORD *)(a1 + 336) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 344LL))(*(_QWORD *)(a1 + 376), 0);
v3 = *(_QWORD *)(a1 + 480);
if ( v3 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 344LL))(v3, 0);
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::getSongInfo(v4, *(_DWORD *)(a1 + 504), 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 408) + 960LL))(*(_QWORD *)(a1 + 408), &unk_100A11C36);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 408) + 1056LL))(*(_QWORD *)(a1 + 408), 0);
}
}
}