//
// EditorSoundConfigInfoLayer::downloadEditorSoundFinished from 0xccf378 to 0xccf520 (424 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'EditorSoundConfigInfoLayer::downloadEditorSoundFinished @ 0xccf524
// > ??> @ 0xc0778
// > ??> @ 0x14fee58
//
// 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:26 +0000
//
__int64 __fastcall EditorSoundConfigInfoLayer::downloadEditorSoundFinished(
EditorSoundConfigInfoLayer *this,
GJEditorSoundConfig *a2)
{
GJEditorSoundConfig *v4; // x0
cocos2d::CCNode **v6; // x1
__int64 v7; // x0
EditorSFXManager *v8; // x0
EditorSFXManager *v9; // x0
GJEditorSoundConfig *FavoriteConfig; // x0
cocos2d::CCNode **v11; // x0
__int64 v12; // x0
__int64 v13[2]; // [xsp+30h] [xbp+30h] BYREF
void *v14; // [xsp+40h] [xbp+40h]
if ( a2 )
{
v4 = *((GJEditorSoundConfig **)this + 136);
if ( !v4 || *((_DWORD *)a2 + 79) == *((_DWORD *)v4 + 79) )
{
v6 = *((cocos2d::CCNode ***)this + 139);
*((_BYTE *)this + 1120) = 0;
if ( v6 )
{
LoadingCircle::fadeAndRemove(v6);
*((_QWORD *)this + 139) = 0;
v4 = *((GJEditorSoundConfig **)this + 136);
}
if ( v4 )
{
GJEditorSoundConfig::copyServerFields(v4, a2);
v7 = *((_QWORD *)this + 136);
if ( *(_BYTE *)(v7 + 324) )
*(_DWORD *)(v7 + 332) = *(_DWORD *)(v7 + 328);
v8 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)v7);
if ( v8 )
{
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
FavoriteConfig = (GJEditorSoundConfig *)EditorSFXManager::getFavoriteConfig(
v9,
*(_DWORD *)(*((_QWORD *)this + 136) + 316LL));
if ( FavoriteConfig )
{
if ( FavoriteConfig != *((GJEditorSoundConfig **)this + 136) )
GJEditorSoundConfig::copyServerFields(FavoriteConfig, a2);
}
}
}
EditorSoundConfigInfoLayer::refreshActionButtons(this);
EditorSoundConfigInfoLayer::buildSummary(this);
if ( *((_BYTE *)this + 1121) )
{
*((_BYTE *)this + 1121) = 0;
EditorSoundConfigInfoLayer::onFavorite(this, nullptr);
}
}
}
else
{
v11 = *((cocos2d::CCNode ***)this + 139);
*((_BYTE *)this + 1120) = 0;
if ( v11 )
{
LoadingCircle::fadeAndRemove(v11);
*((_QWORD *)this + 139) = 0;
}
v13[0] = 0;
v13[1] = 0;
v14 = nullptr;
std::string::__init(v13, "Download failed.", 0x10u);
v12 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Error", (char *)v13, (ButtonSprite *)"OK", nullptr);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 1312LL))(v12);
if ( (v13[0] & 1) != 0 )
operator delete(v14);
EditorSoundConfigInfoLayer::refreshActionButtons(this);
}
return _stack_chk_guard;
}