//
// sub_1007B82C0 from 0x1007b82c0 to 0x1007b84d9 (537 bytes)
//
// 4 xrefs:
// > sub_1007B84F0 @ 0x1007b84f5
// > sub_1007B8500 @ 0x1007b850c
// > sub_1007B8520 @ 0x1007b8529
// > sub_1007B8540 @ 0x1007b8553
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1007B82C0(__int64 a1)
{
__int64 v2; // rax
cocos2d::CCObject *v3; // rdi
cocos2d::CCObject *v4; // rdi
cocos2d::CCObject *v5; // rdi
cocos2d::CCObject *v6; // rdi
*(_QWORD *)a1 = off_100993D88;
*(_QWORD *)(a1 + 320) = off_100994320;
*(_QWORD *)(a1 + 328) = &off_100994390;
*(_QWORD *)(a1 + 336) = off_1009943A8;
*(_QWORD *)(a1 + 344) = off_1009943C8;
*(_QWORD *)(a1 + 352) = off_1009943E8;
*(_QWORD *)(a1 + 408) = off_100994410;
*(_QWORD *)(a1 + 432) = off_100994490;
*(_QWORD *)(a1 + 632) = &off_1009944B0;
*(_QWORD *)(a1 + 640) = off_1009944C8;
*(_QWORD *)(a1 + 648) = off_1009944F8;
*(_QWORD *)(a1 + 656) = off_100994520;
*(_QWORD *)(a1 + 664) = off_100994548;
*(_QWORD *)(a1 + 672) = &off_100994568;
*(_QWORD *)(a1 + 680) = off_100994580;
v2 = *(_QWORD *)(a1 + 824);
if ( v2 )
*(_QWORD *)(v2 + 632) = 0;
v3 = *(cocos2d::CCObject **)(a1 + 784);
if ( v3 )
cocos2d::CCObject::release(v3);
v4 = *(cocos2d::CCObject **)(a1 + 688);
if ( v4 )
cocos2d::CCObject::release(v4);
v5 = *(cocos2d::CCObject **)(a1 + 792);
if ( v5 )
cocos2d::CCObject::release(v5);
v6 = *(cocos2d::CCObject **)(a1 + 816);
if ( v6 )
cocos2d::CCObject::release(v6);
if ( GameLevelManager::sharedState()->m_levelCommentDelegate == (LevelCommentDelegate *)(a1 + 640) )
GameLevelManager::sharedState()->m_levelCommentDelegate = nullptr;
if ( GameLevelManager::sharedState()->m_commentUploadDelegate == (CommentUploadDelegate *)(a1 + 648) )
GameLevelManager::sharedState()->m_commentUploadDelegate = nullptr;
if ( GameLevelManager::sharedState()->m_uploadActionDelegate == (UploadActionDelegate *)(a1 + 664) )
GameLevelManager::sharedState()->m_uploadActionDelegate = nullptr;
if ( GameLevelManager::sharedState()->m_userInfoDelegate == (UserInfoDelegate *)(a1 + 656) )
GameLevelManager::sharedState()->m_userInfoDelegate = nullptr;
if ( GameLevelManager::sharedState()->m_leaderboardManagerDelegate == (LeaderboardManagerDelegate *)(a1 + 680) )
{
GameLevelManager::sharedState()->m_leaderboardManagerDelegate = nullptr;
if ( (*(_BYTE *)(a1 + 704) & 1) == 0 )
return FLAlertLayer::dFLAlertLayer(a1);
goto LABEL_21;
}
if ( (*(_BYTE *)(a1 + 704) & 1) != 0 )
LABEL_21:
operator delete(*(void **)(a1 + 720));
return FLAlertLayer::dFLAlertLayer(a1);
}