//
// EditorSFXManager::applyConfigDirect from 0xcc7754 to 0xcc790c (440 bytes)
//
// 3 xrefs:
// > EditorSFXManager::applyFavoriteConfig @ 0xcc7944
// > EditorSoundConfigInfoLayer::applyConfig @ 0xccea38
// > ??> @ 0x4bb50
//
// 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:21 +0000
//
__int64 __fastcall EditorSFXManager::applyConfigDirect(
EditorSFXManager *a1,
__int64 a2,
unsigned __int8 a3,
__int64 *a4)
{
int v6; // w23
unsigned int v7; // w20
char v9; // w0
__int64 v10; // x21
__int64 v11; // x0
__int64 v12; // x1
_BOOL4 v13; // w25
char v14; // w0
__int64 v15; // x0
__int64 v16; // x1
int v17[2]; // [xsp+58h] [xbp+58h]
int v18[2]; // [xsp+58h] [xbp+58h]
int v19[2]; // [xsp+58h] [xbp+58h]
int v20; // [xsp+68h] [xbp+68h] BYREF
__int64 v21; // [xsp+70h] [xbp+70h] BYREF
__int64 v22; // [xsp+78h] [xbp+78h]
void *v23; // [xsp+80h] [xbp+80h]
v6 = a3;
if ( !a2 )
{
if ( a4 )
{
v7 = 0;
std::string::assign(a4, "No config to apply.");
return v7;
}
return 0;
}
if ( !*(_BYTE *)(a2 + 496) )
goto LABEL_3;
v9 = *(_BYTE *)(a2 + 472);
v21 = 0;
v10 = a2 + 472;
v22 = 0;
v23 = nullptr;
if ( (v9 & 1) != 0 )
{
*(_QWORD *)v18 = a4;
std::string::__init(&v21, *(void **)(a2 + 488), *(_QWORD *)(a2 + 480));
a4 = *(__int64 **)v18;
}
else
{
v11 = *(_QWORD *)v10;
v12 = *(_QWORD *)(a2 + 480);
v23 = *(void **)(v10 + 16);
v21 = v11;
v22 = v12;
}
if ( (v21 & 1) != 0 )
{
*(_QWORD *)v17 = a4;
v13 = v22 == 0;
operator delete(v23);
a4 = *(__int64 **)v17;
}
else
{
v13 = (int)(unsigned __int8)v21 >> 1 == 0;
}
if ( v13 )
{
LABEL_3:
if ( a4 )
{
v7 = 0;
std::string::assign(a4, "Config has no data.");
return v7;
}
return 0;
}
v14 = *(_BYTE *)(a2 + 472);
v20 = v6;
v21 = 0;
v22 = 0;
v23 = nullptr;
if ( (v14 & 1) != 0 )
{
*(_QWORD *)v19 = a4;
std::string::__init(&v21, *(void **)(v10 + 16), *(_QWORD *)(v10 + 8));
a4 = *(__int64 **)v19;
}
else
{
v15 = *(_QWORD *)v10;
v16 = *(_QWORD *)(v10 + 8);
v23 = *(void **)(v10 + 16);
v21 = v15;
v22 = v16;
}
v7 = (unsigned __int8)EditorSFXManager::importFromString(a1, (__int64)&v21, &v20, a4);
if ( (v21 & 1) != 0 )
operator delete(v23);
return v7;
}