//
// SFXBrowser::onImportSetup from 0xb8ee74 to 0xb8f1b4 (832 bytes)
//
// 3 xrefs:
// > ??> @ 0x78898
// > sub_B947C8 @ 0xb95c7c
// > ??> @ 0x15430e8
//
// 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:02:36 +0000
//
__int64 __fastcall SFXBrowser::onImportSetup(SFXBrowser *this, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x2
__int64 v7; // x0
__int64 v8; // x1
__int64 *v9; // x22
__int64 v10; // x1
__int64 v12; // [xsp+68h] [xbp+58h] BYREF
__int64 v13; // [xsp+70h] [xbp+60h]
void *v14; // [xsp+78h] [xbp+68h]
__int64 v15[2]; // [xsp+80h] [xbp+70h] BYREF
void *v16; // [xsp+90h] [xbp+80h]
__int64 v17; // [xsp+98h] [xbp+88h] BYREF
__int64 v18; // [xsp+A0h] [xbp+90h]
void *v19; // [xsp+A8h] [xbp+98h]
__int64 v20; // [xsp+B0h] [xbp+A0h] BYREF
__int64 v21; // [xsp+B8h] [xbp+A8h]
void *v22; // [xsp+C0h] [xbp+B0h]
v3 = *(GameManager **)(GameManager::sharedState(_stack_chk_guard) + 552);
if ( v3 && *(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v3) + 552) + 3272LL) )
{
*((_DWORD *)this + 259) = 0;
*((_BYTE *)this + 944) = (unsigned __int8)&dword_0 + 1;
v4 = *(_QWORD *)(GameManager::sharedState((GameManager *)((char *)&dword_0 + 1)) + 552);
v12 = 0;
v13 = 0;
v5 = *(_QWORD *)(v4 + 1936);
v14 = nullptr;
v6 = v5 + 344;
if ( (*(_BYTE *)(v5 + 344) & 1) != 0 )
{
std::string::__init(&v12, *(void **)(v5 + 360), *(_QWORD *)(v5 + 352));
}
else
{
v7 = *(_QWORD *)v6;
v8 = *(_QWORD *)(v6 + 8);
v14 = *(void **)(v6 + 16);
v12 = v7;
v13 = v8;
}
v15[0] = 0;
v15[1] = 0;
v16 = nullptr;
std::string::__init(v15, "Folder Name", 0xBu);
v17 = 0;
v18 = 0;
v19 = nullptr;
std::string::__init(&v17, "Import SFX", 0xAu);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Import", 6u);
v9 = (__int64 *)SetTextPopup::create((char *)&v12, (char *)v15, 30, (char *)&v17, (char *)&v20, 0, 1u, 1, 0.0, 0);
if ( (v20 & 1) != 0 )
operator delete(v22);
if ( (v17 & 1) != 0 )
operator delete(v19);
if ( (v15[0] & 1) != 0 )
operator delete(v16);
if ( (v12 & 1) != 0 )
operator delete(v14);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Custom folder name", 0x12u);
SetTextPopup::addInfoLabel((__int64)v9, (unsigned __int8 *)&v20);
if ( (v20 & 1) != 0 )
operator delete(v22);
v17 = 0;
v18 = 0;
v19 = nullptr;
std::string::__init(&v17, "Import SFX", 0xAu);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(
&v20,
"Copies this level's SFX folders and names into a new folder. Existing entries are skipped.",
0x5Au);
SetTextPopup::addInfoButton((__int64)v9, (char *)&v17, (char *)&v20);
if ( (v20 & 1) != 0 )
operator delete(v22);
if ( (v17 & 1) != 0 )
operator delete(v19);
v10 = *v9;
v9[93] = (__int64)this + 688;
(*(void (__fastcall **)(__int64 *))(v10 + 1312))(v9);
}
return _stack_chk_guard;
}