//
// AutoSaveSettingsLayer::getBackupCap from 0x14009d120 to 0x14009d251 (305 bytes)
//
// 5 xrefs:
// > AutoBackupOptionsPopup::getValue @ 0x1400ce279
// > AutoBackupOptionsPopup::onPrune @ 0x1400ce67c
// > AutoBackupOptionsPopup::FLAlert_Clicked @ 0x1400cf0ca
// > LevelEditorLayer::doAutoBackup @ 0x140409965
// > ??> @ 0x140912f44
//
// This function is hookable on this platform (idp: pc, 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 11:26:05 +0000
//
// Hidden C++ exception states: #wind=2
__int64 AutoSaveSettingsLayer::getBackupCap()
{
__int64 v0; // rbx
cocos2d::CCString *v1; // rax
int v2; // ebx
void *v3; // r8
__int64 result; // rax
void *v5; // [rsp+30h] [rbp-38h]
void *Block[2]; // [rsp+38h] [rbp-30h] BYREF
__int64 v7; // [rsp+48h] [rbp-20h]
unsigned __int64 v8; // [rsp+50h] [rbp-18h]
v0 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v5 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v0 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v7 = 3;
v8 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0236", 4u);
v1 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v0 + 432), Block);
v2 = cocos2d::CCString::intValue(v1);
if ( v8 > 0xF )
{
v3 = Block[0];
if ( v8 + 1 >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v3);
}
result = 20;
if ( v2 > 0 )
return (unsigned int)(v2 - 1);
return result;
}