//
// sub_10054CEA0 from 0x10054cea0 to 0x10054cf6e (206 bytes)
//
// 4 xrefs:
// > GameLevelManager::writePlatformerSaveJournal @ 0x10054c916
// > GameLevelManager::replayPlatformerSaveJournal @ 0x10054d678
// > sub_10054DBF0 @ 0x10054dd3e
// > sub_10054DDE0 @ 0x10054e028
//
// 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 12:32:01 +0000
//
void __fastcall sub_10054CEA0(__int64 a1)
{
std::string *v1; // rax
std::string v2; // [rsp+8h] [rbp-58h] BYREF
std::string __str; // [rsp+20h] [rbp-40h] BYREF
std::string v4; // [rsp+40h] [rbp-20h] BYREF
DS_Dictionary::saveRootSubDictToString((__int64)&v4, a1);
cocos2d::ZipUtils::compressString(&v2, (unsigned __int8 *)&v4, 0, 1, 11);
if ( (*(_BYTE *)&v4.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v4.__r_.__value_.__l.__data_);
sub_1004F5360(&v4);
v1 = std::string::append(&v4, "CCPlatformerSave.dat");
__str = *v1;
*(_OWORD *)&v1->__r_.__value_.__l.0 = 0;
v1->__r_.__value_.__r.__words[2] = 0;
if ( (*(_BYTE *)&v4.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v4.__r_.__value_.__l.__data_);
sub_1004F4A50(&__str, (unsigned __int8 *)&v2, 1, 1);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 )
{
if ( (*(_BYTE *)&v2.__r_.__value_.__s.0 & 1) == 0 )
return;
LABEL_9:
operator delete(v2.__r_.__value_.__l.__data_);
return;
}
operator delete(__str.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v2.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_9;
}