//
// sub_456F20 from 0x456f20 to 0x456fe4 (196 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::responseToDict @ 0x457e5e
// > MusicDownloadManager::createSongsInfo @ 0x45c9a0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCArray *__fastcall sub_456F20(cocos2d::CCArray *a1, _DWORD *a2)
{
bool (__fastcall *v4)(cocos2d::CCObject *__hidden); // r11
cocos2d::CCArray *v5; // r10
int v6; // r0
int v7; // r5
const std::string *v8; // r1
cocos2d::CCObject *v9; // r0
bool (__fastcall *canEncode)(cocos2d::CCObject *__hidden); // [sp+0h] [bp-Ch]
int v12; // [sp+4h] [bp-8h]
char *v13; // [sp+Ch] [bp+0h] BYREF
char v14; // [sp+10h] [bp+4h] BYREF
v4 = nullptr;
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v6 = sub_774834(a1, a2, 0);
canEncode = a1->__vftable[-1].canEncode;
v12 = *(_DWORD *)(*a2 - 12);
v7 = v6;
while ( 1 )
{
sub_776158(&v13, a1, v4, v7 - (_DWORD)v4);
if ( *((_DWORD *)v13 - 3) || v4 != canEncode )
{
sub_776584((int)&v14, v13);
v9 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v14, v8);
cocos2d::CCArray::addObject(v5, v9);
sub_774008(&v14);
}
if ( v7 == -1 )
break;
v4 = (bool (__fastcall *)(cocos2d::CCObject *__hidden))(v7 + v12);
v7 = sub_774834(a1, a2, v7 + v12);
sub_774008(&v13);
}
sub_774008(&v13);
return v5;
}