//
// LevelSearchLayer::clearFilters from 0x14030e790 to 0x14030f7a6 (4118 bytes)
//
// 2 xrefs:
// > LevelSearchLayer::FLAlert_Clicked @ 0x14030f7d9
// > ??> @ 0x1406d4748
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=20
void LevelSearchLayer::clearFilters(LevelSearchLayer *a1)
{
__int64 v2; // rcx
cocos2d::CCString *v3; // rax
bool v4; // bl
void *v5; // rcx
int i; // ebx
int j; // ebx
__int64 v8; // rbx
struct cocos2d::CCString *v9; // rax
void *v10; // rcx
__int64 v11; // rbx
struct cocos2d::CCString *v12; // rax
void *v13; // rcx
__int64 v14; // rbx
struct cocos2d::CCString *v15; // rax
void *v16; // rcx
__int64 v17; // rbx
struct cocos2d::CCString *v18; // rax
void *v19; // rcx
__int64 v20; // rbx
struct cocos2d::CCString *v21; // rax
void *v22; // rcx
__int64 v23; // rbx
struct cocos2d::CCString *v24; // rax
void *v25; // rcx
__int64 v26; // rbx
struct cocos2d::CCString *v27; // rax
void *v28; // rcx
__int64 v29; // rbx
struct cocos2d::CCString *v30; // rax
void *v31; // rcx
__int64 v32; // rbx
struct cocos2d::CCString *v33; // rax
void *v34; // rcx
__int64 v35; // rbx
struct cocos2d::CCString *v36; // rax
void *v37; // rcx
__int64 v38; // rbx
struct cocos2d::CCString *v39; // rax
void *v40; // rcx
__int64 v41; // rbx
struct cocos2d::CCString *v42; // rax
void *v43; // rcx
__int64 v44; // rbx
struct cocos2d::CCString *v45; // rax
void *v46; // rcx
__int64 v47; // rbx
struct cocos2d::CCString *v48; // rax
void *v49; // rcx
__int64 v50; // rbx
struct cocos2d::CCString *v51; // rax
void *v52; // rcx
__int64 v53; // rbx
struct cocos2d::CCString *v54; // rax
void *v55; // rcx
void *v56; // [rsp+20h] [rbp-19h]
void *v57; // [rsp+20h] [rbp-19h]
void *v58; // [rsp+20h] [rbp-19h]
void *v59; // [rsp+20h] [rbp-19h]
void *v60; // [rsp+20h] [rbp-19h]
void *v61; // [rsp+20h] [rbp-19h]
void *v62; // [rsp+20h] [rbp-19h]
void *v63; // [rsp+20h] [rbp-19h]
void *v64; // [rsp+20h] [rbp-19h]
void *v65; // [rsp+20h] [rbp-19h]
void *v66; // [rsp+20h] [rbp-19h]
void *v67; // [rsp+20h] [rbp-19h]
void *v68; // [rsp+20h] [rbp-19h]
void *v69; // [rsp+20h] [rbp-19h]
void *v70; // [rsp+20h] [rbp-19h]
void *v71; // [rsp+20h] [rbp-19h]
void *v72; // [rsp+20h] [rbp-19h]
void *Block[2]; // [rsp+28h] [rbp-11h] BYREF
__int64 v74; // [rsp+38h] [rbp-1h]
unsigned __int64 v75; // [rsp+40h] [rbp+7h]
void *v76[2]; // [rsp+48h] [rbp+Fh] BYREF
__int64 v77; // [rsp+58h] [rbp+1Fh]
unsigned __int64 v78; // [rsp+60h] [rbp+27h]
void *v79[2]; // [rsp+68h] [rbp+2Fh] BYREF
__int64 v80; // [rsp+78h] [rbp+3Fh]
unsigned __int64 v81; // [rsp+80h] [rbp+47h]
v2 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v56 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v56);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v2 = qword_1406C2EC0;
}
v74 = 11;
v75 = 15;
Block[0] = (void *)0x6C69665F72617473LL;
Block[1] = (void *)7497076;
v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 344), Block);
v4 = cocos2d::CCString::boolValue(v3);
if ( v75 > 0xF )
{
v5 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v5);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
if ( v4 )
LevelSearchLayer::toggleStar(a1, nullptr);
for ( i = 0; i < 8; ++i )
LevelSearchLayer::toggleDifficultyNum(a1, i, 0);
for ( j = 0; j <= 5; ++j )
LevelSearchLayer::toggleTimeNum(a1, j, 0);
v8 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v57 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v57);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v8 = qword_1406C2EC0;
}
*(_OWORD *)v76 = 0;
v77 = 0;
v78 = 15;
v76[0] = sub_14003AA10(0x20u);
v77 = 18;
v78 = 31;
strcpy((char *)v76[0], "uncompleted_filter");
v9 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v8 + 344), v9, v76);
if ( v78 > 0xF )
{
v10 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v10 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v10 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v10);
}
v77 = 0;
v78 = 15;
LOBYTE(v76[0]) = 0;
v11 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v58 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v58);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v11 = qword_1406C2EC0;
}
*(_OWORD *)v79 = 0;
v80 = 0;
v81 = 15;
v79[0] = sub_14003AA10(0x20u);
v80 = 16;
v81 = 31;
strcpy((char *)v79[0], "completed_filter");
v12 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v11 + 344), v12, v79);
if ( v81 > 0xF )
{
v13 = v79[0];
if ( v81 + 1 >= 0x1000 )
{
v13 = *((void **)v79[0] - 1);
if ( (unsigned __int64)((char *)v79[0] - (char *)v13 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v13);
}
v80 = 0;
v81 = 15;
LOBYTE(v79[0]) = 0;
v14 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v59 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v59);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v14 = qword_1406C2EC0;
}
v74 = 15;
v75 = 15;
strcpy((char *)Block, "featured_filter");
v15 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v14 + 344), v15, Block);
if ( v75 > 0xF )
{
v16 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v16 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v16 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v16);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
v17 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v60 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v60);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v17 = qword_1406C2EC0;
}
v77 = 11;
v78 = 15;
v76[0] = (void *)0x6C69665F676E6F73LL;
v76[1] = (void *)7497076;
v18 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v17 + 344), v18, v76);
if ( v78 > 0xF )
{
v19 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v19 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v19 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v19);
}
v77 = 0;
v78 = 15;
LOBYTE(v76[0]) = 0;
v20 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v61 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v61);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v20 = qword_1406C2EC0;
}
v74 = 15;
v75 = 15;
strcpy((char *)Block, "original_filter");
v21 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v20 + 344), v21, Block);
if ( v75 > 0xF )
{
v22 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v22 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v22 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v22);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
v23 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v62 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v62);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v23 = qword_1406C2EC0;
}
v77 = 11;
v78 = 15;
v76[0] = (void *)0x6C69665F506F7774LL;
v76[1] = (void *)7497076;
v24 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v23 + 344), v24, v76);
if ( v78 > 0xF )
{
v25 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v25 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v25 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v25);
}
v77 = 0;
v78 = 15;
LOBYTE(v76[0]) = 0;
v26 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v63 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v63);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v26 = qword_1406C2EC0;
}
*(_OWORD *)v79 = 0;
v80 = 0;
v81 = 15;
v79[0] = sub_14003AA10(0x20u);
v80 = 17;
v81 = 31;
strcpy((char *)v79[0], "enable_songFilter");
v27 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v26 + 344), v27, v79);
if ( v81 > 0xF )
{
v28 = v79[0];
if ( v81 + 1 >= 0x1000 )
{
v28 = *((void **)v79[0] - 1);
if ( (unsigned __int64)((char *)v79[0] - (char *)v28 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v28);
}
v80 = 0;
v81 = 15;
LOBYTE(v79[0]) = 0;
v29 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v64 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v64);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v29 = qword_1406C2EC0;
}
*(_OWORD *)Block = 0;
v74 = 0;
v75 = 15;
Block[0] = sub_14003AA10(0x20u);
v74 = 17;
v75 = 31;
strcpy((char *)Block[0], "customsong_filter");
v30 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v29 + 344), v30, Block);
if ( v75 > 0xF )
{
v31 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v31 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v31 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v31);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
v32 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v65 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v65);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v32 = qword_1406C2EC0;
}
v77 = 13;
v78 = 15;
strcpy((char *)v76, "nostar_filter");
HIWORD(v76[1]) = 0;
v33 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v32 + 344), v33, v76);
if ( v78 > 0xF )
{
v34 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v34 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v34 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v34);
}
v77 = 0;
v78 = 15;
LOBYTE(v76[0]) = 0;
v35 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v66 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v66);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v35 = qword_1406C2EC0;
}
v74 = 11;
v75 = 15;
Block[0] = (void *)0x6C69665F6E696F63LL;
Block[1] = (void *)7497076;
v36 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v35 + 344), v36, Block);
if ( v75 > 0xF )
{
v37 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v37 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v37 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v37);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
v38 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v67 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v67);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v38 = qword_1406C2EC0;
}
v77 = 13;
v78 = 15;
strcpy((char *)v76, "follow_filter");
HIWORD(v76[1]) = 0;
v39 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v38 + 344), v39, v76);
if ( v78 > 0xF )
{
v40 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v40 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v40 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v40);
}
v77 = 0;
v78 = 15;
LOBYTE(v76[0]) = 0;
v41 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v68 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v68);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v41 = qword_1406C2EC0;
}
v74 = 13;
v75 = 15;
strcpy((char *)Block, "friend_filter");
HIWORD(Block[1]) = 0;
v42 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v41 + 344), v42, Block);
if ( v75 > 0xF )
{
v43 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v43 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v43 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v43);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
v44 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v69 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v69);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v44 = qword_1406C2EC0;
}
v77 = 11;
v78 = 15;
v76[0] = (void *)0x6C69665F63697065LL;
v76[1] = (void *)7497076;
v45 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v44 + 344), v45, v76);
if ( v78 > 0xF )
{
v46 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v46 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v46 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v46);
}
v77 = 0;
v78 = 15;
LOBYTE(v76[0]) = 0;
v47 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v70 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v70);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v47 = qword_1406C2EC0;
}
v74 = 13;
v75 = 15;
strcpy((char *)Block, "mythic_filter");
HIWORD(Block[1]) = 0;
v48 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v47 + 344), v48, Block);
if ( v75 > 0xF )
{
v49 = Block[0];
if ( v75 + 1 >= 0x1000 )
{
v49 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v49 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v49);
}
v74 = 0;
v75 = 15;
LOBYTE(Block[0]) = 0;
v50 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v71 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v71);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v50 = qword_1406C2EC0;
}
*(_OWORD *)v79 = 0;
v80 = 0;
v81 = 15;
v79[0] = sub_14003AA10(0x20u);
v80 = 16;
v81 = 31;
strcpy((char *)v79[0], "legendary_filter");
v51 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v50 + 344), v51, v79);
if ( v81 > 0xF )
{
v52 = v79[0];
if ( v81 + 1 >= 0x1000 )
{
v52 = *((void **)v79[0] - 1);
if ( (unsigned __int64)((char *)v79[0] - (char *)v52 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v52);
}
v80 = 0;
v81 = 15;
LOBYTE(v79[0]) = 0;
v53 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v72 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v72);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v53 = qword_1406C2EC0;
}
v77 = 12;
v78 = 15;
strcpy((char *)v76, "demon_filter");
BYTE5(v76[1]) = 0;
HIWORD(v76[1]) = 0;
v54 = cocos2d::CCString::createWithFormat("%i", 0);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v53 + 344), v54, v76);
if ( v78 > 0xF )
{
v55 = v76[0];
if ( v78 + 1 >= 0x1000 )
{
v55 = *((void **)v76[0] - 1);
if ( (unsigned __int64)((char *)v76[0] - (char *)v55 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v55);
}
}