//
// LevelInfoLayer::tryCloneLevel from 0x1002aedc0 to 0x1002aeebb (251 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x1002ab476
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:28:00 +0000
//
void __fastcall LevelInfoLayer::tryCloneLevel(__int64 a1, __int64 a2, __int64 a3)
{
_DWORD *v3; // rax
__int64 v4; // rbx
__int64 v5; // rax
_QWORD v6[2]; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
if ( !*(_BYTE *)(a1 + 488) )
{
v3 = *(_DWORD **)(a1 + 504);
if ( v3[245] - v3[246] == 1 )
{
LevelInfoLayer::confirmClone(a1, a2, a3);
}
else if ( (int)v3[251] < 5 )
{
v5 = sub_100489140();
*(_DWORD *)(v5 + 692) = 6;
*(_QWORD *)(v5 + 744) = a1 + 456;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1312LL))(v5);
}
else
{
__p = operator new(0x20u);
v6[0] = 33;
v6[1] = 25;
strcpy((char *)__p, "Too many failed attempts!");
v4 = FLAlertLayer::create_1(0, "Error", v6, "OK", 0, 300.0);
if ( (v6[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1312LL))(v4);
}
}
}