//
// MusicDownloadManager::ProcessHttpRequest from 0x10058a0a0 to 0x10058a213 (371 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::getSongInfo @ 0x10058ba3e
// > MusicDownloadManager::getCustomContentURL @ 0x100590df6
//
// 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::ProcessHttpRequest(
cocos2d::CCObject *a1,
__int64 a2,
__int64 a3,
__int64 a4,
int a5)
{
char *v7; // rbx
const std::string::value_type *v8; // r14
char *v9; // r12
unsigned int v10; // eax
const std::string::value_type *v11; // r15
cocos2d::extension::CCHttpClient *Instance; // rax
v7 = (char *)operator new(0xD8u);
cocos2d::CCObject::CCObject((__int64)v7);
*(_QWORD *)v7 = off_1008B9708;
*(_OWORD *)(v7 + 168) = 0;
*((_QWORD *)v7 + 23) = 0;
*((_OWORD *)v7 + 4) = 0;
*((_OWORD *)v7 + 5) = 0;
*((_OWORD *)v7 + 6) = 0;
*((_OWORD *)v7 + 7) = 0;
*((_QWORD *)v7 + 16) = 0;
*((_DWORD *)v7 + 14) = 5;
*((_DWORD *)v7 + 48) = 0;
v7[196] = 0;
*((_QWORD *)v7 + 25) = 0;
*((_DWORD *)v7 + 52) = 0;
*(_OWORD *)(v7 + 136) = 0;
*(_OWORD *)(v7 + 152) = 0;
if ( (*(_BYTE *)a2 & 1) != 0 )
v8 = *(const std::string::value_type **)(a2 + 16);
else
v8 = (const std::string::value_type *)(a2 + 1);
std::string::assign((std::string *)(v7 + 64), v8);
*((_DWORD *)v7 + 14) = 1;
*((_QWORD *)v7 + 17) = a1;
*((_QWORD *)v7 + 18) = MusicDownloadManager::onProcessHttpRequestCompleted;
*((_QWORD *)v7 + 19) = 0;
if ( a1 )
cocos2d::CCObject::retain(a1);
if ( (*(_BYTE *)a3 & 1) != 0 )
v9 = *(char **)(a3 + 16);
else
v9 = (char *)(a3 + 1);
v10 = strlen(v9);
sub_1000D4430((void **)v7 + 11, v9, &v9[v10], v10);
if ( (*(_BYTE *)a4 & 1) != 0 )
v11 = *(const std::string::value_type **)(a4 + 16);
else
v11 = (const std::string::value_type *)(a4 + 1);
std::string::assign((std::string *)(v7 + 112), v11);
*((_DWORD *)v7 + 48) = a5;
Instance = cocos2d::extension::CCHttpClient::getInstance();
cocos2d::extension::CCHttpClient::send(Instance, (cocos2d::extension::CCHttpRequest *)v7);
cocos2d::CCObject::release((cocos2d::CCObject *)v7);
}