//
// ShareLevelSettingsLayer::onUnlisted from 0x100277814 to 0x1002778e4 (208 bytes)
//
// 1 xrefs:
// > ShareLevelSettingsLayer::init @ 0x10027729c
//
// 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 __fastcall ShareLevelSettingsLayer::onUnlisted(ShareLevelSettingsLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
GameManager *v4; // x0
__int64 v5; // x20
GJGameLevel *m_level; // x8
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v8; // [xsp+1Fh] [xbp-11h]
a1->m_level->m_unlisted ^= 1u;
v3 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v3, "0070") )
{
v4 = GameManager::sharedState();
GameManager::setGameVariable(v4, "0070", 1);
sub_100009900(
__p,
"An unlisted level can only be found by entering its levelID. Once a level is unlisted, it cannot change back to listed.");
v5 = FLAlertLayer::create_1(0, "Unlisted", __p, "OK", 0, 320.0);
if ( v8 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1288LL))(v5);
}
m_level = a1->m_level;
if ( !m_level->m_unlisted )
m_level->m_friendsOnly = 0;
ShareLevelSettingsLayer::updateSettingsState(a1);
}