//
// MoreSearchLayer::onCoins from 0x14043ed00 to 0x14043ef38 (568 bytes)
//
// 2 xrefs:
// > MoreSearchLayer::init @ 0x14043c2d2
// > ??> @ 0x140926ffc
//
// 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
//
void MoreSearchLayer::onCoins()
{
__int64 v0; // rcx
cocos2d::CCString *v1; // rax
BOOL v2; // esi
void *v3; // r8
__int64 v4; // rbx
__int64 v5; // rbx
struct cocos2d::CCString *v6; // rax
void *v7; // rcx
void *v8; // [rsp+30h] [rbp-50h]
void *v9; // [rsp+30h] [rbp-50h]
void *Block[2]; // [rsp+38h] [rbp-48h] BYREF
__int64 v11; // [rsp+48h] [rbp-38h]
unsigned __int64 v12; // [rsp+50h] [rbp-30h]
void *v13[2]; // [rsp+58h] [rbp-28h] BYREF
__int64 v14; // [rsp+68h] [rbp-18h]
unsigned __int64 v15; // [rsp+70h] [rbp-10h]
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;
}
v11 = 11;
v12 = 15;
Block[0] = (void *)0x6C69665F6E696F63LL;
Block[1] = (void *)7497076;
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;
}
v14 = 11;
v15 = 15;
v13[0] = (void *)0x6C69665F6E696F63LL;
v13[1] = (void *)7497076;
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);
}
}