//
// MusicDownloadManager::onTryUpdateNewsFeedCompleted from 0x140491a00 to 0x140491b3d (317 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::tryUpdateNewsFeed @ 0x14049192d
// > ??> @ 0x140928e8c
//
// This function is hookable on this platform (idp: pc, 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 11:32:51 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall MusicDownloadManager::onTryUpdateNewsFeedCompleted(__int64 a1, __int64 a2, __int64 a3)
{
void *v5; // rcx
const char *v6; // rcx
void *Block[2]; // [rsp+30h] [rbp-58h] BYREF
__m128i si128; // [rsp+40h] [rbp-48h]
char *String[4]; // [rsp+50h] [rbp-38h] BYREF
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836570);
strcpy((char *)Block, "v_news");
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 328), Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v5 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v5);
}
if ( a3 && *(_BYTE *)(a3 + 64) )
{
GameToolbox::getResponse((__int64)String, a3);
v6 = (const char *)String;
if ( String[3] > (char *)0xF )
v6 = String[0];
if ( atoi(v6) <= *(_DWORD *)(a1 + 960) )
MusicDownloadManager::musicActionFailed(a1, 10);
else
MusicDownloadManager::downloadNewsFeed(a1);
sub_14003D310((__int64)String);
}
else
{
MusicDownloadManager::musicActionFailed(a1, 9);
}
}