//
// LevelBrowserLayer::loadLevelsFinished from 0x1402cc420 to 0x1402cc545 (293 bytes)
//
// 2 xrefs:
// > ??> @ 0x140585238
// > ??> @ 0x1406d2ca8
//
// 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 LevelBrowserLayer::loadLevelsFinished(LevelBrowserLayer *a1, cocos2d::CCArray *a2, const char *a3, int a4)
{
cocos2d::CCObject *v6; // rcx
GJSearchObject *v7; // rcx
__int64 v8; // rcx
char v9; // r8
int v10; // ecx
int v11; // ecx
int v12; // ecx
__int64 v13; // rax
unsigned int *v14; // rdx
__int64 v15; // rax
__int64 *v16; // rdx
__int64 *i; // r9
__int64 v18; // rax
__int64 v19; // rdx
__int64 v20; // rcx
if ( LevelBrowserLayer::isCorrect((LevelBrowserLayer *)((char *)a1 - 544), a3) )
{
v6 = *(cocos2d::CCObject **)&a1->m_obContentSize.height;
if ( v6 )
cocos2d::CCObject::release(v6);
*(_QWORD *)&a1->m_obContentSize.height = a2;
cocos2d::CCObject::retain(a2);
v7 = *(GJSearchObject **)&a1->m_sAdditionalTransform.b;
if ( v7 && GJSearchObject::isLevelSearchObject(v7) )
{
v9 = 0;
if ( *(_QWORD *)&a1->m_sInverse.b )
{
v10 = *(_DWORD *)(v8 + 320) - 98;
if ( !v10 || (v11 = v10 - 1) == 0 || (v12 = v11 - 1) == 0 || (unsigned int)(v12 - 2) <= 1 )
v9 = 1;
}
v13 = *(_QWORD *)&a1->m_obContentSize.height;
if ( v13 )
{
v14 = *(unsigned int **)(v13 + 56);
v15 = *v14;
if ( (_DWORD)v15 )
{
v16 = *((__int64 **)v14 + 2);
for ( i = &v16[v15 - 1]; v16 <= i; *(_BYTE *)(v18 + 728) = v9 )
{
v18 = *v16;
if ( !*v16 )
break;
++v16;
*(_BYTE *)(v18 + 727) = 0;
}
}
}
}
LevelBrowserLayer::setupLevelBrowser(
(LevelBrowserLayer *)((char *)a1 - 544),
*(cocos2d::CCArray **)&a1->m_obContentSize.height);
((void (__fastcall *)(cocos2d::CCCamera *, _QWORD))a1->m_pCamera->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::__vftable[4].update)(
a1->m_pCamera,
0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&a1->m_fRotationX + 320LL))(*(_QWORD *)&a1->m_fRotationX, 0);
v20 = *(_QWORD *)&a1->m_obAnchorPoint.y;
if ( v20 )
{
LOBYTE(v19) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v20 + 320LL))(v20, v19);
}
}
}