//
// MusicDownloadManager::downloadNewsFeed from 0x9697d0 to 0x9699d8 (520 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::onTryUpdateNewsFeedCompleted @ 0x969a7c
// > ??> @ 0xf87d0
//
// 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:37 +0000
//
__int64 __fastcall MusicDownloadManager::downloadNewsFeed(MusicDownloadManager *this)
{
unsigned __int8 v2; // w0
__int64 v3; // x1
cocos2d::CCObject *Request; // x2
cocos2d::CCObject *v6; // [xsp+48h] [xbp+48h]
cocos2d::CCObject *v7; // [xsp+48h] [xbp+48h]
__int64 v8; // [xsp+50h] [xbp+50h] BYREF
size_t v9; // [xsp+58h] [xbp+58h]
void *v10; // [xsp+60h] [xbp+60h]
__int64 v11; // [xsp+68h] [xbp+68h] BYREF
size_t v12; // [xsp+70h] [xbp+70h]
void *v13; // [xsp+78h] [xbp+78h]
__int64 v14; // [xsp+80h] [xbp+80h] BYREF
__int64 v15; // [xsp+88h] [xbp+88h]
void *v16; // [xsp+90h] [xbp+90h]
v2 = *((_BYTE *)this + 368);
v3 = v2 >> 1;
if ( (v2 & 1) != 0 )
v3 = *((_QWORD *)this + 47);
if ( v3 && !MusicDownloadManager::isDLActive(this, "dl_news") )
{
v14 = 0;
v15 = 0;
v16 = nullptr;
std::string::__init(&v14, "/news/news.dat", 0xEu);
MusicDownloadManager::generateCustomContentURL((__int64)this, (__int64)&v14, &v8);
if ( (v14 & 1) != 0 )
operator delete(v16);
v11 = 0;
v12 = 0;
v13 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v11, v10, v9);
}
else
{
v13 = v10;
v11 = v8;
v12 = v9;
}
v14 = 0;
v15 = 0;
v16 = nullptr;
std::string::__init(&v14, &byte_11B8890, 0);
Request = (cocos2d::CCObject *)MusicDownloadManager::ProcessHttpGetRequest(
this,
(__int64)&v11,
(__int64)&v14,
(__int64)MusicDownloadManager::onDownloadNewsFeedCompleted,
0,
5,
30);
if ( (v14 & 1) != 0 )
{
v7 = Request;
operator delete(v16);
Request = v7;
}
if ( (v11 & 1) != 0 )
{
v6 = Request;
operator delete(v13);
Request = v6;
}
MusicDownloadManager::addDLToActive(this, "dl_news", Request);
if ( (v8 & 1) != 0 )
operator delete(v10);
}
return _stack_chk_guard;
}