//
// SFXFolderPickerPopup::onSelectAll from 0xc3c648 to 0xc3c794 (332 bytes)
//
// 4 xrefs:
// > SFXFolderPickerPopup::onPickFolder @ 0xc3d910
// > ??> @ 0x81bf8
// > SFXFolderPickerPopup::init @ 0xc3d260
// > ??> @ 0x15435e8
//
// 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:04:54 +0000
//
__int64 __fastcall SFXFolderPickerPopup::onSelectAll(SFXFolderPickerPopup *this, cocos2d::CCObject *a2)
{
char *v2; // x22
_QWORD **v4; // x20
__int64 *v5; // x0
int v6; // w1
_BOOL4 v7; // w23
__int64 v9; // x0
__int64 v10; // x1
int v11; // [xsp+44h] [xbp+44h] BYREF
v2 = (char *)this + 704;
v4 = *((_QWORD ***)this + 89);
if ( v4 )
{
v5 = *((__int64 **)this + 89);
while ( 1 )
{
while ( 1 )
{
v6 = *((_DWORD *)v5 + 7);
if ( v6 < 0 )
break;
v5 = (__int64 *)*v5;
if ( !v5 )
goto LABEL_5;
}
if ( v6 == -1 )
break;
v5 = (__int64 *)v5[1];
if ( !v5 )
{
LABEL_5:
v11 = 1;
v7 = std::__tree::__count_unique((__int64)v2, &v11) != 0;
goto LABEL_6;
}
}
v7 = 1;
LABEL_6:
std::__tree::destroy((__int64)v2, *v4);
std::__tree::destroy((__int64)v2, v4[1]);
operator delete(v4);
}
else
{
v11 = 1;
v7 = std::__tree::__count_unique((__int64)v2, &v11) != 0;
}
*((_QWORD *)this + 90) = 0;
*((_QWORD *)this + 88) = (char *)this + 712;
*((_QWORD *)this + 89) = 0;
if ( !v7 )
{
v9 = operator new(0x20u);
*(_QWORD *)v9 = 0;
*(_QWORD *)(v9 + 8) = 0;
*(_QWORD *)(v9 + 16) = (char *)this + 712;
*(_DWORD *)(v9 + 28) = -1;
*((_QWORD *)this + 89) = v9;
v10 = **((_QWORD **)this + 88);
if ( v10 )
*((_QWORD *)this + 88) = v10;
std::__tree_balance_after_insert *>((__int64 *)v9, (__int64 *)v9);
++*((_QWORD *)this + 90);
}
return SFXFolderPickerPopup::refreshList(this);
}