//
// MusicDownloadManager::getSongInfoObject from 0x10064b9c0 to 0x10064bad9 (281 bytes)
//
// 12 xrefs:
// > SongSelectNode::init @ 0x1001fc796
// > LevelCell::loadCustomLevelCell @ 0x100238852
// > FindBPMLayer::init @ 0x10050ec7f
// > FindBPMLayer::recordingDidStop @ 0x10050ed6a
// > MusicDownloadManager::incrementPriorityForSong @ 0x10064b999
// > MusicDownloadManager::getSongInfo @ 0x10064bb3a
// > MusicDownloadManager::downloadSong @ 0x10064edfb
// > MusicDownloadManager::onDownloadSongCompleted @ 0x10064f58f
// > sub_1006590C0 @ 0x10065917c
// > SongInfoObject::create_1 @ 0x100664475
// > CustomSongWidget::onMore @ 0x1006f8dad
// > AudioAssetsBrowser::setupList @ 0x10089a168
//
// 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:34:47 +0000
//
__int64 __fastcall MusicDownloadManager::getSongInfoObject(__int64 a1, int a2)
{
int v2; // ebx
__int64 v3; // r15
__int64 v4; // r14
__int64 v5; // rax
const char *CString; // r13
size_t v7; // rax
size_t v8; // r12
char *v9; // r14
size_t v10; // r15
__int64 result; // rax
__int64 v12; // r14
__int64 v13; // rdi
char v14; // [rsp+0h] [rbp-50h]
__int64 v15; // [rsp+0h] [rbp-50h]
_QWORD __dst[2]; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
int v18; // [rsp+24h] [rbp-2Ch]
v2 = a2;
v3 = a1;
v4 = *(_QWORD *)(a1 + 344);
v5 = sub_10088E820("%i", v14);
CString = (const char *)cocos2d::CCString::getCString(v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
v15 = v4;
if ( v7 >= 0x17 )
{
v18 = a2;
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
v9 = (char *)operator new(v10);
__p = v9;
__dst[0] = v10 + 1;
v3 = a1;
v2 = v18;
__dst[1] = v8;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( v7 )
LABEL_8:
memmove(v9, CString, v8);
v9[v8] = 0;
result = cocos2d::CCDictionary::objectForKey(v15, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
{
v12 = result;
operator delete(__p);
result = v12;
}
if ( result == 0 && v2 >= 10000001 )
{
v13 = *(_QWORD *)(v3 + 440);
if ( v13 )
return cocos2d::CCDictionary::objectForKey_1(v13, (unsigned int)v2);
else
return 0;
}
return result;
}