//
// LevelInfoLayer::tryCloneLevel from 0x49aab8 to 0x49ab66 (174 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:45 +0000
//
int __fastcall LevelInfoLayer::tryCloneLevel(int this, cocos2d::CCObject *a2)
{
int v2; // r4
int v3; // r5
_DWORD *v4; // r3
int *v5; // r4
int *v6; // r0
int v7; // r3
int v8[3]; // [sp+8h] [bp-10h] BYREF
v2 = *(unsigned __int8 *)(this + 356);
v3 = this;
if ( !*(_BYTE *)(this + 356) )
{
v4 = *(_DWORD **)(this + 364);
if ( v4[201] - v4[202] == 1 )
{
return LevelInfoLayer::confirmClone(this, (cocos2d::CCObject *)*(unsigned __int8 *)(this + 356));
}
else if ( (int)v4[207] <= 4 )
{
v6 = (int *)NumberInputLayer::create((NumberInputLayer *)this);
v7 = *v6;
v6[134] = 6;
v6[141] = v3 + 340;
return (*(int (__fastcall **)(int *))(v7 + 656))(v6);
}
else
{
v8[0] = *(unsigned __int8 *)(this + 356);
v8[1] = v2;
v8[2] = v2;
std::string::__init(v8, "Too many failed attempts!", 0x19u);
v5 = FLAlertLayer::create(
v2,
(cocos2d::CCLabelBMFont *)"Error",
(int)v8,
(ButtonSprite *)"OK",
(ButtonSprite *)v2,
300.0);
std::string::~string((int)v8);
return (*(int (__fastcall **)(int *))(*v5 + 656))(v5);
}
}
return this;
}