//
// MusicDownloadManager::downloadNewsImage from 0x570c20 to 0x570d5e (318 bytes)
//
// 3 xrefs:
// > NewsPopup::prefetchPageImages @ 0x6c1b0c
// > NewsPopup::rebuildPage @ 0x6c2544
// > NewsPopup::onBlockClicked @ 0x6c28b2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:37 +0000
//
int __fastcall MusicDownloadManager::downloadNewsImage(int result, unsigned __int8 *a2)
{
int v3; // r4
MusicDownloadManager *v4; // r6
int v5; // r3
int v6; // r3
const char *NewsImageDownloadKey; // r9
int v9; // r2
const void *v10; // r1
size_t v11; // r2
int *Request; // r5
int v13; // r3
int v14[3]; // [sp+18h] [bp-44h] BYREF
int v15[3]; // [sp+24h] [bp-38h] BYREF
int v16[3]; // [sp+30h] [bp-2Ch] BYREF
int v17[3]; // [sp+3Ch] [bp-20h] BYREF
int v18[3]; // [sp+48h] [bp-14h] BYREF
v3 = *(unsigned __int8 *)(result + 288);
v4 = (MusicDownloadManager *)result;
if ( (v3 & 1) != 0 )
v5 = *(_DWORD *)(result + 292);
else
v5 = v3 >> 1;
if ( v5 )
{
v6 = *a2;
if ( (v6 & 1) != 0 ? *((_DWORD *)a2 + 1) : v6 >> 1 )
{
std::string::basic_string(v18, (int)a2);
NewsImageDownloadKey = (const char *)MusicDownloadManager::getNewsImageDownloadKey(
(int)v4,
(unsigned __int8 *)v18);
std::string::~string((int)v18);
result = MusicDownloadManager::isDLActive(v4, NewsImageDownloadKey);
if ( !result )
{
memset(v14, 0, sizeof(v14));
std::string::__init(v14, "/news/", 6u);
v9 = *a2;
if ( (v9 & 1) != 0 )
{
v10 = *((const void **)a2 + 2);
v11 = *((_DWORD *)a2 + 1);
}
else
{
v10 = a2 + 1;
v11 = v9 >> 1;
}
std::string::append(v14, v10, v11);
std::string::basic_string(v16, (int)v14);
MusicDownloadManager::generateCustomContentURL(v15, (int)v4, (int)v16);
std::string::~string((int)v16);
std::string::basic_string(v17, (int)v15);
std::string::basic_string(v18, (int)a2);
Request = MusicDownloadManager::ProcessHttpGetRequest(
v4,
(int)v17,
(int)v18,
(int)MusicDownloadManager::onDownloadNewsImageCompleted,
0,
5,
30);
std::string::~string((int)v18);
std::string::~string((int)v17);
MusicDownloadManager::addDLToActive(v4, NewsImageDownloadKey, (cocos2d::CCObject *)Request, v13);
std::string::~string((int)v15);
return std::string::~string((int)v14);
}
}
}
return result;
}