//
// CustomSongWidget::onSelect from 0x14016bc40 to 0x14016bccb (139 bytes)
//
// 2 xrefs:
// > CustomSongWidget::init @ 0x14016980a
// > ??> @ 0x140918140
//
// 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 11:27:29 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall CustomSongWidget::onSelect(__int64 a1)
{
__int64 result; // rax
void (__fastcall ***v3)(_QWORD, _QWORD); // rcx
void *v4; // [rsp+30h] [rbp+8h]
result = *(_QWORD *)(a1 + 336);
if ( result )
{
v3 = *(void (__fastcall ****)(_QWORD, _QWORD))(a1 + 488);
if ( v3 )
(**v3)(v3, *(unsigned int *)(result + 320));
result = CustomSongWidget::updateSongInfo(a1);
if ( *(_BYTE *)(a1 + 512) )
{
if ( !qword_14090C070 )
{
v4 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
}
return MusicDownloadManager::songStateChanged();
}
}
return result;
}