//
// LevelSearchLayer::toggleTimeNum from 0x10062b700 to 0x10062b86a (362 bytes)
//
// 12 xrefs:
// > LevelSearchLayer::init @ 0x100629d17
// > LevelSearchLayer::init @ 0x100629d3a
// > LevelSearchLayer::init @ 0x100629d5d
// > LevelSearchLayer::init @ 0x100629d80
// > LevelSearchLayer::init @ 0x100629da3
// > LevelSearchLayer::init @ 0x100629dc6
// > LevelSearchLayer::clearFilters @ 0x10062bd4a
// > LevelSearchLayer::clearFilters @ 0x10062bd59
// > LevelSearchLayer::clearFilters @ 0x10062bd68
// > LevelSearchLayer::clearFilters @ 0x10062bd77
// > LevelSearchLayer::clearFilters @ 0x10062bd86
// > LevelSearchLayer::clearFilters @ 0x10062bd95
//
// 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
//
void __fastcall LevelSearchLayer::toggleTimeNum(LevelSearchLayer *a1, int a2, bool a3)
{
double v3; // xmm0_8
unsigned int v4; // ebx
cocos2d::CCString *v6; // rax
const char *CString; // r14
size_t v8; // rax
size_t v9; // r13
char *v10; // r15
size_t v11; // rbx
__int64 v12; // rax
GameLevelManager *v13; // rax
char v14; // [rsp+0h] [rbp-60h]
__int64 v15; // [rsp+0h] [rbp-60h]
cocos2d::CCObject *v16; // [rsp+8h] [rbp-58h]
bool v18; // [rsp+18h] [rbp-48h]
_QWORD __dst[2]; // [rsp+20h] [rbp-40h] BYREF
void *__p; // [rsp+30h] [rbp-30h]
if ( a1->m_type == 1 )
return;
v4 = a2;
v16 = (cocos2d::CCObject *)sub_1007AB580("%i", (char)a1->m_difficultyDict);
v6 = (cocos2d::CCString *)sub_1007AB580("T%i", v14);
CString = cocos2d::CCString::getCString(v6);
v8 = strlen(CString);
if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v3);
v9 = v8;
v18 = a3;
if ( v8 >= 0x17 )
{
v11 = 26;
if ( (v8 | 7) != 0x17 )
v11 = (v8 | 7) + 1;
v10 = (char *)operator new(v11);
__p = v10;
__dst[0] = v11 + 1;
v4 = a2;
__dst[1] = v9;
}
else
{
LOBYTE(__dst[0]) = 2 * v8;
v10 = (char *)__dst + 1;
if ( !v8 )
goto LABEL_10;
}
memmove(v10, CString, v9);
LABEL_10:
v10[v9] = 0;
cocos2d::CCDictionary::setObject_1(v15, v16, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
v12 = sub_1007200C0(a1->m_lengthSprites, v4);
if ( a3 )
{
BYTE2(__dst[0]) = -1;
LOWORD(__dst[0]) = -1;
}
else
{
memset(__dst, 125, 3);
}
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v12 + 1056LL))(v12, __dst);
v13 = GameLevelManager::sharedState();
GameLevelManager::setLenVal(v13, v4, v18);
}