//
// LevelListLayer::onShare from 0x140307e20 to 0x1403080a6 (646 bytes)
//
// 2 xrefs:
// > LevelListLayer::init @ 0x140304d6d
// > ??> @ 0x1406d4568
//
// 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 LevelListLayer::onShare(LevelListLayer *a1, cocos2d::CCObject *a2)
{
CCTextInputNode *m_titleInput; // rcx
GJAccountManager *v4; // rax
__int64 v5; // rax
FLAlertLayer *v6; // rbx
GJLevelList *m_levelList; // rbx
ShareListLayer *v8; // rdi
void (*show)(FLAlertLayer *); // rdx
__int128 v10; // [rsp+50h] [rbp-48h] BYREF
__int64 v11; // [rsp+60h] [rbp-38h]
__int64 v12; // [rsp+68h] [rbp-30h]
_BYTE v13[32]; // [rsp+70h] [rbp-28h] BYREF
if ( !a1->m_exiting )
{
m_titleInput = a1->m_titleInput;
if ( m_titleInput )
m_titleInput->onClickTrackNode(m_titleInput, 0);
v4 = GJAccountManager::sharedState();
if ( v4->m_accountID - v4->m_unkInt1 > 0 )
{
m_levelList = a1->m_levelList;
v8 = (ShareListLayer *)operator new(0x290u);
FLAlertLayer::FLAlertLayer(v8);
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (ShareListLayer_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&ShareListLayer::`vftable';
v8->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&ShareListLayer::`vftable';
v8->m_list = nullptr;
v8->m_friendsOnlyToggler = nullptr;
v8->m_friendsOnlyLabel = nullptr;
if ( ShareListLayer::init(v8, m_levelList) )
{
cocos2d::CCObject::autorelease(v8);
}
else
{
((void (__fastcall *)(ShareListLayer *, __int64))v8->~ShareListLayer)(v8, 1);
v8 = nullptr;
}
show = (void (*)(FLAlertLayer *))v8->show;
if ( show == FLAlertLayer::show )
FLAlertLayer::show(v8);
else
show(v8);
}
else
{
v10 = 0;
*(_QWORD *)&v10 = sub_14003AA10(0x70u);
v11 = 111;
v12 = 111;
strcpy(
(char *)v10,
"You need an account to share lists. You can create one for free from settings in the main menu.");
v5 = sub_14003BDB0((__int64)v13, (__int64)&v10);
v6 = FLAlertLayer::create(0, (int)"Account Needed", v5, (__int64)"Close", 0, 1133903872, 0, 0, 1065353216);
sub_14003A830((__int64)&v10);
v6->show(v6);
}
}
}