//
// MusicDownloadManager::getCustomSFXLocationText from 0x966b00 to 0x966d24 (548 bytes)
//
// 3 xrefs:
// > CustomSFXWidget::onShowInfo @ 0xb60bd4
// > SFXBrowser::cellPerformedAction @ 0xb97fc8
// > ??> @ 0xf1858
//
// 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:36 +0000
//
__int64 *__usercall MusicDownloadManager::getCustomSFXLocationText@(
MusicDownloadManager *this@,
SFXInfoObject *a2@,
__int64 *a3@)
{
__int64 v5; // x0
size_t v6; // x22
char *v7; // x2
__int64 CustomSFXRoot; // x0
__int64 v9; // x1
__int64 v10; // x24
size_t v11; // x2
char *v12; // x1
char *v14; // x0
int v15; // w1
char *v16; // x0
int v17; // t1
__int64 v18; // [xsp+40h] [xbp+40h] BYREF
__int64 v19; // [xsp+48h] [xbp+48h]
void *v20; // [xsp+50h] [xbp+50h]
__int64 v21[3]; // [xsp+58h] [xbp+58h] BYREF
void *v22[2]; // [xsp+70h] [xbp+70h] BYREF
void *v23; // [xsp+80h] [xbp+80h]
MusicDownloadManager::getCustomSFXRawPath(this, a2, &v18);
if ( (v18 & 1) != 0 )
{
v5 = v19;
v6 = -1;
v7 = (char *)v20;
if ( !v19 )
goto LABEL_3;
}
else
{
v5 = (unsigned __int8)v18 >> 1;
v7 = (char *)&v18 + 1;
v6 = -1;
if ( !((unsigned __int8)v18 >> 1) )
goto LABEL_3;
}
v14 = &v7[v5];
if ( v14 != v7 )
{
v15 = (unsigned __int8)*(v14 - 1);
v16 = v14 - 1;
if ( v15 == 47 )
{
LABEL_24:
v6 = v16 - v7;
}
else
{
while ( v16 != v7 )
{
v17 = (unsigned __int8)*--v16;
if ( v17 == 47 )
goto LABEL_24;
}
v6 = -1;
}
}
LABEL_3:
CustomSFXRoot = MusicDownloadManager::getCustomSFXRoot(this);
*a3 = 0;
a3[1] = 0;
a3[2] = 0;
if ( (*(_BYTE *)(CustomSFXRoot + 80) & 1) != 0 )
{
std::string::__init(a3, *(void **)(CustomSFXRoot + 96), *(_QWORD *)(CustomSFXRoot + 88));
}
else
{
v9 = *(_QWORD *)(CustomSFXRoot + 88);
*a3 = *(_QWORD *)(CustomSFXRoot + 80);
a3[1] = v9;
a3[2] = *(_QWORD *)(CustomSFXRoot + 96);
}
if ( v6 != -1 )
{
v10 = std::string::append((__int64)a3, " / ", 3u);
std::string::basic_string(v21, (__int64)&v18, 0, v6);
MusicDownloadManager::customSFXPathDisplay((unsigned __int8 *)v21, v22);
if ( ((__int64)v22[0] & 1) != 0 )
{
v12 = (char *)v23;
v11 = (size_t)v22[1];
}
else
{
v11 = LOBYTE(v22[0]) >> 1;
v12 = (char *)v22 + 1;
}
std::string::append(v10, v12, v11);
if ( ((__int64)v22[0] & 1) != 0 )
operator delete(v23);
if ( (v21[0] & 1) != 0 )
operator delete((void *)v21[2]);
}
if ( (v18 & 1) != 0 )
operator delete(v20);
return a3;
}