//
// MoreSearchLayer::onCompleted from 0x140314c10 to 0x140314e29 (537 bytes)
//
// 2 xrefs:
// > MoreSearchLayer::init @ 0x140313246
// > ??> @ 0x1406d48d4
//
// 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=4
void MoreSearchLayer::onCompleted(MoreSearchLayer *a1, cocos2d::CCObject *a2)
{
__int64 v2; // rbx
cocos2d::CCString *v3; // rax
BOOL v4; // edi
void *v5; // rcx
__int64 v6; // rbx
struct cocos2d::CCString *v7; // rax
void *v8; // rcx
void *v9; // [rsp+20h] [rbp-58h]
void *v10; // [rsp+20h] [rbp-58h]
void *Block[2]; // [rsp+28h] [rbp-50h] BYREF
__int64 v12; // [rsp+38h] [rbp-40h]
unsigned __int64 v13; // [rsp+40h] [rbp-38h]
void *v14[2]; // [rsp+48h] [rbp-30h] BYREF
__int64 v15; // [rsp+58h] [rbp-20h]
unsigned __int64 v16; // [rsp+60h] [rbp-18h]
v2 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v9 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v2 = qword_1406C2EC0;
}
*(_OWORD *)Block = 0;
Block[0] = sub_14003AA10(0x20u);
v12 = 16;
v13 = 31;
strcpy((char *)Block[0], "completed_filter");
v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 344), Block);
v4 = cocos2d::CCString::boolValue(v3);
if ( v13 > 0xF )
{
v5 = Block[0];
if ( v13 + 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);
}
v12 = 0;
v13 = 15;
LOBYTE(Block[0]) = 0;
v6 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v10 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v6 = qword_1406C2EC0;
}
*(_OWORD *)v14 = 0;
v15 = 0;
v16 = 15;
v14[0] = sub_14003AA10(0x20u);
v15 = 16;
v16 = 31;
strcpy((char *)v14[0], "completed_filter");
v7 = cocos2d::CCString::createWithFormat("%i", !v4);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v6 + 344), v7, v14);
if ( v16 > 0xF )
{
v8 = v14[0];
if ( v16 + 1 >= 0x1000 )
{
v8 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
}