//
// NotificationFilterPopup::toggleSource from 0x140479ba0 to 0x140479d1b (379 bytes)
//
// 7 xrefs:
// > NotificationFilterPopup::onFriendUploads @ 0x140479d25
// > NotificationFilterPopup::onFollowUploads @ 0x140479d35
// > NotificationFilterPopup::onDownloadMilestones @ 0x140479d45
// > NotificationFilterPopup::onFollowerMilestones @ 0x140479d55
// > NotificationFilterPopup::onFriendAccepts @ 0x140479d65
// > NotificationFilterPopup::onFriendRated @ 0x140479d75
// > ??> @ 0x140928580
//
// 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:32:42 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall NotificationFilterPopup::toggleSource(__int64 a1, int a2)
{
int v3; // edi
__int64 v4; // rbx
__int64 v5; // rbx
__int64 v6; // rdx
struct cocos2d::CCString *v7; // rax
void *v8; // rcx
void *v9; // [rsp+30h] [rbp-38h]
void *v10; // [rsp+30h] [rbp-38h]
void *Block[2]; // [rsp+38h] [rbp-30h] BYREF
__int64 v12; // [rsp+48h] [rbp-20h]
unsigned __int64 v13; // [rsp+50h] [rbp-18h]
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v9 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v9);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
}
v3 = a2 ^ NotificationFilterPopup::savedMask();
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v12 = 3;
v13 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0239", 4u);
v5 = *(_QWORD *)(v4 + 432);
v6 = (unsigned __int16)v3;
LODWORD(v6) = (unsigned __int16)v3 | 0x10000;
v7 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v6);
cocos2d::CCDictionary::setObject(v5, v7, Block);
if ( v13 > 0xF )
{
v8 = Block[0];
if ( v13 + 1 >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
}