// // MusicDownloadManager::pathForSFXFolder from 0x100650210 to 0x10065044f (575 bytes) // // 3 xrefs: // > MusicDownloadManager::pathForSFX @ 0x100650161 // > MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x10065f777 // > MusicDownloadManager::parseSFXLibrary @ 0x10065f937 // // 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 12:34:49 +0000 // std::string *__fastcall MusicDownloadManager::pathForSFXFolder(std::string *this, __int64 a2, int a3) { unsigned __int64 v4; // r9 unsigned __int64 v5; // r11 unsigned __int64 v6; // rdi __int64 **v7; // rax __int64 *v8; // r10 unsigned __int64 v9; // r9 const std::string::value_type *v10; // rsi __int64 v11; // rax unsigned __int64 v12; // rax __int64 v13; // rdi __int64 v14; // rax __int64 v15; // rax __int128 v17; // [rsp+8h] [rbp-28h] BYREF std::string::size_type v18; // [rsp+18h] [rbp-18h] *(_WORD *)&this->__r_.__value_.__l.0 = 0; v4 = *(_QWORD *)(a2 + 536); if ( v4 ) { v5 = (0x101010101010101LL * ((((v4 - ((v4 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v4 - ((v4 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((v4 - ((v4 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v4 - ((v4 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v5 <= 1 ) { v6 = a3 & (v4 - 1); v7 = *(__int64 ***)(*(_QWORD *)(a2 + 528) + 8 * v6); if ( !v7 ) goto LABEL_29; goto LABEL_9; } v6 = a3; if ( v4 <= a3 ) { if ( !((v4 | a3) >> 32) ) { v6 = a3 % (unsigned int)v4; v7 = *(__int64 ***)(*(_QWORD *)(a2 + 528) + 8 * v6); if ( !v7 ) goto LABEL_29; goto LABEL_9; } v6 = a3 % v4; } v7 = *(__int64 ***)(*(_QWORD *)(a2 + 528) + 8 * v6); if ( !v7 ) goto LABEL_29; LABEL_9: v8 = *v7; if ( !*v7 ) goto LABEL_29; if ( (unsigned int)v5 < 2 ) { v9 = v4 - 1; v10 = "sfx/"; while ( 1 ) { v11 = v8[1]; if ( v11 == a3 ) { if ( *((_DWORD *)v8 + 4) == a3 ) goto LABEL_33; } else if ( (v9 & v11) != v6 ) { goto LABEL_29; } v8 = (__int64 *)*v8; if ( !v8 ) goto LABEL_29; } } v10 = "sfx/"; while ( 1 ) { v12 = v8[1]; if ( v12 == a3 ) { if ( *((_DWORD *)v8 + 4) == a3 ) goto LABEL_33; goto LABEL_19; } if ( v12 < v4 ) goto LABEL_24; if ( (v4 | v12) >> 32 ) break; if ( (unsigned int)v12 % (unsigned int)v4 != v6 ) goto LABEL_29; LABEL_19: v8 = (__int64 *)*v8; if ( !v8 ) goto LABEL_29; } v12 %= v4; LABEL_24: if ( v12 != v6 ) goto LABEL_29; goto LABEL_19; } LABEL_29: v13 = GameManager::sharedState(); if ( (unsigned __int8)GameManager::getGameVariable(v13, "0033") ) { v14 = cocos2d::CCFileUtils::sharedFileUtils(v13, "0033"); (*(void (__fastcall **)(__int128 *, __int64))(*(_QWORD *)v14 + 152LL))(&v17, v14); if ( (*(_BYTE *)&this->__r_.__value_.__s.0 & 1) != 0 ) operator delete(this->__r_.__value_.__l.__data_); this->__r_.__value_.__r.__words[2] = v18; *(_OWORD *)&this->__r_.__value_.__l.0 = v17; v10 = "Resources\\"; LABEL_33: std::string::append(this, v10); } else { v15 = cocos2d::CCFileUtils::sharedFileUtils(v13, "0033"); (*(void (__fastcall **)(__int128 *, __int64))(*(_QWORD *)v15 + 144LL))(&v17, v15); if ( (*(_BYTE *)&this->__r_.__value_.__s.0 & 1) != 0 ) operator delete(this->__r_.__value_.__l.__data_); this->__r_.__value_.__r.__words[2] = v18; *(_OWORD *)&this->__r_.__value_.__l.0 = v17; } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source