//
// ShareLevelLayer::onSettings from 0x140490120 to 0x14049026e (334 bytes)
//
// 2 xrefs:
// > ShareLevelLayer::init @ 0x14048f940
// > ??> @ 0x1406dc074
//
// 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=2
void ShareLevelLayer::onSettings(ShareLevelLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v3; // rcx
GJGameLevel *m_level; // rbx
ShareLevelSettingsLayer *v5; // rdi
void (*show)(FLAlertLayer *); // rdx
void *v7; // [rsp+30h] [rbp+8h]
v3 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v7 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v3 = (GameManager *)qword_1406C2ED8;
}
GameManager::setGameVariable(v3, "0029", 1);
m_level = a1->m_level;
v5 = (ShareLevelSettingsLayer *)operator new(0x2A0u);
FLAlertLayer::FLAlertLayer(v5);
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (ShareLevelSettingsLayer_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&ShareLevelSettingsLayer::`vftable';
v5->NumberInputDelegate::__vftable = (NumberInputDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';
if ( ShareLevelSettingsLayer::init(v5, m_level) )
{
cocos2d::CCObject::autorelease(v5);
}
else
{
((void (__fastcall *)(ShareLevelSettingsLayer *, __int64))v5->~ShareLevelSettingsLayer)(v5, 1);
v5 = nullptr;
}
show = (void (*)(FLAlertLayer *))v5->show;
if ( show == FLAlertLayer::show )
FLAlertLayer::show(v5);
else
show(v5);
}