//
// MusicBrowser::onPage from 0x1006e8930 to 0x1006e89c0 (144 bytes)
//
// 2 xrefs:
// > MusicBrowser::init @ 0x1006e7712
// > MusicBrowser::init @ 0x1006e77fc
//
// 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:35:48 +0000
//
__int64 __fastcall MusicBrowser::onPage(__int64 a1, __int64 a2)
{
__int64 result; // rax
unsigned int v3; // r14d
int v4; // r12d
result = *(_QWORD *)(a1 + 712);
if ( result )
{
v3 = sub_1007FEF90(*(_QWORD *)(result + 64));
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 712) + 96LL);
result = v4 + 2 * (unsigned int)((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1) - 1;
if ( (int)result >= 0 && (int)result <= (int)(float)(v3 / 0xA) )
{
*(_DWORD *)(*(_QWORD *)(a1 + 712) + 96LL) = result;
return MusicBrowser::setupList(a1);
}
}
return result;
}