//
// LevelSearchLayer::toggleTimeNum from 0x14043b3e0 to 0x14043b5a2 (450 bytes)
//
// 3 xrefs:
// > LevelSearchLayer::init @ 0x140436278
// > LevelSearchLayer::clearFilters @ 0x140436ef8
// > ??> @ 0x140926f3c
//
// 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 11:32:19 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall LevelSearchLayer::toggleTimeNum(__int64 a1, unsigned int a2, unsigned __int8 a3)
{
unsigned int v3; // ebp
cocos2d::CCString *v6; // rax
const char *CString; // rax
size_t v8; // r8
__int64 v9; // rbx
struct cocos2d::CCString *v10; // rax
void *v11; // rcx
char *v12; // rcx
__int16 *v13; // rdx
__int64 v14; // rcx
__int16 v15; // [rsp+30h] [rbp-58h] BYREF
char v16; // [rsp+32h] [rbp-56h]
_WORD v17[2]; // [rsp+34h] [rbp-54h] BYREF
void *v18; // [rsp+38h] [rbp-50h]
void *Block[2]; // [rsp+40h] [rbp-48h] BYREF
__int64 v20; // [rsp+50h] [rbp-38h]
unsigned __int64 v21; // [rsp+58h] [rbp-30h]
v3 = a3;
if ( *(_DWORD *)(a1 + 432) != 1 )
{
v6 = cocos2d::CCString::createWithFormat("T%i", a2);
CString = cocos2d::CCString::getCString(v6);
*(_OWORD *)Block = 0;
v20 = 0;
v21 = 0;
v8 = -1;
do
++v8;
while ( CString[v8] );
sub_14003D230(Block, CString, v8);
v9 = *(_QWORD *)(a1 + 480);
v10 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v3);
cocos2d::CCDictionary::setObject(v9, v10, Block);
if ( v21 > 0xF )
{
v11 = Block[0];
if ( v21 + 1 >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
}
v12 = (char *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 472), a2) + 368;
if ( (_BYTE)v3 )
{
v15 = -1;
v16 = -1;
v13 = &v15;
}
else
{
v15 = 32125;
memset(v17, 125, 3);
v13 = v17;
}
(**(void (__fastcall ***)(char *, __int16 *))v12)(v12, v13);
v14 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v18 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v18);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v14 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::setLenVal(v14, a2, v3);
}
}