//
// LevelBrowserLayer::onRemoveAllFavorites from 0x100483400 to 0x1004834ed (237 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::init @ 0x10048225f
//
// 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 12:30:41 +0000
//
void __fastcall LevelBrowserLayer::onRemoveAllFavorites(__int64 a1)
{
__int64 v1; // rax
const std::string::value_type *v2; // rsi
__int64 v3; // rbx
__int128 v4; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
std::string v6; // [rsp+20h] [rbp-20h] BYREF
memset(&v6, 0, sizeof(v6));
v1 = *(_QWORD *)(a1 + 664);
if ( v1 )
{
v2 = "Remove all levels from favorites?\n"
"Search and folder filters apply.\n"
"Levels will not be deleted.";
if ( *(_DWORD *)(v1 + 316) == 103 )
v2 = "Remove all lists from favorites?\nSearch and folder filters apply.";
}
else
{
v2 = "Remove all levels from favorites?\n"
"Search and folder filters apply.\n"
"Levels will not be deleted.";
}
std::string::assign(&v6, v2);
if ( (*(_BYTE *)&v6.__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v4, v6.__r_.__value_.__l.__data_, v6.__r_.__value_.__l.__size_);
}
else
{
__p = v6.__r_.__value_.__l.__data_;
v4 = *(_OWORD *)&v6.__r_.__value_.__l.0;
}
v3 = FLAlertLayer::create_1(a1 + 552, "Remove Favorites", &v4, "Cancel", "Remove", 360.0);
if ( (v4 & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 72LL))(v3, 2);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 1312LL))(v3);
if ( (*(_BYTE *)&v6.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v6.__r_.__value_.__l.__data_);
}