//
// LevelBrowserLayer::onFavorites from 0x7fb584 to 0x7fb6d8 (340 bytes)
//
// 3 xrefs:
// > ??> @ 0x9f4a8
// > LevelBrowserLayer::init @ 0x7fa640
// > ??> @ 0x15446a0
//
// 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:41 +0000
//
__int64 __fastcall LevelBrowserLayer::onFavorites(LevelBrowserLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x21
unsigned __int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x2
cocos2d::CCDirector *v7; // x0
size_t v8; // x1
__int64 *v9; // x0
cocos2d::CCDirector *v10; // x19
GJSearchObject *v11; // x1
AppDelegate *v12; // x0
cocos2d::CCScene *v13; // x1
cocos2d::CCScene *v14; // x0
cocos2d::CCDirector *v16; // [xsp+30h] [xbp+30h] BYREF
size_t v17; // [xsp+38h] [xbp+38h]
void *v18; // [xsp+40h] [xbp+40h]
(*(void (__fastcall **)(LevelBrowserLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);
(*(void (__fastcall **)(LevelBrowserLayer *, _QWORD))(*(_QWORD *)this + 1088LL))(this, 0);
v3 = GJSearchObject::create(100);
v4 = *((_QWORD *)this + 83);
if ( v4 )
{
*(_DWORD *)(v3 + 420) = *(_DWORD *)(v4 + 420);
v16 = nullptr;
v5 = *((_QWORD *)this + 83);
v17 = 0;
v6 = v5 + 320;
v18 = nullptr;
if ( (*(_BYTE *)(v5 + 320) & 1) != 0 )
{
std::string::__init((__int64 *)&v16, *(void **)(v5 + 336), *(_QWORD *)(v5 + 328));
}
else
{
v7 = *(cocos2d::CCDirector **)v6;
v8 = *(_QWORD *)(v6 + 8);
v18 = *(void **)(v6 + 16);
v16 = v7;
v17 = v8;
}
v9 = (__int64 *)(v3 + 320);
if ( (cocos2d::CCDirector **)(v3 + 320) != &v16 )
{
if ( ((unsigned __int8)v16 & 1) != 0 )
std::string::assign(v9, v18, v17);
else
std::string::assign(v9, (char *)&v16 + 1, (unsigned __int8)v16 >> 1);
}
v4 = (unsigned __int8)v16;
if ( ((unsigned __int8)v16 & 1) != 0 )
operator delete(v18);
}
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v4);
v12 = LevelBrowserLayer::scene((LevelBrowserLayer *)v3, v11);
v14 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v12, 0.5, v13);
cocos2d::CCDirector::replaceScene(v10, v14);
return _stack_chk_guard;
}