//
// AudioAssetsBrowser::setupList from 0x10089a0c0 to 0x10089a273 (435 bytes)
//
// 2 xrefs:
// > AudioAssetsBrowser::init @ 0x100899956
// > AudioAssetsBrowser::trySetupAudioBrowser @ 0x10089a2f5
//
// 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 12:37:08 +0000
//
__int64 __fastcall AudioAssetsBrowser::setupList(__int64 a1)
{
_DWORD *v2; // rdi
__int64 v3; // rax
__int64 v4; // rax
void *v5; // r14
int *v6; // r12
int *v7; // r13
int v8; // r15d
__int64 v9; // rax
__int64 SongInfoObject; // rax
__int64 v11; // rax
char *v12; // rax
_QWORD *v13; // rax
__int64 v14; // rbx
float v16; // [rsp+8h] [rbp-38h] BYREF
__int64 v17; // [rsp+10h] [rbp-30h] BYREF
v2 = *(_DWORD **)(a1 + 680);
if ( v2 )
cocos2d::CCObject::release(v2);
if ( *(_QWORD *)(a1 + 688) )
{
v3 = cocos2d::CCDirector::sharedDirector();
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 160LL))(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, *(_QWORD *)(a1 + 688));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 536LL))(*(_QWORD *)(a1 + 688));
*(_QWORD *)(a1 + 688) = 0;
}
v5 = sub_1007FE900();
v6 = *(int **)(a1 + 704);
v7 = *(int **)(a1 + 712);
while ( v6 != v7 )
{
v8 = *v6;
v9 = MusicDownloadManager::sharedState();
SongInfoObject = MusicDownloadManager::getSongInfoObject(v9, v8);
if ( SongInfoObject )
sub_1007FEBF0((__int64)v5, SongInfoObject);
++v6;
}
*(_QWORD *)(a1 + 680) = v5;
cocos2d::CCObject::retain((__int64)v5);
v11 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v17, v11);
v12 = CustomListView::create((__int64)v5, a1 + 664, 0, 0x17u, 220.0, 340.0, 0.0);
v13 = GJCommentListLayer::create((__int64)v12, 340.0, 220.0, (__int64)"", 0xFF323232, 1u);
*(_QWORD *)(a1 + 688) = v13;
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v13, 10);
v14 = *(_QWORD *)(a1 + 688);
sub_100278250(
&v16,
(float)(*(float *)&v17 + -340.0) * 0.5,
(float)((float)(*((float *)&v17 + 1) + -220.0) * 0.5) + -10.0);
return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v14 + 184LL))(v14, &v16);
}