//
// MenuLayer::updateNewsBadge from 0x140474840 to 0x1404749a7 (359 bytes)
//
// 4 xrefs:
// > MenuLayer::init @ 0x140473aac
// > MenuLayer::onNews @ 0x140474815
// > MenuLayer::musicActionFinished @ 0x1404749bc
// > ??> @ 0x140928298
//
// 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:40 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall MenuLayer::updateNewsBadge(__int64 a1, __int64 a2)
{
__int64 v3; // rcx
__int64 v4; // rax
int v5; // ebx
__int64 v6; // rax
struct cocos2d::CCSprite *v7; // rdi
const struct cocos2d::CCSize *v8; // rax
__int64 v9; // rbx
__int64 v10; // rax
float v11; // [rsp+30h] [rbp+8h] BYREF
float v12; // [rsp+34h] [rbp+Ch]
void *v13; // [rsp+38h] [rbp+10h] BYREF
v3 = *(_QWORD *)(a1 + 488);
if ( v3 )
{
LOBYTE(a2) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 576LL))(v3, a2);
v4 = qword_14090C070;
if ( !qword_14090C070 )
{
v13 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v4 = qword_14090C070;
}
v5 = *(_DWORD *)(v4 + 964);
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v13 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
if ( v5 > *(_DWORD *)(v6 + 1176) )
{
v7 = cocos2d::CCSprite::createWithSpriteFrameName("exMark_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v7 + 160LL))(v7);
v8 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 488) + 320LL))(*(_QWORD *)(a1 + 488));
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v11, v8);
v9 = *(_QWORD *)v7;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, (float)(v11 - 8.0) * 0.80000001, v12 - 7.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v9 + 184))(v7, v10);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 488) + 456LL))(
*(_QWORD *)(a1 + 488),
v7,
10);
}
}
}