//
// MessagesProfilePage::onToggleAllObjects from 0xa49dc4 to 0xa49e90 (204 bytes)
//
// 3 xrefs:
// > ??> @ 0xbc740
// > MessagesProfilePage::init @ 0xa4b608
// > ??> @ 0x1545748
//
// This function is hookable on this platform (idp: arm, 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 13:00:01 +0000
//
cocos2d::CCArray *__fastcall MessagesProfilePage::onToggleAllObjects(MessagesProfilePage *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
const char *v4; // x1
cocos2d::CCArray *result; // x0
cocos2d::CCArray *v6; // x20
int v7; // w21
int v8; // w0
unsigned int *v9; // x1
unsigned int v10; // w2
__int64 *v11; // x1
__int64 *v12; // x3
__int64 v13; // x2
bool v14; // w0
v3 = (GameLevelManager *)GameLevelManager::sharedState(this);
v4 = (char *)this + 705;
if ( (*((_BYTE *)this + 704) & 1) != 0 )
v4 = *((const char **)this + 90);
result = (cocos2d::CCArray *)GameLevelManager::getStoredOnlineLevels(v3, v4);
v6 = result;
if ( result )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(result);
if ( (_DWORD)result )
{
v7 = MessagesProfilePage::selectedCount(this);
v8 = cocos2d::CCArray::count(v6);
v9 = *((unsigned int **)v6 + 7);
v10 = *v9;
if ( *v9 )
{
v11 = *((__int64 **)v9 + 2);
v12 = &v11[v10 - 1];
if ( v11 <= v12 )
{
v13 = *v11;
if ( *v11 )
{
v14 = v7 != v8;
do
{
++v11;
*(_BYTE *)(v13 + 426) = v14;
if ( v12 < v11 )
break;
v13 = *v11;
}
while ( *v11 );
}
}
}
MessagesProfilePage::updateSelectUI(this);
return (cocos2d::CCArray *)CustomListView::reloadAll(*(_QWORD *)(*((_QWORD *)this + 93) + 544LL));
}
}
return result;
}