//
// sub_1004D2080 from 0x1004d2080 to 0x1004d21ec (364 bytes)
//
// 1 xrefs:
// > sub_1004CF9C0 @ 0x1004d0b40
//
// 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:06:29 +0000
//
void __fastcall sub_1004D2080(__int64 a1)
{
unsigned __int64 v2; // x20
void *v3; // x0
char *CString; // x0
char *v5; // x1
void *v6; // x19
void *v7; // x0
_QWORD *v8; // x0
void *__p[2]; // [xsp+10h] [xbp-70h] BYREF
char v10; // [xsp+27h] [xbp-59h]
void *v11[2]; // [xsp+28h] [xbp-58h] BYREF
char v12; // [xsp+3Fh] [xbp-41h]
void *v13[2]; // [xsp+40h] [xbp-40h] BYREF
char v14; // [xsp+57h] [xbp-29h]
_BYTE *v15; // [xsp+58h] [xbp-28h] BYREF
_BYTE *v16; // [xsp+60h] [xbp-20h]
char v17; // [xsp+6Fh] [xbp-11h]
sub_1004D3494(&v15);
v2 = (unsigned __int64)(v16 - v15) >> 2;
if ( v15 )
{
v16 = v15;
operator delete(v15);
}
if ( (_DWORD)v2 )
{
v3 = sub_1003065B0("Download %i SFX from this pack?", v2);
CString = (char *)cocos2d::CCString::getCString((__int64)v3);
sub_100009900(&v15, CString);
if ( v17 >= 0 )
v5 = (char *)&v15;
else
v5 = v15;
sub_100009900(__p, v5);
v6 = FLAlertLayer::create_1(
a1 + 1032,
(__int64)"Download SFX",
(__int64)__p,
(__int64)"Cancel",
(__int64)"Download",
300.0);
if ( v10 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v6 + 72LL))(v6, 7007);
(*(void (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6);
if ( v17 < 0 )
{
v7 = v15;
LABEL_15:
operator delete(v7);
}
}
else
{
sub_100009900(v13, "All SFX downloaded");
sub_100009900(v11, "");
v8 = TextAlertPopup::create((__int64)v13, 150, (__int64)v11, 0.5, 0.6);
(*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v8, 100);
if ( v12 < 0 )
operator delete(v11[0]);
if ( v14 < 0 )
{
v7 = v13[0];
goto LABEL_15;
}
}
}