// // MenuLayer::onNews from 0x140474480 to 0x14047483d (957 bytes) // // 2 xrefs: // > MenuLayer::init @ 0x140472d35 // > @ 0x14092828c // // 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=7 __int64 __fastcall MenuLayer::onNews(__int64 a1) { cocos2d::CCObject *v2; // rdi _QWORD *v3; // rax _QWORD *v4; // rax __int64 (__fastcall *v5)(cocos2d::CCObject *); // rdx char v6; // al __int64 (__fastcall *v7)(__int64); // rdx __int64 v8; // rdx __int64 v9; // rcx __int64 v10; // r8 __int64 v11; // rdi __int64 v12; // rbx cocos2d::CCString *v13; // rax int v14; // ebx void *v15; // r8 __int64 v16; // rdx __int64 v17; // rcx __int64 v18; // r8 __int64 v19; // rax void *v21; // [rsp+30h] [rbp-48h] void *Block[2]; // [rsp+40h] [rbp-38h] BYREF __int64 v23; // [rsp+50h] [rbp-28h] unsigned __int64 v24; // [rsp+58h] [rbp-20h] v2 = (cocos2d::CCObject *)operator new(0x340u); FLAlertLayer::FLAlertLayer((__int64)v2); *(_QWORD *)v2 = &NewsPopup::`vftable'; *((_QWORD *)v2 + 40) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 41) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 42) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 43) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 44) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 51) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 54) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 68) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 83) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 84) = &NewsPopup::`vftable'; *((_QWORD *)v2 + 85) = 0; *((_QWORD *)v2 + 86) = 0; *((_QWORD *)v2 + 87) = 0; *((_QWORD *)v2 + 88) = 0; *((_QWORD *)v2 + 89) = 0; *((_QWORD *)v2 + 90) = 0; *((_BYTE *)v2 + 728) = 0; *((_QWORD *)v2 + 92) = 0; *((_QWORD *)v2 + 93) = 0; *((_QWORD *)v2 + 94) = 0; *((_QWORD *)v2 + 95) = 0; *((_OWORD *)v2 + 48) = 0; *((_QWORD *)v2 + 98) = 0; *((_QWORD *)v2 + 99) = 15; *((_BYTE *)v2 + 768) = 0; *((_QWORD *)v2 + 100) = 0; *((_QWORD *)v2 + 101) = 0; v3 = operator new(0x40u); *v3 = v3; v3[1] = v3; v3[2] = v3; *((_WORD *)v3 + 12) = 257; *((_QWORD *)v2 + 100) = v3; *((_QWORD *)v2 + 102) = 0; *((_QWORD *)v2 + 103) = 0; v4 = operator new(0x40u); *v4 = v4; v4[1] = v4; v4[2] = v4; *((_WORD *)v4 + 12) = 257; *((_QWORD *)v2 + 102) = v4; v5 = *(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v2 + 72LL); if ( (char *)v5 == (char *)NewsPopup::init ) v6 = NewsPopup::init(v2); else v6 = v5(v2); if ( v6 ) { cocos2d::CCObject::autorelease(v2); } else { (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v2 + 8LL))(v2, 1); v2 = nullptr; } v7 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 1064LL); if ( v7 == FLAlertLayer::show ) FLAlertLayer::show((__int64)v2); else v7((__int64)v2); v11 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v21 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v21); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v11 = qword_14090BFD0; } v12 = AchievementManager::sharedState(v9, v8, v10); *(_OWORD *)Block = 0; Block[0] = sub_14003D460(0x20u); v23 = 22; v24 = 31; strcpy((char *)Block[0], "geometry.ach.moreGames"); v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v12 + 352), Block); v14 = cocos2d::CCString::intValue(v13); if ( v24 > 0xF ) { v15 = Block[0]; if ( v24 + 1 >= 0x1000 ) { v15 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v15 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v15); } if ( v14 < 100 ) { *(_OWORD *)Block = 0; v23 = 0; v24 = 0; Block[0] = sub_14003D460(0x20u); v23 = 22; v24 = 31; strcpy((char *)Block[0], "geometry.ach.moreGames"); GameManager::completedAchievement(v11, (__int64)Block); v19 = AchievementManager::sharedState(v17, v16, v18); AchievementManager::reportAchievementWithID(v19, (__int64)"geometry.ach.moreGames", 100); } return MenuLayer::updateNewsBadge(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source