//
// EditorUI::showLockedLayerAlert from 0xbd7010 to 0xbd71b8 (424 bytes)
//
// 3 xrefs:
// > EditorUI::onCreate @ 0x7ca890
// > EditorUI::pasteObjects @ 0xbd9618
// > ??> @ 0x4c960
//
// 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 13:03:40 +0000
//
__int64 __fastcall EditorUI::showLockedLayerAlert(EditorUI *this, const char *a2)
{
cocos2d::CCString *v3; // x0
const char *CString; // x24
size_t v5; // x0
size_t v6; // x19
unsigned __int64 v7; // x0
char *v8; // x3
int v9; // w22
__int64 v11; // [xsp+48h] [xbp+48h] BYREF
size_t v12; // [xsp+50h] [xbp+50h]
void *v13; // [xsp+58h] [xbp+58h]
__int64 v14; // [xsp+60h] [xbp+60h] BYREF
size_t v15; // [xsp+68h] [xbp+68h]
void *v16; // [xsp+70h] [xbp+70h]
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Layer %i is locked.", a2);
v11 = 0;
CString = (const char *)cocos2d::CCString::getCString(v3);
v12 = 0;
v13 = nullptr;
v5 = strlen(CString);
v6 = v5;
if ( v5 > 0xFFFFFFFFFFFFFFEFLL )
sub_62FB5C();
if ( v5 <= 0x16 )
{
LOBYTE(v11) = 2 * v5;
v8 = (char *)&v11 + 1;
if ( !v5 )
{
BYTE1(v11) = 0;
v14 = 0;
v15 = 0;
v16 = nullptr;
v9 = 0;
goto LABEL_5;
}
}
else
{
v7 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v11 = v7 | 1;
v8 = (char *)operator new(v7);
v13 = v8;
v12 = v6;
}
*((_BYTE *)memcpy(v8, CString, v6) + v6) = 0;
v14 = 0;
v15 = 0;
v16 = nullptr;
v9 = v11 & 1;
if ( !v9 )
{
LABEL_5:
v16 = v13;
v14 = v11;
v15 = v12;
goto LABEL_6;
}
std::string::__init(&v14, v13, v12);
LABEL_6:
EditorUI::showTextAlert((__int64)this, (__int64)&v14, 0, 1, 0x7Fu);
if ( (v14 & 1) != 0 )
operator delete(v16);
if ( v9 )
operator delete(v13);
return _stack_chk_guard;
}