//
// MusicDownloadManager::getSongInfoObject from 0x14033f140 to 0x14033f249 (265 bytes)
//
// 12 xrefs:
// > AudioAssetsBrowser::setupList @ 0x140083e7c
// > FindBPMLayer::create @ 0x14009ba37
// > FindBPMLayer::recordingDidStop @ 0x14009bce8
// > LevelCell::loadCustomLevelCell @ 0x1400af3d7
// > SongSelectNode::init @ 0x1400c75ef
// > CustomSongWidget::onMore @ 0x1400ca2a3
// > MusicDownloadManager::getSongInfo @ 0x14033d610
// > MusicDownloadManager::downloadSong @ 0x14033eab8
// > MusicDownloadManager::onDownloadSongCompleted @ 0x14033ee15
// > SongInfoObject::create_1 @ 0x14034474e
// > PlayLayer::setupHasCompleted @ 0x1403a6cb7
// > ??> @ 0x1406d56c0
//
// 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
//
// Hidden C++ exception states: #wind=1
SongInfoObject *MusicDownloadManager::getSongInfoObject(MusicDownloadManager *a1, int a2)
{
__int64 v2; // rdi
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // r8
SongInfoObject *v7; // rbx
void *v8; // rcx
cocos2d::CCDictionary *m_musicObjects; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v12; // [rsp+30h] [rbp-28h]
v2 = a2;
v4 = cocos2d::CCString::createWithFormat("%i", (unsigned int)a2);
CString = cocos2d::CCString::getCString(v4);
*(_OWORD *)Block = 0;
v12 = 0;
v6 = -1;
do
++v6;
while ( CString[v6] );
sub_14003A930(Block, CString, v6);
v7 = (SongInfoObject *)cocos2d::CCDictionary::objectForKey(a1->m_songObjects, Block);
if ( *((_QWORD *)&v12 + 1) > 0xFu )
{
v8 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
if ( v7 || (int)v2 <= 10000000 )
return v7;
m_musicObjects = a1->m_musicObjects;
if ( m_musicObjects )
return (SongInfoObject *)cocos2d::CCDictionary::objectForKey(m_musicObjects, v2);
else
return nullptr;
}