//
// sub_140485E10 from 0x140485e10 to 0x140485f28 (280 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::getCustomSFXCount @ 0x140485f74
// > MusicDownloadManager::encodeCustomSFX @ 0x14048a3ae
// > ??> @ 0x140928bf8
//
// 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:46 +0000
//
char __fastcall sub_140485E10(__int64 a1, __int64 a2, __int64 *a3)
{
__int64 *v6; // rdx
__int64 *v7; // r9
__int64 v8; // rax
char v9; // r10
__int64 v10; // rcx
__int64 *v11; // rcx
__int64 v12; // rax
cocos2d::CCDictionary *v13; // rcx
__int64 v14; // rdx
struct cocos2d::CCObject *v15; // rax
__int64 v17; // [rsp+38h] [rbp+10h] BYREF
if ( !*(_QWORD *)(a2 + 8) )
return 1;
v6 = *(__int64 **)a2;
v7 = v6;
v8 = v6[1];
v9 = *(_BYTE *)(v8 + 25);
if ( !v9 )
{
v10 = v6[1];
do
{
if ( *(int *)(v10 + 28) >= -1 )
v7 = (__int64 *)v10;
else
v10 += 16;
v10 = *(_QWORD *)v10;
}
while ( !*(_BYTE *)(v10 + 25) );
}
if ( !*((_BYTE *)v7 + 25) && *((int *)v7 + 7) <= -1 )
return 1;
v11 = v6;
if ( !v9 )
{
do
{
if ( *(int *)(v8 + 28) >= 1 )
v11 = (__int64 *)v8;
else
v8 += 16;
v8 = *(_QWORD *)v8;
}
while ( !*(_BYTE *)(v8 + 25) );
}
if ( !*((_BYTE *)v11 + 25) && *((int *)v11 + 7) <= 1 )
return 1;
v12 = *v6;
v17 = v12;
if ( (__int64 *)v12 != v6 )
{
do
{
v13 = *(cocos2d::CCDictionary **)(a1 + 920);
v14 = *(int *)(v12 + 28);
if ( v13 )
{
if ( (int)v14 > 0 )
{
v15 = cocos2d::CCDictionary::objectForKey(v13, v14);
if ( v15 )
{
if ( *((_BYTE *)v15 + 72) )
sub_140485B30((__int64)v15, a3);
}
}
}
sub_1400BD5E0(&v17);
v12 = v17;
}
while ( v17 != *(_QWORD *)a2 );
}
return 0;
}