//
// MusicDownloadManager::handleIt from 0x10015392c to 0x100153a88 (348 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::onProcessHttpRequestCompleted @ 0x100153778
//
// 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
//
void __fastcall MusicDownloadManager::handleIt(__int64 a1, char a2, std::string *this, __int64 a4, int a5)
{
void **p_dst; // x8
void *v10[2]; // [xsp+0h] [xbp-A0h] BYREF
__int64 v11; // [xsp+10h] [xbp-90h]
__int128 v12; // [xsp+20h] [xbp-80h] BYREF
std::string::size_type v13; // [xsp+30h] [xbp-70h]
void *__p[2]; // [xsp+40h] [xbp-60h] BYREF
__int64 v15; // [xsp+50h] [xbp-50h]
__int128 __dst; // [xsp+60h] [xbp-40h] BYREF
std::string::size_type v17; // [xsp+70h] [xbp-30h]
if ( (a2 & 1) == 0 )
std::string::assign(this, "-1");
if ( a5 == 59 )
{
if ( SHIBYTE(this->__r_.__value_.__r.__words[2]) < 0 )
{
sub_1000097D0(&v12, this->__r_.__value_.__l.__data_, this->__r_.__value_.__l.__size_);
}
else
{
v12 = *(_OWORD *)&this->__r_.__value_.__l.__data_;
v13 = this->__r_.__value_.__r.__words[2];
}
if ( *(char *)(a4 + 23) < 0 )
{
sub_1000097D0(v10, *(void **)a4, *(_QWORD *)(a4 + 8));
}
else
{
*(_OWORD *)v10 = *(_OWORD *)a4;
v11 = *(_QWORD *)(a4 + 16);
}
MusicDownloadManager::onGetCustomContentURLCompleted(a1, &v12);
if ( SHIBYTE(v11) < 0 )
operator delete(v10[0]);
if ( SHIBYTE(v13) < 0 )
{
p_dst = (void **)&v12;
goto LABEL_25;
}
}
else if ( a5 == 19 )
{
if ( SHIBYTE(this->__r_.__value_.__r.__words[2]) < 0 )
{
sub_1000097D0(&__dst, this->__r_.__value_.__l.__data_, this->__r_.__value_.__l.__size_);
}
else
{
__dst = *(_OWORD *)&this->__r_.__value_.__l.__data_;
v17 = this->__r_.__value_.__r.__words[2];
}
if ( *(char *)(a4 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a4, *(_QWORD *)(a4 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a4;
v15 = *(_QWORD *)(a4 + 16);
}
MusicDownloadManager::onGetSongInfoCompleted(a1, (int)&__dst, (char *)__p);
if ( SHIBYTE(v15) < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v17) < 0 )
{
p_dst = (void **)&__dst;
LABEL_25:
operator delete(*p_dst);
}
}
}