//
// InfoLayer::onBulkSelectAll from 0x90d94c to 0x90db7c (560 bytes)
//
// 4 xrefs:
// > InfoLayer::keyDown @ 0x90dc28
// > ??> @ 0xb57f8
// > InfoLayer::setupBulkUI @ 0x907f68
// > ??> @ 0x1545360
//
// 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 12:57:14 +0000
//
__int64 __fastcall InfoLayer::onBulkSelectAll(InfoLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
cocos2d::CCArray *v4; // x0
signed int v5; // w0
__int64 v6; // x19
signed int v7; // w23
cocos2d::CCArray *v8; // x0
signed int v9; // w22
int v10; // w24
unsigned int i; // w20
__int64 v12; // x0
_BOOL4 v13; // w22
unsigned int v14; // w20
_DWORD *v15; // x26
unsigned __int64 v16; // x0
int v17; // w1
__int64 v18; // x0
__int64 v19; // x19
int v20; // w0
int v21; // w2
int v22; // w1
_BOOL4 v24; // w0
int v25[2]; // [xsp+78h] [xbp+78h] BYREF
int *v26; // [xsp+80h] [xbp+80h] BYREF
v3 = *((_QWORD *)this + 112);
if ( v3 )
{
v4 = *(cocos2d::CCArray **)(v3 + 432);
if ( v4 )
{
v5 = cocos2d::CCArray::count(v4);
v6 = *((_QWORD *)this + 112);
v7 = v5;
if ( v6 )
{
v8 = *(cocos2d::CCArray **)(v6 + 432);
if ( v8 )
{
v9 = 0;
v10 = cocos2d::CCArray::count(v8);
if ( v10 )
{
for ( i = 0; i != v10; ++i )
{
v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v6 + 432), i);
if ( v12 && *(_BYTE *)(v12 + 440) )
++v9;
}
}
v6 = *((_QWORD *)this + 112);
v13 = v7 == 0 || v7 > v9;
if ( v7 )
goto LABEL_12;
LABEL_22:
*((_QWORD *)this + 119) = 0;
if ( !v6 )
goto LABEL_24;
goto LABEL_23;
}
v13 = v7 >= 0;
if ( !v7 )
{
*((_QWORD *)this + 119) = 0;
LABEL_23:
CustomListView::reloadAll(v6);
LABEL_24:
InfoLayer::refreshBulkUI(this);
return _stack_chk_guard;
}
}
else
{
v24 = v5 != 0;
v13 = !v24 || v7 > 0;
if ( !v24 )
{
*((_QWORD *)this + 119) = 0;
goto LABEL_24;
}
}
LABEL_12:
v14 = 0;
while ( 1 )
{
v18 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v6 + 432), v14);
v19 = v18;
if ( !v18 )
goto LABEL_14;
v20 = *(_DWORD *)(v18 + 436);
*(_BYTE *)(v19 + 440) = v13;
v21 = *(_DWORD *)(v19 + 368);
if ( v20 == 3 )
{
v22 = 6;
}
else
{
v22 = 7;
if ( v20 != 4 )
{
v22 = 8;
if ( v20 != 5 )
v22 = *(_DWORD *)(v19 + 380) == 0;
}
}
v25[0] = v22;
v25[1] = v21;
if ( v13 )
{
v26 = v25;
v15 = (_DWORD *)std::__tree,BulkCommentKey>,std::__map_value_compare,std::__value_type,BulkCommentKey>,std::less>,true>,std::allocator,BulkCommentKey>>>::__emplace_unique_key_args,std::piecewise_construct_t const&,std::tuple const&>,std::tuple<>>(
(__int64 **)this + 116,
v25,
(__int64)&unk_1152220,
(_QWORD **)&v26);
v16 = sub_907154((_DWORD *)v19);
v15[9] = v16;
v15[11] = v17;
v15[10] = HIDWORD(v16);
LABEL_14:
++v14;
v6 = *((_QWORD *)this + 112);
if ( v7 <= v14 )
goto LABEL_22;
}
else
{
++v14;
std::__tree,BulkCommentKey>,std::__map_value_compare,std::__value_type,BulkCommentKey>,std::less>,true>,std::allocator,BulkCommentKey>>>::__erase_unique>(
(__int64 **)this + 116,
v25);
v6 = *((_QWORD *)this + 112);
if ( v7 <= v14 )
goto LABEL_22;
}
}
}
}
return _stack_chk_guard;
}