//
// sub_1008F5940 from 0x1008f5940 to 0x1008f5b34 (500 bytes)
//
// 4 xrefs:
// > sub_1008F5B40 @ 0x1008f5b45
// > sub_1008F5B50 @ 0x1008f5b5c
// > sub_1008F5B70 @ 0x1008f5b79
// > sub_1008F5B90 @ 0x1008f5ba3
//
// 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 12:37:58 +0000
//
__int64 __fastcall sub_1008F5940(_QWORD *a1)
{
__int64 v2; // rax
__int64 v3; // rax
_DWORD *v4; // rdi
*a1 = off_100BB5A98;
a1[40] = off_100BB60F0;
a1[41] = &off_100BB6160;
a1[42] = off_100BB6178;
a1[43] = off_100BB6198;
a1[44] = off_100BB61C0;
a1[51] = off_100BB61F0;
a1[54] = off_100BB6270;
a1[68] = off_100BB6290;
a1[83] = &off_100BB62D8;
a1[84] = off_100BB62F0;
a1[127] = off_100BB6310;
a1[128] = off_100BB6330;
a1[129] = &off_100BB6350;
a1[130] = &off_100BB6368;
a1[131] = &off_100BB6380;
a1[132] = &off_100BB6398;
a1[133] = off_100BB63B0;
a1[134] = &off_100BB63D0;
a1[135] = off_100BB63E8;
if ( GameLevelManager::sharedState() && *(_QWORD **)(GameLevelManager::sharedState() + 1336) == a1 + 127 )
*(_QWORD *)(GameLevelManager::sharedState() + 1336) = 0;
if ( GameLevelManager::sharedState() && *(_QWORD **)(GameLevelManager::sharedState() + 1344) == a1 + 128 )
*(_QWORD *)(GameLevelManager::sharedState() + 1344) = 0;
if ( GameLevelManager::sharedState() && *(_QWORD **)(GameLevelManager::sharedState() + 1360) == a1 + 133 )
*(_QWORD *)(GameLevelManager::sharedState() + 1360) = 0;
v2 = MusicDownloadManager::sharedState();
MusicDownloadManager::removeMusicDownloadDelegate(v2, (__int64)(a1 + 135));
v3 = a1[150];
if ( v3 )
*(_QWORD *)(v3 + 664) = 0;
v4 = (_DWORD *)a1[136];
if ( v4 )
cocos2d::CCObject::release(v4);
return SetupTriggerPopup::dSetupTriggerPopup((__int64)a1);
}