//
// LevelBrowserLayer::onMyOnlineLevels from 0x1402ce240 to 0x1402ce40c (460 bytes)
//
// 2 xrefs:
// > LevelBrowserLayer::init @ 0x1402ca40f
// > ??> @ 0x1406d2da4
//
// 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
//
// Hidden C++ exception states: #wind=3
void LevelBrowserLayer::onMyOnlineLevels(LevelBrowserLayer *a1, cocos2d::CCObject *a2)
{
GJAccountManager *v3; // rax
_QWORD *v4; // rax
size_t v5; // r8
GJSearchObject *v6; // rbx
__int64 v7; // rax
_QWORD *v8; // rax
size_t v9; // r8
struct cocos2d::CCScene *v10; // rax
struct cocos2d::CCTransitionFade *v11; // rbx
__int64 v12; // rcx
cocos2d::CCDirector *v13; // rax
void *v14; // [rsp+20h] [rbp-98h]
__int128 v15; // [rsp+28h] [rbp-90h] BYREF
__int64 v16; // [rsp+38h] [rbp-80h]
__int64 v17; // [rsp+40h] [rbp-78h]
__int128 v18; // [rsp+48h] [rbp-70h] BYREF
__int64 v19; // [rsp+58h] [rbp-60h]
__int64 v20; // [rsp+60h] [rbp-58h]
_QWORD v21[4]; // [rsp+68h] [rbp-50h] BYREF
_QWORD v22[4]; // [rsp+88h] [rbp-30h] BYREF
a1->setKeypadEnabled(a1, 0);
a1->setKeyboardEnabled(a1, 0);
if ( a1->m_searchObject->m_searchType == MyLists )
{
v3 = GJAccountManager::sharedState();
v4 = GameToolbox::intToString(v21, v3->m_accountID - v3->m_unkInt1);
if ( v4[3] > 0xFu )
v4 = (_QWORD *)*v4;
v15 = 0;
v16 = 0;
v17 = 0;
v5 = -1;
do
++v5;
while ( *((_BYTE *)v4 + v5) );
sub_14003A930(&v15, v4, v5);
v6 = (GJSearchObject *)GJSearchObject::create_1(5, (__int64)&v15);
sub_14003A830((__int64)v21);
v6->m_searchMode = 1;
}
else
{
v7 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v14 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v7 = qword_1406C2ED8;
}
v8 = GameToolbox::intToString(v22, *(_DWORD *)(v7 + 652) - *(_DWORD *)(v7 + 656));
if ( v8[3] > 0xFu )
v8 = (_QWORD *)*v8;
v18 = 0;
v19 = 0;
v20 = 0;
v9 = -1;
do
++v9;
while ( *((_BYTE *)v8 + v9) );
sub_14003A930(&v18, v8, v9);
v6 = (GJSearchObject *)GJSearchObject::create_1(5, (__int64)&v18);
sub_14003A830((__int64)v22);
}
v10 = LevelBrowserLayer::scene(v6);
v11 = cocos2d::CCTransitionFade::create(0.5, v10);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::replaceScene(v13, v11);
}