// // CustomSFXWidget::updateSFXInfo from 0xb5e394 to 0xb5ed44 (2480 bytes) // // 12 xrefs: // > CustomSFXWidget::deleteSFX @ 0xb5edd0 // > CustomSFXWidget::updateSFXObject @ 0xb5efb0 // > CustomSFXWidget::updateSFXObject @ 0xb5efc8 // > CustomSFXWidget::downloadFailed @ 0xb5f004 // > CustomSFXWidget::onToggleFavorite @ 0xb5f09c // > CustomSFXWidget::onToggleFavorite @ 0xb5f0bc // > CustomSFXWidget::onToggleSelect @ 0xb5f104 // > CustomSFXWidget::updateDownloadProgress @ 0xb5f178 // > CustomSFXWidget::songStateChanged @ 0xb5f18c // > CustomSFXWidget::updateLengthMod @ 0xb5f1ac // > CustomSFXWidget::init @ 0xb60394 // > @ 0xba5c8 // // This function is hookable on this platform (idp: arm, 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 13:02:10 +0000 // __int64 __fastcall CustomSFXWidget::updateSFXInfo(CustomSFXWidget *this) { __int64 v2; // x1 void (*v3)(void); // x2 __int64 v4; // x1 unsigned int v5; // w22 char *v6; // x2 cocos2d::CCString *v7; // x0 char *CString; // x0 unsigned int v9; // w0 cocos2d::CCString *v10; // x0 char *v11; // x0 int v12; // w1 float v13; // s1 float v14; // s0 char *v15; // x1 float v16; // s0 cocos2d::CCString *v17; // x0 char *v18; // x0 char *v19; // x1 __int64 v20; // x0 __int64 v21; // x2 __int64 v22; // x1 __int64 v23; // x0 cocos2d::CCSpriteFrameCache **v24; // x20 MusicDownloadManager *v25; // x0 MusicDownloadManager *v26; // x0 _BOOL4 isSFXFavorite; // w23 void (__fastcall *v28)(cocos2d::CCSpriteFrameCache **, __int64); // x22 cocos2d::CCSpriteFrameCache *v29; // x0 const char *v30; // x1 __int64 v31; // x0 __int64 v32; // x0 cocos2d::CCSpriteFrameCache **v33; // x20 void (__fastcall *v34)(cocos2d::CCSpriteFrameCache **, __int64); // x22 cocos2d::CCSpriteFrameCache *v35; // x23 __int64 v36; // x0 const char *v37; // x1 __int64 v38; // x0 int v39; // w20 float v40; // s0 __int64 v41; // x0 cocos2d::CCLabelBMFont *v42; // x20 float v43; // s0 float v44; // s8 float v45; // s9 __int64 v46; // x24 float v47; // s0 __int64 v48; // x24 cocos2d::CCNode *v49; // x25 void (__fastcall *v50)(__int64, __int64 *); // x23 cocos2d::CCLabelBMFont *v52; // x0 float v53; // s0 __int64 v54; // x24 void (__fastcall *v55)(__int64, __int64 *); // x25 __int64 v56; // x26 float v57; // s8 float v58; // s0 __int64 v59; // x22 void (__fastcall *v60)(__int64, __int64); // x23 __int64 v61; // x0 float *v62; // x0 cocos2d::CCLabelBMFont *v63; // x22 float v64; // s8 float v65; // s8 float v66; // s0 unsigned int v67; // w20 MusicDownloadManager *v68; // x0 cocos2d::CCSpriteFrameCache **v69; // x22 void (__fastcall *v70)(cocos2d::CCSpriteFrameCache **, __int64); // x20 cocos2d::CCSpriteFrameCache *v71; // x0 __int64 v72; // x0 MusicDownloadManager *v73; // x0 MusicDownloadManager *v74; // x0 void (*v75)(void); // x2 MusicDownloadManager *v76; // x0 void (__fastcall *v77)(cocos2d::CCSpriteFrameCache **, __int64); // x20 cocos2d::CCSpriteFrameCache *v78; // x0 __int64 v79; // x0 __int64 v80; // [xsp+70h] [xbp+70h] BYREF __int64 v81; // [xsp+78h] [xbp+78h] BYREF __int64 v82; // [xsp+80h] [xbp+80h] BYREF __int64 v83; // [xsp+88h] [xbp+88h] BYREF __int64 v84; // [xsp+90h] [xbp+90h] char *v85; // [xsp+98h] [xbp+98h] __int64 v86[2]; // [xsp+A0h] [xbp+A0h] BYREF void *v87; // [xsp+B0h] [xbp+B0h] v2 = *((_QWORD *)this + 42); if ( !v2 ) { (*(void (__fastcall **)(_QWORD, const char *))(**((_QWORD **)this + 44) + 928LL))( *((_QWORD *)this + 44), "No SFX loaded"); (*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 45) + 928LL))(*((_QWORD *)this + 45), &byte_11B8890); goto LABEL_23; } v3 = *(void (**)(void))(**((_QWORD **)this + 44) + 928LL); if ( (*(_BYTE *)(v2 + 80) & 1) != 0 ) { v3(); v83 = 0; v4 = *((_QWORD *)this + 42); v84 = 0; v85 = nullptr; if ( !*(_BYTE *)(v4 + 72) ) goto LABEL_4; LABEL_10: v9 = cocos2d::CCArray::count(*(cocos2d::CCArray **)(v4 + 152)); v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Files: %i", (const char *)v9); goto LABEL_11; } v3(); v83 = 0; v4 = *((_QWORD *)this + 42); v84 = 0; v85 = nullptr; if ( *(_BYTE *)(v4 + 72) ) goto LABEL_10; LABEL_4: if ( !*((_BYTE *)this + 492) ) { v5 = *(_DWORD *)(v4 + 56); formatBytes(v86, *(_DWORD *)(v4 + 64)); v6 = (char *)v86 + 1; if ( (v86[0] & 1) != 0 ) v6 = (char *)v87; v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"ID: %i Size: %s", (const char *)v5, v6); CString = (char *)cocos2d::CCString::getCString(v7); std::string::assign(&v83, CString); if ( (v86[0] & 1) != 0 ) operator delete(v87); goto LABEL_12; } v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)*(unsigned int *)(v4 + 56)); LABEL_11: v11 = (char *)cocos2d::CCString::getCString(v10); std::string::assign(&v83, v11); LABEL_12: v12 = *(_DWORD *)(*((_QWORD *)this + 42) + 68LL); if ( v12 > 0 ) { v13 = *((float *)this + 125); v14 = (float)v12; v15 = (char *)&v83 + 1; v16 = v14 / 100.0; if ( v13 <= 0.0 || v13 == 1.0 ) { if ( (v83 & 1) != 0 ) v15 = v85; v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s (%.2f s)", v15, v16); } else { if ( (v83 & 1) != 0 ) v15 = v85; v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s (%.2f s) (%.2f s)", v15, v16, (float)(v16 / v13)); } v18 = (char *)cocos2d::CCString::getCString(v17); std::string::assign(&v83, v18); } if ( (v83 & 1) != 0 ) v19 = v85; else v19 = (char *)&v83 + 1; (*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 45) + 928LL))(*((_QWORD *)this + 45), v19); if ( (v83 & 1) != 0 ) operator delete(v85); LABEL_23: v20 = *((_QWORD *)this + 42); if ( !v20 || *(_BYTE *)(v20 + 72) ) { (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 47) + 344LL))(*((_QWORD *)this + 47), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 48) + 344LL))(*((_QWORD *)this + 48), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 49) + 344LL))(*((_QWORD *)this + 49), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 50) + 344LL))(*((_QWORD *)this + 50), 0); v21 = *((_QWORD *)this + 51); v22 = 0; LABEL_26: (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 344LL))(v21, v22); CustomSFXWidget::hideLoadingArt(this); goto LABEL_27; } v67 = *(_DWORD *)(v20 + 56); v68 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v20); if ( (unsigned __int8)MusicDownloadManager::isSFXDownloaded(v68, v67) ) { (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 47) + 344LL))(*((_QWORD *)this + 47), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 48) + 344LL))(*((_QWORD *)this + 48), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 51) + 344LL))( *((_QWORD *)this + 51), *((unsigned __int8 *)this + 488)); if ( *((_BYTE *)this + 488) && *((_QWORD *)this + 60) ) { (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 49) + 344LL))(*((_QWORD *)this + 49), 1); v69 = (cocos2d::CCSpriteFrameCache **)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 49) + 1072LL))(*((_QWORD *)this + 49)); if ( v67 == (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 60) + 8LL))(*((_QWORD *)this + 60)) && (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 60) + 16LL))(*((_QWORD *)this + 60)) == *(_DWORD *)(*((_QWORD *)this + 42) + 76LL) ) { (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 49) + 1056LL))(*((_QWORD *)this + 49), 0); v77 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v69 + 145); v78 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v69); v79 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v78, "GJ_selectSongOnBtn_001.png"); v77(v69, v79); } else { (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 49) + 1056LL))(*((_QWORD *)this + 49), 1); v70 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v69 + 145); v71 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v69); v72 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v71, "GJ_selectSongBtn_001.png"); v70(v69, v72); } } else { (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 49) + 344LL))(*((_QWORD *)this + 49), 0); } v21 = *((_QWORD *)this + 50); v22 = *((unsigned __int8 *)this + 489); goto LABEL_26; } (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 49) + 344LL))(*((_QWORD *)this + 49), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 50) + 344LL))(*((_QWORD *)this + 50), 0); v73 = (MusicDownloadManager *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 51) + 344LL))( *((_QWORD *)this + 51), 0); v74 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v73); if ( MusicDownloadManager::isRunningActionForSongID(v74, (const char *)*((unsigned int *)this + 124)) || *((_BYTE *)this + 491) ) { (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 47) + 344LL))(*((_QWORD *)this + 47), 0); v75 = *(void (**)(void))(**((_QWORD **)this + 48) + 344LL); } else { (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 47) + 344LL))( *((_QWORD *)this + 47), *((_BYTE *)this + 490) != 0); v75 = *(void (**)(void))(**((_QWORD **)this + 48) + 344LL); } v75(); LABEL_27: v23 = *((_QWORD *)this + 52); if ( v23 ) { if ( !*((_QWORD *)this + 42) ) { LABEL_40: v32 = *((_QWORD *)this + 55); goto LABEL_41; } v24 = (cocos2d::CCSpriteFrameCache **)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 1072LL))(v23); v25 = (MusicDownloadManager *)*(unsigned int *)(*((_QWORD *)this + 42) + 76LL); if ( (int)v25 <= 0 ) { v76 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v25); isSFXFavorite = MusicDownloadManager::isSFXFavorite(v76, *(_DWORD *)(*((_QWORD *)this + 42) + 56LL)); } else { v26 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v25); isSFXFavorite = MusicDownloadManager::isCustomSFXFavorite(v26, *(_DWORD *)(*((_QWORD *)this + 42) + 76LL)); } v28 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v24 + 145); v29 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v24); if ( isSFXFavorite ) v30 = "gj_heartOn_001.png"; else v30 = "gj_heartOff_001.png"; v31 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v29, v30); v28(v24, v31); } v32 = *((_QWORD *)this + 55); if ( v32 && *((_QWORD *)this + 42) ) { v33 = (cocos2d::CCSpriteFrameCache **)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v32 + 1072LL))(v32); v34 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v33 + 145); v35 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v33); v36 = *((_QWORD *)this + 60); if ( v36 && (*(unsigned __int8 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v36 + 56LL))( v36, *(unsigned int *)(*((_QWORD *)this + 42) + 76LL)) ) { v37 = "GJ_checkOn_001.png"; } else { v37 = "GJ_checkOff_001.png"; } v38 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v35, v37); v34(v33, v38); goto LABEL_40; } LABEL_41: v39 = 2; if ( !*((_BYTE *)this + 493) ) { if ( *((_QWORD *)this + 54) ) v39 = 2; else v39 = 1; } if ( *((_QWORD *)this + 53) ) { v39 = 3; } else if ( *((_QWORD *)this + 54) && *((_BYTE *)this + 493) ) { v39 = 3; } if ( v32 ) { if ( *((_BYTE *)this + 493) ) { if ( !*((_BYTE *)this + 492) ) { v40 = 155.0; goto LABEL_51; } v52 = *((cocos2d::CCLabelBMFont **)this + 44); v39 = 4; v53 = 130.0; LABEL_62: cocos2d::CCLabelBMFont::limitLabelWidth(v52, v53, 0.4, 0.0); v54 = *((_QWORD *)this + 45); v55 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v54 + 184LL); v56 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 44) + 192LL))(*((_QWORD *)this + 44)); v57 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 44) + 328LL))(*((_QWORD *)this + 44)); v58 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 44) + 168LL))(*((_QWORD *)this + 44)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v81, (float)(v57 * v58) + 5.0, 0.0); cocos2d::CCPoint::operator+(&v82, v56); v55(v54, &v82); v59 = *((_QWORD *)this + 46); v60 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v59 + 184LL); v61 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 45) + 192LL))(*((_QWORD *)this + 45)); v60(v59, v61); v62 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 47) + 192LL))(*((_QWORD *)this + 47)); v63 = *((cocos2d::CCLabelBMFont **)this + 45); v64 = (float)(*v62 - (float)((float)v39 * 20.0)) - 10.0; v65 = v64 - (*(float (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)v63 + 224LL))(v63); v66 = CustomSFXWidget::infoBtnWidth(this); cocos2d::CCLabelBMFont::limitLabelWidth(v63, v65 - v66, 0.6, 0.4); goto LABEL_55; } if ( *((_BYTE *)this + 492) ) { v52 = *((cocos2d::CCLabelBMFont **)this + 44); v39 = 3; v53 = 150.0; goto LABEL_62; } } else { if ( *((_BYTE *)this + 492) ) { v52 = *((cocos2d::CCLabelBMFont **)this + 44); v53 = 150.0; if ( v39 != 3 ) v53 = 200.0; goto LABEL_62; } if ( v39 != 3 ) { if ( v39 == 2 ) v40 = 210.0; else v40 = 240.0; goto LABEL_51; } } v40 = 185.0; LABEL_51: v41 = *((_QWORD *)this + 42); if ( v41 && *(_BYTE *)(v41 + 72) ) v40 = v40 - 50.0; cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 44), v40, 0.5, 0.0); v42 = *((cocos2d::CCLabelBMFont **)this + 45); v43 = CustomSFXWidget::infoBtnWidth(this); cocos2d::CCLabelBMFont::limitLabelWidth(v42, 255.0 - v43, 0.6, 0.45); LABEL_55: if ( *((_QWORD *)this + 56) ) { v44 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 45) + 328LL))(*((_QWORD *)this + 45)); v45 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 45) + 168LL))(*((_QWORD *)this + 45)); v46 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 45) + 192LL))(*((_QWORD *)this + 45)); v47 = CustomSFXWidget::infoBtnWidth(this); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v82, (float)((float)(v47 * 0.5) + (float)(v44 * v45)) + 2.0, 0.0); cocos2d::CCPoint::operator+(&v80, v46); v48 = *((_QWORD *)this + 56); v49 = *((cocos2d::CCNode **)this + 43); v50 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v48 + 184LL); cocos2d::CCNode::convertToWorldSpace(&v81, this, (const cocos2d::CCPoint *)&v80); cocos2d::CCNode::convertToNodeSpace(&v82, v49, (const cocos2d::CCPoint *)&v81); v50(v48, &v82); } (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 51) + 344LL))(*((_QWORD *)this + 51), 0); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source