//
// LevelBrowserLayer::onRemoveAllFavorites from 0x7f6f88 to 0x7f711c (404 bytes)
//
// 3 xrefs:
// > ??> @ 0x5ed80
// > LevelBrowserLayer::init @ 0x7fa4d4
// > ??> @ 0x1542370
//
// 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:54:38 +0000
//
__int64 __fastcall LevelBrowserLayer::onRemoveAllFavorites(LevelBrowserLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
char *v4; // x19
__int64 v5; // x19
__int64 v7; // [xsp+38h] [xbp+38h] BYREF
size_t v8; // [xsp+40h] [xbp+40h]
void *v9; // [xsp+48h] [xbp+48h]
__int64 v10; // [xsp+50h] [xbp+50h] BYREF
size_t v11; // [xsp+58h] [xbp+58h]
void *v12; // [xsp+60h] [xbp+60h]
v7 = 0;
v3 = *((_QWORD *)this + 83);
v8 = 0;
v9 = nullptr;
if ( v3 && *(_DWORD *)(v3 + 316) == 103 )
{
std::string::assign(&v7, "Remove all lists from favorites?\nSearch and folder filters apply.");
v4 = (char *)this + 552;
v10 = 0;
v11 = 0;
v12 = nullptr;
if ( (v7 & 1) == 0 )
goto LABEL_4;
}
else
{
std::string::assign(
&v7,
"Remove all levels from favorites?\nSearch and folder filters apply.\nLevels will not be deleted.");
v4 = (char *)this + 552;
v10 = 0;
v11 = 0;
v12 = nullptr;
if ( (v7 & 1) == 0 )
{
LABEL_4:
v12 = v9;
v10 = v7;
v11 = v8;
goto LABEL_5;
}
}
std::string::__init(&v10, v9, v8);
LABEL_5:
v5 = FLAlertLayer::create(
(__int64)v4,
(cocos2d::CCLabelBMFont *)"Remove Favorites",
(char *)&v10,
(ButtonSprite *)"Cancel",
(ButtonSprite *)"Remove",
360.0);
if ( (v10 & 1) != 0 )
operator delete(v12);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 72LL))(v5, 2);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1312LL))(v5);
if ( (v7 & 1) != 0 )
operator delete(v9);
return _stack_chk_guard;
}