//
// LevelSearchLayer::onSearch from 0x7e41b0 to 0x7e433c (396 bytes)
//
// 4 xrefs:
// > LevelSearchLayer::keyDown @ 0x7e4c14
// > ??> @ 0x61408
// > LevelSearchLayer::init @ 0x7e2cd4
// > ??> @ 0x1542510
//
// This function is hookable on this platform (idp: arm, 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 12:54:28 +0000
//
__int64 __fastcall LevelSearchLayer::onSearch(CCTextInputNode **this, cocos2d::CCObject *a2)
{
_BOOL4 v3; // w21
LevelBrowserLayer *SearchObject; // x21
cocos2d::CCDirector *v5; // x0
cocos2d::CCDirector *v6; // x20
GJSearchObject *v7; // x1
cocos2d::CCTransitionFade *v8; // x0
cocos2d::CCScene *v9; // x1
cocos2d::CCScene *v10; // x0
cocos2d::CCDirector *v12; // [xsp+30h] [xbp+30h] BYREF
size_t v13; // [xsp+38h] [xbp+38h]
void *v14; // [xsp+40h] [xbp+40h]
__int64 v15[2]; // [xsp+48h] [xbp+48h] BYREF
void *v16; // [xsp+58h] [xbp+58h]
cocos2d::CCDirector *v17; // [xsp+60h] [xbp+60h] BYREF
size_t v18; // [xsp+68h] [xbp+68h]
void *v19; // [xsp+70h] [xbp+70h]
LevelSearchLayer::onClose((LevelSearchLayer *)this, nullptr);
CCTextInputNode::getString(*(this + 55), (__int64 *)&v12);
v15[0] = 0;
v15[1] = 0;
v16 = nullptr;
std::string::__init(v15, &byte_11B8890, 0);
v3 = sub_7DDFD4((__int64)&v12, (__int64)v15);
if ( (v15[0] & 1) != 0 )
{
operator delete(v16);
if ( !v3 )
goto LABEL_3;
LABEL_12:
LevelSearchLayer::onMostLikes((LevelSearchLayer *)this, nullptr);
goto LABEL_8;
}
if ( v3 )
goto LABEL_12;
LABEL_3:
v17 = nullptr;
v18 = 0;
v19 = nullptr;
if ( ((unsigned __int8)v12 & 1) != 0 )
{
std::string::__init((__int64 *)&v17, v14, v13);
}
else
{
v17 = v12;
v18 = v13;
v19 = v14;
}
SearchObject = (LevelBrowserLayer *)LevelSearchLayer::getSearchObject((LevelSearchLayer *)this, 0, (__int64)&v17);
v5 = (cocos2d::CCDirector *)(unsigned __int8)v17;
if ( ((unsigned __int8)v17 & 1) != 0 )
operator delete(v19);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
v8 = (cocos2d::CCTransitionFade *)LevelBrowserLayer::scene(SearchObject, v7);
v10 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v8, 0.5, v9);
cocos2d::CCDirector::pushScene(v6, v10);
LABEL_8:
if ( ((unsigned __int8)v12 & 1) != 0 )
operator delete(v14);
return _stack_chk_guard;
}