//
// LevelSearchLayer::demonFilterSelectClosed from 0x10005ce78 to 0x10005cf38 (192 bytes)
//
// 2 xrefs:
// > sub_10005CF54 @ 0x10005cf58
// > ??> @ 0x1008becc8
//
// 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 10:57:48 +0000
//
void __fastcall LevelSearchLayer::demonFilterSelectClosed(__int64 a1, __int64 a2)
{
__int64 v4; // x0
__int64 v5; // x0
const std::string::value_type *CString; // x0
std::string *v7; // x0
__int64 v8; // x19
__int64 v9; // x0
std::string *v10; // x1
__int64 v11; // x0
std::string v12; // [xsp+8h] [xbp-28h] BYREF
v4 = GameLevelManager::sharedState(a1);
GameLevelManager::setIntForKey(v4, a2, "demon_filter");
memset(&v12, 0, sizeof(v12));
if ( (_DWORD)a2 )
{
v5 = sub_1003065B0("difficulty_%02d_btn2_001.png", a2);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v5);
v7 = std::string::assign(&v12, CString);
}
else
{
v7 = std::string::assign(&v12, "difficulty_06_btn_001.png");
}
v8 = *(_QWORD *)(a1 + 488);
v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7);
if ( (v12.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v10 = &v12;
else
v10 = (std::string *)v12.__r_.__value_.__r.__words[0];
v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v10);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1160LL))(v8, v11);
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v12.__r_.__value_.__l.__data_);
}