//
// LevelInfoLayer::tryCloneLevel from 0x10002c1f0 to 0x10002c2e0 (240 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x100028e4c
//
// This function is hookable on this platform (idp: arm, 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 10:57:28 +0000
//
__int64 __fastcall LevelInfoLayer::tryCloneLevel(__int64 result)
{
__int64 v1; // x19
_DWORD *v2; // x8
__int64 v3; // x19
__int64 v4; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v6; // [xsp+1Fh] [xbp-11h]
if ( (*(_BYTE *)(result + 488) & 1) == 0 )
{
v1 = result;
v2 = *(_DWORD **)(result + 504);
if ( v2[245] - v2[246] == 1 )
{
return LevelInfoLayer::confirmClone(result);
}
else if ( (int)v2[251] < 5 )
{
v4 = NumberInputLayer::create();
*(_DWORD *)(v4 + 692) = 6;
*(_QWORD *)(v4 + 744) = v1 + 456;
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1312LL))(v4);
}
else
{
sub_100009900(__p, "Too many failed attempts!");
v3 = FLAlertLayer::create_1(0, "Error", __p, "OK", 0, 300.0);
if ( v6 < 0 )
operator delete(__p[0]);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 1312LL))(v3);
}
}
return result;
}