//
// MusicDownloadManager::getCustomSFXRoot from 0x1006514e0 to 0x1006515b4 (212 bytes)
//
// 12 xrefs:
// > SFXBrowser::setupSFXBrowser @ 0x10042fd7e
// > SFXBrowser::setupSFXBrowser @ 0x10043001f
// > SFXBrowser::setupSFXBrowser @ 0x1004301b9
// > sub_1004326B0 @ 0x1004327cf
// > sub_100433280 @ 0x10043335b
// > MusicDownloadManager::createCustomSFXFolder @ 0x100651ff4
// > MusicDownloadManager::createCustomSFXPlacement @ 0x100652353
// > MusicDownloadManager::getCustomSFXLocationText @ 0x10065310d
// > MusicDownloadManager::importCustomSFXSetup @ 0x1006542a9
// > sub_100654A90 @ 0x100654ac0
// > MusicDownloadManager::decodeCustomSFX @ 0x100657116
// > SFXFolderPickerPopup::rebuildList @ 0x100972974
//
// 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:49 +0000
//
__int64 __fastcall MusicDownloadManager::getCustomSFXRoot(__int64 a1)
{
_QWORD *v2; // rax
__int64 v3; // rax
__int64 v4; // rdi
int v5; // r14d
char v7; // [rsp+8h] [rbp-28h] BYREF
char v8[39]; // [rsp+9h] [rbp-27h] BYREF
if ( !*(_QWORD *)(a1 + 824) )
{
v2 = cocos2d::CCDictionary::create();
*(_QWORD *)(a1 + 824) = v2;
cocos2d::CCObject::retain((__int64)v2);
v7 = 12;
strcpy(v8, "Custom");
v3 = SFXFolderObject::create(1, &v7, 0);
v4 = *(_QWORD *)(a1 + 824);
*(_DWORD *)(v3 + 76) = 1;
cocos2d::CCDictionary::setObject_1(v4, v3, 1);
if ( *(int *)(a1 + 832) <= 2 )
{
v5 = rand() << 15;
*(_DWORD *)(a1 + 832) = (v5 | rand()) % 7900000 + 100000;
}
}
return cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 824), 1);
}