//
// EditorSFXManager::overwriteMyConfigFromLive from 0xcc3bf8 to 0xcc3e1c (548 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::FLAlert_Clicked @ 0xcd36b4
// > ??> @ 0x7a140
//
// 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 13:06:19 +0000
//
__int64 __fastcall EditorSFXManager::overwriteMyConfigFromLive(EditorSFXManager *a1, int a2, __int64 *a3)
{
__int64 MyConfig; // x24
int v6; // w0
size_t v7; // x2
_QWORD *v8; // x19
int v9; // w22
int v10; // w21
cocos2d::CCArray **v11; // x20
__int64 *v12; // x0
int v13; // w1
unsigned int v14; // w22
__int64 v16; // [xsp+58h] [xbp+58h] BYREF
size_t v17; // [xsp+60h] [xbp+60h]
void *v18; // [xsp+68h] [xbp+68h]
__int64 v19; // [xsp+70h] [xbp+70h] BYREF
size_t v20; // [xsp+78h] [xbp+78h]
void *v21; // [xsp+80h] [xbp+80h]
MyConfig = EditorSFXManager::getMyConfig(a1, a2);
if ( MyConfig )
{
EditorSFXManager::serializeCompressed(a1, &v16);
v6 = v16 & 1;
v7 = (unsigned __int8)v16 >> 1;
if ( v6 )
v7 = v17;
if ( v7 )
{
v8 = *((_QWORD **)a1 + 2);
v9 = 0;
v10 = 0;
if ( v8 )
{
do
{
v11 = (cocos2d::CCArray **)v8[3];
if ( v11 && *v11 && (unsigned int)cocos2d::CCArray::count(*v11) )
{
++v10;
v9 += cocos2d::CCArray::count(*v11);
}
v8 = (_QWORD *)*v8;
}
while ( v8 );
v6 = v16 & 1;
}
v19 = 0;
v20 = 0;
v21 = nullptr;
if ( v6 )
{
std::string::__init(&v19, v18, v17);
}
else
{
v21 = v18;
v19 = v16;
v20 = v17;
}
v12 = (__int64 *)(MyConfig + 472);
if ( (__int64 *)(MyConfig + 472) != &v19 )
{
if ( (v19 & 1) != 0 )
std::string::assign(v12, v21, v20);
else
std::string::assign(v12, (char *)&v19 + 1, (unsigned __int8)v19 >> 1);
}
if ( (v19 & 1) != 0 )
operator delete(v21);
v13 = *(_DWORD *)(MyConfig + 328);
*(_DWORD *)(MyConfig + 356) = v9;
*(_BYTE *)(MyConfig + 496) = 1;
*(_DWORD *)(MyConfig + 328) = v13 + 1;
v14 = 1;
*(_DWORD *)(MyConfig + 352) = v10;
*(_DWORD *)(MyConfig + 368) = time(nullptr);
v6 = v16 & 1;
}
else
{
if ( a3 )
{
std::string::assign(a3, "No active sound actions to save.");
v14 = 0;
if ( (v16 & 1) == 0 )
return v14;
goto LABEL_24;
}
v14 = 0;
}
if ( !v6 )
return v14;
LABEL_24:
operator delete(v18);
return v14;
}
v14 = 0;
if ( a3 )
std::string::assign(a3, "List not found.");
return v14;
}