//
// LevelBrowserLayer::onSearch from 0x4a517c to 0x4a52be (322 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:49:53 +0000
//
int __fastcall LevelBrowserLayer::onSearch(LevelBrowserLayer *this, cocos2d::CCObject *a2)
{
int v3; // r3
const char *v4; // r8
size_t v5; // r0
_DWORD *v6; // r11
int v8[3]; // [sp+18h] [bp-44h] BYREF
int v9[3]; // [sp+24h] [bp-38h] BYREF
int v10[3]; // [sp+30h] [bp-2Ch] BYREF
int v11[3]; // [sp+3Ch] [bp-20h] BYREF
int v12[3]; // [sp+48h] [bp-14h] BYREF
v3 = *((_DWORD *)this + 125);
if ( v3 )
{
if ( *(_DWORD *)(v3 + 264) == 101 )
v4 = "Find Template";
else
v4 = "Find Level";
}
else
{
v4 = "Find Level";
}
memset(v8, 0, sizeof(v8));
v5 = strlen(v4);
std::string::__init(v8, v4, v5);
memset(v9, 0, sizeof(v9));
std::string::__init(v9, &unk_B6B226, 0);
memset(v10, 0, sizeof(v10));
std::string::__init(v10, "Search", 6u);
std::string::basic_string(v11, (int)v8);
memset(v12, 0, sizeof(v12));
std::string::__init(v12, "OK", 2u);
v6 = (_DWORD *)SetTextPopup::create((int)v9, (int)v10, 20, (int)v11, (int)v12, 1, 60.0, 0, 1, 0);
std::string::~string((int)v12);
std::string::~string((int)v11);
std::string::~string((int)v10);
std::string::~string((int)v9);
v6[142] = (char *)this + 452;
if ( *((_BYTE *)this + 548) )
v6[116] = (*(int (__fastcall **)(LevelBrowserLayer *))(*(_DWORD *)this + 52))(this) + 1;
(*(void (__fastcall **)(_DWORD *))(*v6 + 656))(v6);
return std::string::~string((int)v8);
}