//
// MusicDownloadManager::onGetCustomContentURLCompleted from 0x14048b8c0 to 0x14048ba6c (428 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::handleIt @ 0x1404822cf
// > ??> @ 0x140928d6c
// > ??> @ 0x140928d78
//
// 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:48 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall MusicDownloadManager::onGetCustomContentURLCompleted(__int64 a1, const void **a2, __int64 a3)
{
void *v6; // rcx
_BYTE *v7; // rcx
size_t v8; // r8
_BYTE *v9; // rdx
size_t v10; // r8
void *Block[2]; // [rsp+40h] [rbp-48h] BYREF
__m128i si128; // [rsp+50h] [rbp-38h]
Block[1] = (void *)108;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365A0);
Block[0] = (void *)0x72755F635F746567LL;
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 328), Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 2;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "-1");
v7 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v7 = *a2;
v8 = (size_t)a2[2];
if ( v8 > 2 )
v8 = 2;
if ( !memcmp(v7, Block, v8) && a2[2] == (const void *)2 )
{
MusicDownloadManager::musicActionFailed(a1, 2);
}
else
{
v9 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v9 = *a2;
v10 = -1;
do
++v10;
while ( v9[v10] );
sub_1400405A0((void **)(a1 + 368), v9, v10);
MusicDownloadManager::musicActionFinished(a1, 2);
if ( *(_BYTE *)(a1 + 970) )
{
*(_BYTE *)(a1 + 970) = 0;
MusicDownloadManager::tryUpdateNewsFeed(a1);
}
}
sub_14003D310((__int64)a2);
sub_14003D310(a3);
}