// // NewsPopup::onBlockClicked from 0x6c27f4 to 0x6c2bb2 (958 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:56:52 +0000 // int __fastcall NewsPopup::onBlockClicked(int this, cocos2d::CCObject *a2) { int v2; // r5 int v4; // r7 int v5; // r4 int v6; // r4 int v7; // r2 int v8; // r6 cocos2d::CCFileUtils *v9; // r8 int isNewsImageDownloaded; // r8 MusicDownloadManager *v11; // r0 int v12; // r0 int v13; // r1 int v14; // r6 int v15; // r3 char *v17; // r1 int v18; // r3 bool v19; // cc char *v20; // r3 char *i; // lr char *v22; // r2 char *v23; // r12 char *v24; // lr char *v25; // r0 int v26; // r9 int v27; // t1 int v28; // t1 int v29; // r2 int v30; // r0 unsigned int v31; // r1 void *v32; // r2 signed int v33; // r8 char *v34; // r0 int v35; // r0 unsigned int v36; // r1 void *v37; // r2 unsigned int v38; // r3 size_t v39; // r2 char *v40; // r9 _BYTE *v41; // r0 int v42; // r0 unsigned int v43; // r1 void *v44; // r2 size_t v45; // r2 const char *v46; // r1 cocos2d::CCString *v47; // r0 const char *CString; // r8 size_t v49; // r0 int v50; // r5 char *v51; // r6 int *v52; // r5 int v53[3]; // [sp+10h] [bp-44h] BYREF int v54; // [sp+1Ch] [bp-38h] BYREF unsigned int v55; // [sp+20h] [bp-34h] void *v56; // [sp+24h] [bp-30h] int v57; // [sp+28h] [bp-2Ch] BYREF unsigned int v58; // [sp+2Ch] [bp-28h] void *v59; // [sp+30h] [bp-24h] int v60; // [sp+34h] [bp-20h] BYREF unsigned int v61; // [sp+38h] [bp-1Ch] void *v62; // [sp+3Ch] [bp-18h] int v63; // [sp+40h] [bp-14h] BYREF unsigned int v64; // [sp+44h] [bp-10h] void *v65; // [sp+48h] [bp-Ch] v2 = this; if ( a2 ) { cocos2d::CCObject::retain(a2); this = cocos2d::CCObject::autorelease(a2); v4 = *(_DWORD *)(v2 + 528); v5 = *(_DWORD *)(v2 + 540); if ( v5 < -858993459 * ((*(_DWORD *)(v2 + 532) - v4) >> 3) ) { this = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2); if ( this >= 0 ) { v6 = v4 + 40 * v5; v7 = *(_DWORD *)(v6 + 28); if ( this < -991146299 * ((*(_DWORD *)(v6 + 32) - v7) >> 2) ) { this *= 52; v8 = v7 + this; if ( *(_DWORD *)(v7 + this) == 1 ) { v9 = (cocos2d::CCFileUtils *)MusicDownloadManager::sharedState((MusicDownloadManager *)this); std::string::basic_string(&v63, v8 + 16); isNewsImageDownloaded = MusicDownloadManager::isNewsImageDownloaded(v9, (int)&v63); this = std::string::~string((int)&v63); if ( !isNewsImageDownloaded ) { v11 = (MusicDownloadManager *)std::__tree::__erase_unique( (int **)(v2 + 588), (unsigned __int8 *)(v8 + 16)); v12 = MusicDownloadManager::sharedState(v11); v13 = v8 + 16; v14 = v12; std::string::basic_string(&v63, v13); MusicDownloadManager::downloadNewsImage(v14, (unsigned __int8 *)&v63); std::string::~string((int)&v63); return NewsPopup::rebuildPage((NewsPopup *)v2, *(_DWORD *)(v2 + 540)); } } v15 = *(unsigned __int8 *)(v8 + 40); if ( (v15 & 1) != 0 ? *(_DWORD *)(v8 + 44) : v15 >> 1 ) { std::string::operator=((unsigned __int8 *)(v2 + 576), (unsigned __int8 *)(v8 + 40)); memset(v53, 0, sizeof(v53)); std::string::__init(v53, "Watch this video on YouTube?", 0x24u); if ( *(_BYTE *)(v8 + 36) ) { LABEL_64: v50 = v2 + 520; if ( *(_BYTE *)(v8 + 36) ) v51 = "Open YouTube"; else v51 = "Open Link"; std::string::basic_string(&v63, (int)v53); v52 = FLAlertLayer::create( v50, (cocos2d::CCLabelBMFont *)v51, (int)&v63, (ButtonSprite *)"Cancel", (ButtonSprite *)"Open"); std::string::~string((int)&v63); (*(void (__fastcall **)(int *))(*v52 + 656))(v52); return std::string::~string((int)v53); } std::string::basic_string(&v63, v8 + 40); if ( (v63 & 1) != 0 ) { v17 = (char *)v65; v18 = v64; } else { v18 = (int)(unsigned __int8)v63 >> 1; v17 = (char *)&v63 + 1; } v19 = v18 <= 2; if ( (unsigned int)v18 > 2 ) { v20 = &v17[v18]; if ( !v19 ) { for ( i = v17; ; i = v23 ) { v22 = i; if ( i == v20 - 2 ) break; v23 = i + 1; if ( *i == 58 ) { v24 = "//"; v25 = v22; while ( v25 != v22 + 2 ) { v27 = (unsigned __int8)*v24++; v26 = v27; v28 = (unsigned __int8)*++v25; if ( v28 != v26 ) goto LABEL_20; } goto LABEL_26; } LABEL_20: ; } } v22 = v20; LABEL_26: if ( v22 != v20 ) { v29 = v22 - v17; if ( v29 != -1 ) { std::string::basic_string(&v54, (unsigned __int8 *)&v63, v29 + 3, 0xFFFFFFFF); if ( (v63 & 1) != 0 ) { *(_BYTE *)v65 = 0; v64 = 0; } else { LOWORD(v63) = 0; } std::string::reserve(&v63, 0); v30 = v54; v31 = v55; v32 = v56; v54 = 0; v55 = 0; v56 = nullptr; v63 = v30; v64 = v31; v65 = v32; std::string::~string((int)&v54); } } } if ( (v63 & 1) != 0 ) { v33 = v64; v34 = (char *)v65; if ( v64 >= 4 ) v33 = 4; } else { v33 = (int)(unsigned __int8)v63 >> 1; v34 = (char *)&v63 + 1; if ( v33 > 3 ) v33 = 4; } if ( !std::char_traits::compare(v34, "www.", v33) && v33 == 4 ) { std::string::basic_string(&v57, (unsigned __int8 *)&v63, 4u, 0xFFFFFFFF); if ( (v63 & 1) != 0 ) { *(_BYTE *)v65 = 0; v64 = 0; } else { LOWORD(v63) = 0; } std::string::reserve(&v63, 0); v35 = v57; v36 = v58; v37 = v59; v57 = 0; v58 = 0; v59 = nullptr; v63 = v35; v64 = v36; v65 = v37; std::string::~string((int)&v57); } v38 = (unsigned __int8)v63; if ( (v63 & 1) != 0 ) { v39 = v64; v40 = (char *)v65; if ( !v64 ) { LABEL_56: if ( !v64 ) goto LABEL_59; v47 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Open %s in your browser?", (const char *)v65); goto LABEL_63; } } else { v39 = (int)(unsigned __int8)v63 >> 1; if ( !v39 ) goto LABEL_58; v40 = (char *)&v63 + 1; } v41 = memchr(v40, 47, v39); if ( v41 && v41 - v40 != -1 ) { std::string::basic_string(&v60, (unsigned __int8 *)&v63, 0, v41 - v40); if ( (v63 & 1) != 0 ) { *(_BYTE *)v65 = 0; v64 = 0; } else { LOWORD(v63) = 0; } std::string::reserve(&v63, 0); v42 = v60; v43 = v61; v44 = v62; v60 = 0; v61 = 0; v62 = nullptr; v63 = v42; v64 = v43; v65 = v44; std::string::~string((int)&v60); } v38 = (unsigned __int8)v63; if ( (v63 & 1) != 0 ) goto LABEL_56; LABEL_58: if ( !(v38 >> 1) ) { LABEL_59: v45 = 31; v46 = "Open this link in your browser?"; LABEL_60: std::string::assign(v53, v46, v45); std::string::~string((int)&v63); goto LABEL_64; } v47 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Open %s in your browser?", (const char *)&v63 + 1); LABEL_63: CString = (const char *)cocos2d::CCString::getCString(v47); v49 = strlen(CString); v46 = CString; v45 = v49; goto LABEL_60; } } } } } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source