//
// SFXBrowser::onPage from 0x1406202e0 to 0x1406203ab (203 bytes)
//
// 6 xrefs:
// > SFXBrowser::init @ 0x140616dd4
// > SFXBrowser::init @ 0x140616ea0
// > ??> @ 0x1408e657c
// > ??> @ 0x1408e6590
// > ??> @ 0x1408e65a0
// > ??> @ 0x1409303d4
//
// 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:35:22 +0000
//
void __fastcall SFXBrowser::onPage(__int64 a1, __int64 a2)
{
__int64 v4; // rcx
unsigned int v5; // ebx
unsigned int v6; // eax
int v7; // ebp
int v8; // ebx
int v9; // eax
int v10; // ecx
int v11; // edx
v4 = *(_QWORD *)(a1 + 712);
if ( v4 )
{
v5 = *(_DWORD *)(a1 + 1096);
v6 = cocos2d::CCArray::count(*(cocos2d::CCArray **)(v4 + 64));
v7 = (int)ceilf((float)(int)(v6 / v5));
v8 = *(_DWORD *)(*(_QWORD *)(a1 + 712) + 96LL);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v10 = 1;
if ( v9 != 1 )
v10 = -1;
v11 = v10 + v8;
if ( v10 + v8 < 0 )
{
if ( v11 == -1 )
SFXBrowser::onExitFolder(a1, a2);
}
else if ( v11 <= v7 )
{
*(_DWORD *)(*(_QWORD *)(a1 + 712) + 96LL) = v11;
SFXBrowser::setupList((__int64 *)a1, *(_QWORD *)(a1 + 712));
}
}
}