//
// AutoBackupOptionsPopup::onPrune from 0x73e964 to 0x73eab8 (340 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:58:33 +0000
//
int __fastcall AutoBackupOptionsPopup::onPrune(AutoBackupOptionsPopup *this, cocos2d::CCObject *a2)
{
int BackupCap; // r9
const char *v4; // r6
void (__fastcall *v5)(AutoBackupOptionsPopup *, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v6; // r0
__int16 *v7; // r2
cocos2d::CCString *v8; // r0
const char *CString; // r0
const char *v10; // r6
size_t v11; // r0
int *v12; // r6
int v14; // [sp+1Ch] [bp-20h] BYREF
int v15; // [sp+20h] [bp-1Ch]
int v16; // [sp+24h] [bp-18h]
int v17; // [sp+28h] [bp-14h] BYREF
int v18; // [sp+2Ch] [bp-10h]
int v19; // [sp+30h] [bp-Ch]
BackupCap = AutoSaveSettingsLayer::getBackupCap(this);
AutoBackupPopup::backupDirectory((AutoBackupPopup *)&v14);
v17 = 0;
v18 = 0;
v19 = 0;
std::string::__init(&v17, &unk_B6B226, 0);
v4 = (const char *)AutoBackupPopup::pruneBackups((unsigned __int8 *)&v14, BackupCap, (unsigned __int8 *)&v17, 1);
std::string::~string((int)&v17);
std::string::~string((int)&v14);
if ( v4 )
{
if ( v4 == (_BYTE *)&dword_0 + 1 )
v7 = (__int16 *)&unk_B6B226;
else
v7 = &a1i2r3e45s789g[8];
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Delete %i old backup%s?\n"
"Keeps the newest %i for each level.",
v4,
v7,
BackupCap);
CString = (const char *)cocos2d::CCString::getCString(v8);
v14 = 0;
v15 = 0;
v16 = 0;
v10 = CString;
v11 = strlen(CString);
std::string::__init(&v14, v10, v11);
std::string::basic_string(&v17, (int)&v14);
v12 = FLAlertLayer::create(
(int)this + 712,
(cocos2d::CCLabelBMFont *)"Prune Backups",
(int)&v17,
(ButtonSprite *)"Back",
(ButtonSprite *)"Prune",
380.0,
0,
0,
1.0);
std::string::~string((int)&v17);
(*(void (__fastcall **)(int *, int))(*v12 + 36))(v12, 1);
(*(void (__fastcall **)(int *))(*v12 + 656))(v12);
}
else
{
v5 = *(void (__fastcall **)(AutoBackupOptionsPopup *, cocos2d::CCNode *, int))(*(_DWORD *)this + 232);
v14 = 0;
v15 = 0;
v16 = 0;
std::string::__init(&v14, "Nothing to prune", 0x10u);
v17 = 0;
v18 = 0;
v19 = 0;
std::string::__init(&v17, &unk_B6B226, 0);
v6 = TextAlertPopup::create((int)&v14, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)&v17);
v5(this, v6, 100);
std::string::~string((int)&v17);
}
return std::string::~string((int)&v14);
}