//
// LevelBrowserLayer::loadLevelsFinished from 0x7fce0c to 0x7fcf50 (324 bytes)
//
// 4 xrefs:
// > `non-virtual thunk to'LevelBrowserLayer::loadLevelsFinished @ 0x7fcf54
// > LevelListLayer::loadLevelsFinished @ 0xbaca7c
// > ??> @ 0x81bb0
// > ??> @ 0x143e8a8
//
// 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:42 +0000
//
__int64 __fastcall LevelBrowserLayer::loadLevelsFinished(cocos2d::CCArray **this, cocos2d::CCArray *a2, const char *a3)
{
__int64 result; // x0
cocos2d::CCObject *v6; // x0
GJSearchObject *v7; // x0
__int64 v8; // x0
char v9; // w3
__int64 v10; // x0
unsigned int *v11; // x0
unsigned int v12; // w1
__int64 *v13; // x0
__int64 *i; // x2
__int64 v15; // x1
result = LevelBrowserLayer::isCorrect((LevelBrowserLayer *)this, a3);
if ( (_BYTE)result )
{
v6 = *(this + 82);
if ( v6 )
cocos2d::CCObject::release(v6);
*(this + 82) = a2;
cocos2d::CCObject::retain(a2);
v7 = *(this + 83);
if ( v7 && (unsigned __int8)GJSearchObject::isLevelSearchObject(v7) )
{
v8 = (__int64)*(this + 83);
if ( v8 && *(this + 89) )
{
switch ( *(_DWORD *)(v8 + 316) )
{
case 'b':
case 'c':
case 'd':
case 'f':
case 'g':
v9 = 1;
break;
default:
goto LABEL_8;
}
}
else
{
LABEL_8:
v9 = 0;
}
v10 = (__int64)*(this + 82);
if ( v10 )
{
v11 = *(unsigned int **)(v10 + 56);
v12 = *v11;
if ( *v11 )
{
v13 = *((__int64 **)v11 + 2);
for ( i = &v13[v12 - 1]; i >= v13; *(_BYTE *)(v15 + 772) = v9 )
{
v15 = *v13;
if ( !*v13 )
break;
++v13;
*(_BYTE *)(v15 + 771) = 0;
}
}
}
}
LevelBrowserLayer::updateSelectUI(this);
LevelBrowserLayer::setupLevelBrowser((LevelBrowserLayer *)this, *(this + 82));
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 92) + 344LL))(*(this + 92), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 75) + 344LL))(*(this + 75), 0);
result = (__int64)*(this + 81);
if ( result )
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)result + 344LL))(result, 1);
}
return result;
}