//
// SFXFolderPickerPopup::setTextPopupClosed from 0x100529c44 to 0x100529d00 (188 bytes)
//
// 2 xrefs:
// > sub_100529D1C @ 0x100529d20
// > ??> @ 0x1009a23d8
//
// 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 11:07:16 +0000
//
_QWORD *__fastcall SFXFolderPickerPopup::setTextPopupClosed(_QWORD *result, __int64 a2, __int64 a3)
{
_QWORD *v4; // x19
int v5; // w21
__int64 v6; // x22
char *CustomSFXFolder; // x20
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
__int64 v9; // [xsp+10h] [xbp-30h]
v4 = result;
if ( (*(char *)(a3 + 23) & 0x8000000000000000LL) != 0 )
{
if ( !*(_QWORD *)(a3 + 8) )
return result;
}
else if ( !*(_BYTE *)(a3 + 23) )
{
return result;
}
if ( *((int *)result + 182) <= 1 )
v5 = 1;
else
v5 = *((_DWORD *)result + 182);
v6 = MusicDownloadManager::sharedState();
if ( *(char *)(a3 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a3, *(_QWORD *)(a3 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a3;
v9 = *(_QWORD *)(a3 + 16);
}
CustomSFXFolder = MusicDownloadManager::createCustomSFXFolder(v6, (__int64)__p, v5, 0);
if ( SHIBYTE(v9) < 0 )
operator delete(__p[0]);
*((_DWORD *)v4 + 182) = *((_DWORD *)CustomSFXFolder + 19);
return sub_100529B54(v4);
}