//
// LevelSearchLayer::onMagic from 0x1403112b0 to 0x140311362 (178 bytes)
//
// 2 xrefs:
// > LevelSearchLayer::init @ 0x14030d000
// > ??> @ 0x1406d47c0
//
// 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
//
void LevelSearchLayer::onMagic(LevelSearchLayer *a1, cocos2d::CCObject *a2)
{
char *SearchObject; // rbx
__int64 v4; // rcx
struct cocos2d::CCScene *v5; // rdi
__int64 v6; // rdx
__int64 v7; // rcx
LevelBrowserLayer *v8; // rax
struct cocos2d::CCTransitionFade *v9; // rbx
__int64 v10; // rcx
cocos2d::CCDirector *v11; // rax
__int128 v12; // [rsp+20h] [rbp-28h] BYREF
__int64 v13; // [rsp+30h] [rbp-18h]
__int64 v14; // [rsp+38h] [rbp-10h]
a1->m_searchInput->onClickTrackNode(a1->m_searchInput, 0);
v13 = 0;
v12 = 0;
LOBYTE(v12) = 0;
v14 = 15;
SearchObject = LevelSearchLayer::getSearchObject(a1, 7, (__int64)&v12);
v5 = (struct cocos2d::CCScene *)cocos2d::CCScene::create(v4);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v7, v6) + 224) = v5;
v8 = LevelBrowserLayer::create((GJSearchObject *)SearchObject);
v5->addChild_1(v5, v8);
v9 = cocos2d::CCTransitionFade::create(0.5, v5);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::pushScene(v11, v9);
}