//
// MessageThreadsPage::selectedCount from 0x1400d6260 to 0x1400d62e3 (131 bytes)
//
// 9 xrefs:
// > MessageThreadsPage::init @ 0x1400d5998
// > MessageThreadsPage::onSelectAll @ 0x1400d6329
// > MessageThreadsPage::onSelectAll @ 0x1400d63a7
// > MessageThreadsPage::onSelectionChanged @ 0x1400d640a
// > MessageThreadsPage::onDeleteSelected @ 0x1400d6778
// > MessageThreadsPage::onMarkRead @ 0x1400d7161
// > MessageThreadsPage::onInboxPoll @ 0x1400d8005
// > MessageThreadsPage::applyThreadList @ 0x1400d8a47
// > ??> @ 0x1409145e8
//
// 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:26:26 +0000
//
__int64 __fastcall MessageThreadsPage::selectedCount(__int64 a1)
{
cocos2d::CCArray *v2; // rcx
unsigned int v4; // ebx
signed int v5; // edi
struct cocos2d::CCObject *v6; // rax
unsigned int v7; // ecx
v2 = *(cocos2d::CCArray **)(a1 + 800);
if ( !v2 )
return 0;
v4 = 0;
v5 = 0;
if ( (int)cocos2d::CCArray::count(v2) > 0 )
{
do
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 800), v5);
v7 = v4 + 1;
if ( !*((_BYTE *)v6 + 360) )
v7 = v4;
++v5;
v4 = v7;
}
while ( v5 < (int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 800)) );
}
return v4;
}