//
// SetFolderPopup::onSetFolderName from 0xa3087c to 0xa30ae0 (612 bytes)
//
// 3 xrefs:
// > ??> @ 0x515f8
// > SetFolderPopup::init @ 0xa2acc8
// > ??> @ 0x1541be8
//
// 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 12:59:47 +0000
//
__int64 __fastcall SetFolderPopup::onSetFolderName(SetFolderPopup *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
char *v4; // x21
size_t v5; // x0
__int64 *v6; // x21
__int64 v7; // x1
unsigned __int64 v9[2]; // [xsp+50h] [xbp+40h] BYREF
void *v10; // [xsp+60h] [xbp+50h]
__int64 v11[2]; // [xsp+68h] [xbp+58h] BYREF
void *v12; // [xsp+78h] [xbp+68h]
__int64 v13[2]; // [xsp+80h] [xbp+70h] BYREF
void *v14; // [xsp+90h] [xbp+80h]
__int64 v15[2]; // [xsp+98h] [xbp+88h] BYREF
void *v16; // [xsp+A8h] [xbp+98h]
__int64 v17[2]; // [xsp+B0h] [xbp+A0h] BYREF
void *v18; // [xsp+C0h] [xbp+B0h]
if ( *((int *)this + 168) > 0 )
{
v3 = (GameLevelManager *)GameLevelManager::sharedState(_stack_chk_guard);
v4 = (char *)v9 + 1;
GameLevelManager::getFolderName(v3, (const char *)*((unsigned int *)this + 168), *((_BYTE *)this + 712), v9);
if ( (v9[0] & 1) != 0 )
v4 = (char *)v10;
v11[0] = 0;
v11[1] = 0;
v12 = nullptr;
v5 = strlen(v4);
std::string::__init(v11, v4, v5);
v13[0] = 0;
v13[1] = 0;
v14 = nullptr;
std::string::__init(v13, "Folder Name", 0xBu);
v15[0] = 0;
v15[1] = 0;
v16 = nullptr;
std::string::__init(v15, "Set Folder Name", 0xFu);
v17[0] = 0;
v17[1] = 0;
v18 = nullptr;
std::string::__init(v17, "OK", 2u);
v6 = (__int64 *)SetTextPopup::create((char *)v11, (char *)v13, 20, (char *)v15, (char *)v17, 1u, 0, 1, 60.0, 0);
if ( (v17[0] & 1) != 0 )
{
operator delete(v18);
if ( (v15[0] & 1) == 0 )
{
LABEL_6:
if ( (v13[0] & 1) == 0 )
goto LABEL_7;
goto LABEL_14;
}
}
else if ( (v15[0] & 1) == 0 )
{
goto LABEL_6;
}
operator delete(v16);
if ( (v13[0] & 1) == 0 )
{
LABEL_7:
if ( (v11[0] & 1) == 0 )
goto LABEL_8;
goto LABEL_15;
}
LABEL_14:
operator delete(v14);
if ( (v11[0] & 1) == 0 )
{
LABEL_8:
if ( (v9[0] & 1) == 0 )
{
LABEL_9:
v7 = *v6;
v6[93] = (__int64)this + 704;
(*(void (__fastcall **)(__int64 *))(v7 + 1312))(v6);
return _stack_chk_guard;
}
LABEL_11:
operator delete(v10);
goto LABEL_9;
}
LABEL_15:
operator delete(v12);
if ( (v9[0] & 1) == 0 )
goto LABEL_9;
goto LABEL_11;
}
return _stack_chk_guard;
}