//
// MoreSearchLayer::onCompleted from 0x14043dae0 to 0x14043dd1d (573 bytes)
//
// 2 xrefs:
// > MoreSearchLayer::init @ 0x14043c01c
// > ??> @ 0x140926f9c
//
// 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:20 +0000
//
// Hidden C++ exception states: #wind=4
void MoreSearchLayer::onCompleted()
{
__int64 v0; // rbx
cocos2d::CCString *v1; // rax
BOOL v2; // edi
void *v3; // r8
__int64 v4; // rbx
__int64 v5; // rbx
struct cocos2d::CCString *v6; // rax
void *v7; // rcx
void *v8; // [rsp+30h] [rbp-58h]
void *v9; // [rsp+30h] [rbp-58h]
void *Block[2]; // [rsp+38h] [rbp-50h] BYREF
__int64 v11; // [rsp+48h] [rbp-40h]
unsigned __int64 v12; // [rsp+50h] [rbp-38h]
void *v13[2]; // [rsp+58h] [rbp-30h] BYREF
__int64 v14; // [rsp+68h] [rbp-20h]
unsigned __int64 v15; // [rsp+70h] [rbp-18h]
v0 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v8 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v8);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v0 = *(_QWORD *)&qword_14090BFB0;
}
*(_OWORD *)Block = 0;
Block[0] = sub_14003D460(0x20u);
v11 = 16;
v12 = 31;
strcpy((char *)Block[0], "completed_filter");
v1 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v0 + 848), Block);
v2 = cocos2d::CCString::boolValue(v1);
if ( v12 > 0xF )
{
v3 = Block[0];
if ( v12 + 1 >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v3);
}
v11 = 0;
v12 = 15;
LOBYTE(Block[0]) = 0;
v4 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v9 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v9);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v4 = *(_QWORD *)&qword_14090BFB0;
}
*(_OWORD *)v13 = 0;
v14 = 0;
v15 = 0;
v13[0] = sub_14003D460(0x20u);
v14 = 16;
v15 = 31;
strcpy((char *)v13[0], "completed_filter");
v5 = *(_QWORD *)(v4 + 848);
v6 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, !v2);
cocos2d::CCDictionary::setObject(v5, v6, v13);
if ( v15 > 0xF )
{
v7 = v13[0];
if ( v15 + 1 >= 0x1000 )
{
v7 = *((void **)v13[0] - 1);
if ( (unsigned __int64)((char *)v13[0] - (char *)v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v7);
}
}