//
// EditorSoundConfigUploadPopup::onToggleUnlisted from 0x14019ba70 to 0x14019bc77 (519 bytes)
//
// 2 xrefs:
// > EditorSoundConfigUploadPopup::init @ 0x14019b081
// > ??> @ 0x1409196e8
//
// This function is hookable on this platform (idp: pc, 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:27:47 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall EditorSoundConfigUploadPopup::onToggleUnlisted(__int64 a1)
{
__int64 v2; // rdx
__int64 v3; // rcx
__int64 v4; // r8
__int64 v5; // rcx
__int64 v6; // rax
cocos2d::CCObject *v7; // rbx
__int128 v9; // [rsp+50h] [rbp-48h] BYREF
__int64 v10; // [rsp+60h] [rbp-38h]
__int64 v11; // [rsp+68h] [rbp-30h]
_BYTE v12[40]; // [rsp+70h] [rbp-28h] BYREF
void *v13; // [rsp+A0h] [rbp+8h]
void *v14; // [rsp+A0h] [rbp+8h]
v2 = *(unsigned __int8 *)(a1 + 1088);
*(_BYTE *)(a1 + 1088) = (_BYTE)v2 == 0;
if ( !(_BYTE)v2 )
{
v3 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v13 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v3 = qword_14090BFD0;
}
if ( !(unsigned __int8)GameManager::getGameVariable(v3, "0070") )
{
v5 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v14 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v5 = qword_14090BFD0;
}
LOBYTE(v4) = 1;
GameManager::setGameVariable(v5, "0070", v4);
v9 = 0;
*(_QWORD *)&v9 = sub_14003D460(0x50u);
v10 = 79;
v11 = 79;
strcpy((char *)v9, "Unlisted packs can only be found by ID. This cannot be changed after uploading.");
v6 = sub_14003F4F0((__int64)v12, (__int64)&v9);
v7 = FLAlertLayer::create(0, (int)"Unlisted", v6, (__int64)"OK", 0, 1134559232, 0, 0, 1065353216);
sub_14003D310((__int64)&v9);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v7 + 1064LL))(v7);
}
}
if ( !*(_BYTE *)(a1 + 1088) )
*(_BYTE *)(a1 + 1089) = 0;
return EditorSoundConfigUploadPopup::updateVisibilityState(a1, v2);
}