//
// LevelInfoLayer::tryCloneLevel from 0x100028b08 to 0x100028bf8 (240 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x1000256b4
//
// 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::tryCloneLevel(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // x8
__int64 v4; // x19
NumberInputLayer *v5; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v7; // [xsp+1Fh] [xbp-11h]
if ( !a1->m_isBusy )
{
m_level = a1->m_level;
if ( m_level->m_password.random - m_level->m_password.seed == 1 )
{
LevelInfoLayer::confirmClone(a1, a2);
}
else if ( m_level->m_failedPasswordAttempts < 5 )
{
v5 = NumberInputLayer::create();
v5->m_maximum = 6;
v5->m_delegate = &a1->NumberInputDelegate;
((void (__fastcall *)(NumberInputLayer *))v5->show)(v5);
}
else
{
sub_100009900(__p, "Too many failed attempts!");
v4 = FLAlertLayer::create_1(0, "Error", __p, "OK", 0, 300.0);
if ( v7 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1288LL))(v4);
}
}
}