//
// SFXBrowser::FLAlert_Clicked from 0xb903d8 to 0xb90698 (704 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SFXBrowser::FLAlert_Clicked @ 0xb906a0
// > ??> @ 0x994f0
// > ??> @ 0x14d6c60
//
// 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:38 +0000
//
__int64 __fastcall SFXBrowser::FLAlert_Clicked(SFXBrowser *this, FLAlertLayer *a2, unsigned __int8 a3)
{
int v3; // w20
GameManager *v5; // x0
GameManager *v7; // x0
GameManager *v8; // x0
unsigned __int8 *v9; // x2
MusicDownloadManager *v10; // x0
__int64 v11; // x1
GameManager *v12; // x24
__int64 v13; // x22
cocos2d::CCString *v14; // x0
const char *CString; // x0
size_t v16; // x0
__int64 v17; // x1
void (__fastcall *v18)(SFXBrowser *, __int64, __int64); // x24
__int64 v19; // x0
char *v21; // [xsp+48h] [xbp+48h]
char *v22; // [xsp+58h] [xbp+58h] BYREF
__int64 v23; // [xsp+60h] [xbp+60h] BYREF
size_t v24; // [xsp+68h] [xbp+68h]
void *v25; // [xsp+70h] [xbp+70h]
__int64 v26; // [xsp+78h] [xbp+78h] BYREF
size_t v27; // [xsp+80h] [xbp+80h]
void *v28; // [xsp+88h] [xbp+88h]
__int64 v29; // [xsp+90h] [xbp+90h] BYREF
__int64 v30; // [xsp+98h] [xbp+98h]
void *v31; // [xsp+A0h] [xbp+A0h]
v3 = a3;
if ( (*(unsigned int (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2) == 10 )
{
if ( v3 )
SFXBrowser::executeBatchDelete(this);
}
else
{
v5 = (GameManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)v5 == 11 )
{
if ( v3 )
{
v7 = *(GameManager **)(GameManager::sharedState(v5) + 552);
if ( v7 )
{
v8 = *(GameManager **)(*(_QWORD *)(GameManager::sharedState(v7) + 552) + 3272LL);
if ( v8 )
{
v9 = (unsigned __int8 *)(*(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v8) + 552) + 3272LL) + 608LL);
v10 = (MusicDownloadManager *)*v9;
v11 = (unsigned __int8)v10 >> 1;
if ( ((unsigned __int8)v10 & 1) != 0 )
v11 = *((_QWORD *)v9 + 1);
if ( v11 )
{
v22 = nullptr;
v12 = (GameManager *)MusicDownloadManager::sharedState(v10);
v13 = *(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v12) + 552) + 3272LL);
v29 = 0;
v30 = 0;
v31 = nullptr;
std::string::__init(&v29, &byte_11B8890, 0);
MusicDownloadManager::importCustomSFXSetup(v12, v13 + 608, (char *)&v29, 1u, &v22, (_DWORD *)&v22 + 1);
if ( (v29 & 1) != 0 )
operator delete(v31);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Imported %i",
(const char *)(unsigned int)v22);
CString = (const char *)cocos2d::CCString::getCString(v14);
v23 = 0;
v21 = (char *)CString;
v24 = 0;
v25 = nullptr;
v16 = strlen(CString);
std::string::__init(&v23, v21, v16);
v26 = 0;
v17 = *(_QWORD *)this;
v27 = 0;
v28 = nullptr;
v18 = *(void (__fastcall **)(SFXBrowser *, __int64, __int64))(v17 + 464);
if ( (v23 & 1) != 0 )
{
std::string::__init(&v26, v25, v24);
}
else
{
v28 = v25;
v26 = v23;
v27 = v24;
}
v29 = 0;
v30 = 0;
v31 = nullptr;
std::string::__init(&v29, &byte_11B8890, 0);
v19 = TextAlertPopup::create((char *)&v26, 150, (char *)&v29, 0.9, 0.5);
v18(this, v19, 100);
if ( (v29 & 1) != 0 )
operator delete(v31);
if ( (v26 & 1) != 0 )
operator delete(v28);
FLAlertLayer::requestRebuild(this);
if ( (v23 & 1) != 0 )
operator delete(v25);
}
}
}
}
}
}
return _stack_chk_guard;
}