//
// sub_82F874 from 0x82f874 to 0x82f964 (240 bytes)
//
// 2 xrefs:
// > sub_82F964 @ 0x82f9b8
// > sub_82FA7C @ 0x82fabc
//
// 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:55:08 +0000
//
_QWORD *__usercall sub_82F874@(_QWORD *a1@)
{
__int64 v2; // x0
char v3; // w1
__int64 v4; // x2
__int64 v5; // x0
__int64 v6; // x1
__int64 v7; // t2
_QWORD *v8; // x0
__int64 v9; // x3
char v10; // w1
__int64 v12; // [xsp+30h] [xbp+30h] BYREF
__int64 v13; // [xsp+38h] [xbp+38h]
void *v14; // [xsp+40h] [xbp+40h]
v2 = cocos2d::CCFileUtils::sharedFileUtils(_stack_chk_guard);
v3 = *(_BYTE *)(v2 + 112);
v12 = 0;
v4 = v2 + 112;
v13 = 0;
v14 = nullptr;
if ( (v3 & 1) != 0 )
{
std::string::__init(&v12, *(void **)(v2 + 128), *(_QWORD *)(v2 + 120));
}
else
{
v7 = v2 + 112;
v5 = *(_QWORD *)(v2 + 112);
v6 = *(_QWORD *)(v7 + 8);
v14 = *(void **)(v4 + 16);
v12 = v5;
v13 = v6;
}
v8 = (_QWORD *)std::string::append((__int64)&v12, "CCPlatformerSave.dat", 0x14u);
v9 = v8[1];
*a1 = *v8;
a1[1] = v9;
a1[2] = v8[2];
*v8 = 0;
v8[1] = 0;
v10 = v12;
v8[2] = 0;
if ( (v10 & 1) != 0 )
operator delete(v14);
return a1;
}