//
// ShareLevelLayer::onShare from 0x100281220 to 0x1002813a8 (392 bytes)
//
// 1 xrefs:
// > ShareLevelLayer::init @ 0x100280b06
//
// 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 ShareLevelLayer::onShare(ShareLevelLayer *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // rax
__int64 v3; // rbx
char *v4; // rdi
UploadPopup *v6; // rax
_QWORD v7[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
_QWORD v9[2]; // [rsp+18h] [rbp-28h] BYREF
char *v10; // [rsp+28h] [rbp-18h]
m_level = a1->m_level;
if ( m_level->m_isUploaded )
{
__p = operator new(0x28u);
v7[0] = 41;
v7[1] = 39;
strcpy((char *)__p, "This version has already been submitted");
v3 = FLAlertLayer::create_1(0, "Uploaded", v7, "OK", 0, 380.0);
if ( (v7[0] & 1) == 0 )
{
LABEL_5:
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 1288LL))(v3);
return;
}
v4 = (char *)__p;
LABEL_4:
operator delete(v4);
goto LABEL_5;
}
if ( m_level->m_isVerified.random - m_level->m_isVerified.seed != 1 && !m_level->m_unlisted )
{
v10 = (char *)operator new(0xF8u);
v9[0] = 249;
v9[1] = 246;
strcpy(
v10,
"You cannot share a level until you have completed it.\n"
"Complete the level in Normal mode to verify that it can be beaten!\n"
"A level cannot be verified if it has a Start Pos.\n"
"Unlisted levels do not need to be verified.");
v3 = FLAlertLayer::create_1(0, "Unverified", v9, "OK", 0, 380.0);
if ( (v9[0] & 1) == 0 )
goto LABEL_5;
v4 = v10;
goto LABEL_4;
}
v6 = UploadPopup::create(a1->m_level);
((void (__fastcall *)(UploadPopup *, cocos2d::CCObject *))v6->show)(v6, a2);
((void (__fastcall *)(ShareLevelLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(ShareLevelLayer *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}