//
// MusicDownloadManager::getCustomSFXRoot from 0x963da4 to 0x963ef0 (332 bytes)
//
// 13 xrefs:
// > MusicDownloadManager::createCustomSFXPlacement @ 0x964134
// > MusicDownloadManager::createCustomSFXFolder @ 0x964350
// > MusicDownloadManager::getCustomSFXLocationText @ 0x966b54
// > sub_96F3B0 @ 0x96f404
// > MusicDownloadManager::importCustomSFXSetup @ 0x9704e8
// > MusicDownloadManager::decodeCustomSFX @ 0x970f38
// > SFXBrowser::executeBatchDelete @ 0xb903d0
// > SFXBrowser::setupSFXBrowser @ 0xb93694
// > SFXBrowser::setupSFXBrowser @ 0xb936ac
// > SFXBrowser::setupSFXBrowser @ 0xb936f4
// > SFXBrowser::switchToView @ 0xb96940
// > SFXFolderPickerPopup::rebuildList @ 0xc3ba44
// > ??> @ 0x4d9f8
//
// This function is hookable on this platform (idp: arm, 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:57:34 +0000
//
__int64 __fastcall MusicDownloadManager::getCustomSFXRoot(MusicDownloadManager *this)
{
cocos2d::CCDictionary *v2; // x0
cocos2d::CCObject *v4; // x0
cocos2d::CCObject *v5; // x1
int v6; // w21
int v7; // w2
cocos2d::CCObject *v8; // [xsp+38h] [xbp+38h]
__int64 v9[2]; // [xsp+40h] [xbp+40h] BYREF
void *v10; // [xsp+50h] [xbp+50h]
v2 = *((cocos2d::CCDictionary **)this + 103);
if ( !v2 )
{
v4 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(nullptr);
*((_QWORD *)this + 103) = v4;
cocos2d::CCObject::retain(v4);
v9[0] = 0;
v9[1] = 0;
v10 = nullptr;
std::string::__init(v9, "Custom", 6u);
v5 = (cocos2d::CCObject *)SFXFolderObject::create(1, (char *)v9, 0);
if ( (v9[0] & 1) != 0 )
{
v8 = v5;
operator delete(v10);
v5 = v8;
}
*((_DWORD *)v5 + 19) = 1;
cocos2d::CCDictionary::setObject(*((cocos2d::CCDictionary **)this + 103), v5, 1);
if ( *((int *)this + 208) <= 2 )
{
v6 = rand();
v7 = rand() | (v6 << 15);
v2 = *((cocos2d::CCDictionary **)this + 103);
*((_DWORD *)this + 208) = v7 % 7900000 + 100000;
}
else
{
v2 = *((cocos2d::CCDictionary **)this + 103);
}
}
return cocos2d::CCDictionary::objectForKey(v2, 1);
}