//
// sub_1004DE6A0 from 0x1004de6a0 to 0x1004de9a4 (772 bytes)
//
// 3 xrefs:
// > InfoLayer::onLevelInfo @ 0x1003f0bb4
// > sub_1004CF8C0 @ 0x1004cf8c8
// > sub_1004D2070 @ 0x1004d2078
//
// 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:36 +0000
//
void __fastcall sub_1004DE6A0(_DWORD *a1)
{
void **v2; // x1
std::string::size_type v3; // x2
void **v4; // x1
std::string::size_type v5; // x2
const std::string::value_type *v6; // x1
void **v7; // x1
std::string::size_type v8; // x2
int v9; // w8
void **v10; // x1
std::string::size_type v11; // x2
std::string *v12; // x1
void *v13; // x19
void *v14[2]; // [xsp+8h] [xbp-78h] BYREF
char v15; // [xsp+1Fh] [xbp-61h]
void *__p[2]; // [xsp+20h] [xbp-60h] BYREF
__int64 v17; // [xsp+30h] [xbp-50h]
void *__src[2]; // [xsp+40h] [xbp-40h] BYREF
__int64 v19; // [xsp+50h] [xbp-30h]
std::string v20; // [xsp+58h] [xbp-28h] BYREF
memset(&v20, 0, sizeof(v20));
sub_1004DE5F4((__int64)a1, (__n128 *)__src);
if ( SHIBYTE(v19) < 0 )
{
if ( __src[1] )
{
sub_1000097D0(__p, __src[0], (unsigned __int64)__src[1]);
goto LABEL_7;
}
}
else if ( HIBYTE(v19) )
{
*(_OWORD *)__p = *(_OWORD *)__src;
v17 = v19;
goto LABEL_7;
}
sub_100009900(__p, "(No description provided)");
LABEL_7:
if ( v17 >= 0 )
v2 = __p;
else
v2 = (void **)__p[0];
if ( v17 >= 0 )
v3 = HIBYTE(v17);
else
v3 = (std::string::size_type)__p[1];
std::string::append(&v20, (const std::string::value_type *)v2, v3);
if ( SHIBYTE(v17) < 0 )
operator delete(__p[0]);
if ( (int)a1[79] > 0 || (int)a1[91] >= 1 )
{
std::string::append(&v20, "\n\n");
if ( (int)a1[79] >= 1 )
{
std::string::append(&v20, "Pack ID: ");
GameToolbox::intToString((unsigned int)a1[79], __p);
if ( v17 >= 0 )
v4 = __p;
else
v4 = (void **)__p[0];
if ( v17 >= 0 )
v5 = HIBYTE(v17);
else
v5 = (std::string::size_type)__p[1];
std::string::append(&v20, (const std::string::value_type *)v4, v5);
if ( SHIBYTE(v17) < 0 )
operator delete(__p[0]);
std::string::append(&v20, "\n");
}
if ( (unsigned int)(a1[90] - 3) <= 1 )
{
std::string::append(&v20, "Visibility: ");
if ( a1[90] == 3 )
v6 = "Friends Only";
else
v6 = "Unlisted";
std::string::append(&v20, v6);
std::string::append(&v20, "\n");
}
if ( (int)a1[91] >= 1 )
{
std::string::append(&v20, "Uploaded: ");
GameToolbox::timestampToHumanReadable((int)a1[91], __p);
if ( v17 >= 0 )
v7 = __p;
else
v7 = (void **)__p[0];
if ( v17 >= 0 )
v8 = HIBYTE(v17);
else
v8 = (std::string::size_type)__p[1];
std::string::append(&v20, (const std::string::value_type *)v7, v8);
if ( SHIBYTE(v17) < 0 )
operator delete(__p[0]);
std::string::append(&v20, "");
v9 = a1[92];
if ( v9 >= 1 && a1[91] != v9 )
{
std::string::append(&v20, "\nUpdated: ");
GameToolbox::timestampToHumanReadable((int)a1[92], __p);
if ( v17 >= 0 )
v10 = __p;
else
v10 = (void **)__p[0];
if ( v17 >= 0 )
v11 = HIBYTE(v17);
else
v11 = (std::string::size_type)__p[1];
std::string::append(&v20, (const std::string::value_type *)v10, v11);
if ( SHIBYTE(v17) < 0 )
operator delete(__p[0]);
std::string::append(&v20, "");
}
}
}
if ( (v20.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v12 = &v20;
else
v12 = (std::string *)v20.__r_.__value_.__r.__words[0];
sub_100009900(v14, (char *)v12);
v13 = FLAlertLayer::create_1(0, (__int64)"Sound Pack Info", (__int64)v14, (__int64)"OK", 0, 380.0);
if ( v15 < 0 )
operator delete(v14[0]);
(*(void (__fastcall **)(void *))(*(_QWORD *)v13 + 1312LL))(v13);
if ( SHIBYTE(v19) < 0 )
operator delete(__src[0]);
if ( SHIBYTE(v20.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v20.__r_.__value_.__l.__data_);
}