//
// FileSaveManager::init from 0x3cada0 to 0x3cae3e (158 bytes)
//
// 1 xrefs:
// > FileSaveManager::sharedState @ 0x3cae90
//
// 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:46:37 +0000
//
int __fastcall FileSaveManager::init(FileSaveManager *this)
{
void *v2; // r6
unsigned int v3; // r4
char *v4; // r3
int v5; // r3
unsigned int v6; // r4
unsigned int v7; // r4
unsigned int v8; // r4
void *v9; // r0
_BYTE *v10; // r7
if ( (*((_BYTE *)this + 264) & 1) == 0 )
{
v4 = (char *)this + 265;
goto LABEL_5;
}
v2 = *((void **)this + 68);
v3 = (*((_DWORD *)this + 66) & 0xFFFFFFFE) - 1;
if ( v3 > 9 )
{
v4 = *((char **)this + 68);
LABEL_5:
strcpy(v4, "CCData.dat");
if ( (*((_BYTE *)this + 264) & 1) != 0 )
v5 = 10;
else
v5 = 20;
if ( (*((_BYTE *)this + 264) & 1) != 0 )
*((_DWORD *)this + 67) = v5;
else
*((_BYTE *)this + 264) = v5;
return 1;
}
v6 = 2 * v3;
if ( v6 > 0xA )
v7 = ((v6 + 16) & 0xFFFFFFF0) - 1;
else
v7 = 10;
v8 = v7 + 1;
v9 = (void *)operator new(v8);
qmemcpy(v9, "CCData.dat", 10);
v10 = v9;
operator delete(v2);
*((_DWORD *)this + 68) = v10;
*((_DWORD *)this + 67) = 10;
*((_DWORD *)this + 66) = v8 | 1;
v10[10] = 0;
return 1;
}