//
// LevelInfoLayer::confirmClone from 0x1002c2080 to 0x1002c218c (268 bytes)
//
// 3 xrefs:
// > LevelInfoLayer::tryCloneLevel @ 0x1002c21e7
// > LevelInfoLayer::numberInputClosed @ 0x1002c4725
// > LevelInfoLayer::init @ 0x1002be878
//
// 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 LevelInfoLayer::confirmClone(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
int v2; // r14d
GameManager *v3; // rax
bool v4; // zf
const char *v5; // r14
size_t v6; // r15
__int64 v7; // rbx
_QWORD v8[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( !a1->m_isBusy )
{
v2 = a1->m_level->m_userID.random - a1->m_level->m_userID.seed;
v3 = GameManager::sharedState();
v4 = v2 == v3->m_playerUserID.random - v3->m_playerUserID.seed;
v5 = "Create a copy of this level?";
if ( v4 )
v5 = "Create a copy of this level?\n(Creator enabled)";
v6 = 44;
if ( v4 )
v6 = 70;
__p = operator new((v6 | 7) + 1);
v8[0] = (v6 | 7) + 2;
v8[1] = v6;
memcpy(__p, v5, v6);
*((_BYTE *)__p + v6) = 0;
v7 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Clone Level", v8, "NO", "YES", 300.0);
if ( (v8[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1288LL))(v7);
}
}