// // GJAccountManager::backupAccount from 0x846710 to 0x846cd8 (1480 bytes) // // 2 xrefs: // > GJAccountManager::onGetAccountBackupURLCompleted @ 0x846e34 // > @ 0x610b0 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall GJAccountManager::backupAccount(GJAccountManager *a1) { _BOOL4 isDLActive; // w1 __int64 result; // x0 double v4; // d0 MusicDownloadManager *v5; // x0 GameManager *v6; // x0 LocalLevelManager *v7; // x0 LocalLevelManager *v8; // x0 GameLevelManager *v9; // x0 size_t v10; // x0 size_t v11; // x0 cocos2d::CCString *v12; // x0 size_t v13; // x0 char *v14; // x0 char *v15; // x0 char *v16; // x0 char *v17; // x0 char *v18; // x0 char *v19; // x0 void *v20; // x0 unsigned int *v21; // x1 int v22; // w2 unsigned int *v23; // x1 int v24; // w2 unsigned int *v25; // x1 int v26; // w2 unsigned int *v27; // x1 int v28; // w2 unsigned int *v29; // x1 int v30; // w2 unsigned int *v31; // x1 int v32; // w2 unsigned int *v33; // x1 int v34; // w2 char *v35; // [xsp+48h] [xbp+48h] char *v36; // [xsp+48h] [xbp+48h] const char *CString; // [xsp+48h] [xbp+48h] __int64 v38; // [xsp+70h] [xbp+70h] BYREF char *v39; // [xsp+78h] [xbp+78h] BYREF char *v40; // [xsp+80h] [xbp+80h] BYREF char *v41; // [xsp+88h] [xbp+88h] BYREF const char *v42; // [xsp+90h] [xbp+90h] BYREF const char *v43; // [xsp+98h] [xbp+98h] BYREF const char *v44; // [xsp+A0h] [xbp+A0h] BYREF isDLActive = GJAccountManager::isDLActive(a1, "bak_account"); result = 0; if ( !isDLActive ) { GJAccountManager::addDLToActive(a1, "bak_account"); *(_QWORD *)&v4 = sub_D18D28(&v38).n128_u64[0]; sub_D1798C(&a1->m_GJP2, "0", 1, v4); GameManager::sharedState()->m_quickSave = 1; v5 = MusicDownloadManager::sharedState(); MusicDownloadManager::clearUnusedSongs(v5); v6 = GameManager::sharedState(); GManager::getCompressedSaveString(v6, (__int64)&v39); a1->m_gameManagerSize = *((_QWORD *)v39 - 3); GameManager::sharedState()->m_quickSave = 0; v7 = LocalLevelManager::sharedState(); LocalLevelManager::updateLevelOrder(v7); v8 = LocalLevelManager::sharedState(); GManager::getCompressedSaveString(v8, (__int64)&v40); a1->m_localLevelsSize = *((_QWORD *)v40 - 3); sub_D18EA8(&a1->m_GJP2, &v38); v9 = GameLevelManager::sharedState(); GameLevelManager::getBasePostString(v9, (__int64)&v41); sub_D15FD4(&v41, "&saveData=", 10); v35 = v39; v10 = strlen(v39); sub_D15FD4(&v41, v35, v10); sub_D15FD4(&v41, ";", 1); v36 = v40; v11 = strlen(v40); sub_D15FD4(&v41, v36, v11); sub_D15FD4(&v41, "&secret=", 8); v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%c%s%s%c%c%s", (const char *)off_50 + 7, "mfv", "3899", 103, 99, "9"); CString = cocos2d::CCString::getCString(v12); v13 = strlen(CString); sub_D15FD4(&v41, CString, v13); sub_D18D28(&v42); sub_D153B8((int)&v43, v41); sub_D153B8((int)&v44, "BackupAccount"); GJAccountManager::ProcessHttpRequest(a1, &v42, &v43, &v44, 20); v14 = (char *)(v44 - 24); if ( v44 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v23 = (unsigned int *)(v44 - 8); do v24 = __ldaxr(v23); while ( __stlxr(v24 - 1, v23) ); } else { v24 = *((_DWORD *)v44 - 2); *((_DWORD *)v44 - 2) = v24 - 1; } if ( v24 <= 0 ) operator delete(v14); } v15 = (char *)(v43 - 24); if ( v43 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v27 = (unsigned int *)(v43 - 8); do v28 = __ldaxr(v27); while ( __stlxr(v28 - 1, v27) ); } else { v28 = *((_DWORD *)v43 - 2); *((_DWORD *)v43 - 2) = v28 - 1; } if ( v28 <= 0 ) operator delete(v15); } v16 = (char *)(v42 - 24); if ( v42 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v25 = (unsigned int *)(v42 - 8); do v26 = __ldaxr(v25); while ( __stlxr(v26 - 1, v25) ); } else { v26 = *((_DWORD *)v42 - 2); *((_DWORD *)v42 - 2) = v26 - 1; } if ( v26 <= 0 ) operator delete(v16); } v17 = v41 - 24; if ( v41 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v31 = (unsigned int *)(v41 - 8); do v32 = __ldaxr(v31); while ( __stlxr(v32 - 1, v31) ); } else { v32 = *((_DWORD *)v41 - 2); *((_DWORD *)v41 - 2) = v32 - 1; } if ( v32 <= 0 ) operator delete(v17); } v18 = v40 - 24; if ( v40 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v29 = (unsigned int *)(v40 - 8); do v30 = __ldaxr(v29); while ( __stlxr(v30 - 1, v29) ); } else { v30 = *((_DWORD *)v40 - 2); *((_DWORD *)v40 - 2) = v30 - 1; } if ( v30 <= 0 ) operator delete(v18); } v19 = v39 - 24; if ( v39 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v33 = (unsigned int *)(v39 - 8); do v34 = __ldaxr(v33); while ( __stlxr(v34 - 1, v33) ); } else { v34 = *((_DWORD *)v39 - 2); *((_DWORD *)v39 - 2) = v34 - 1; } if ( v34 <= 0 ) operator delete(v19); } v20 = (void *)(v38 - 24); if ( (__int64 *)(v38 - 24) == &qword_124B6B0 ) return 1; if ( &pthread_create ) { v21 = (unsigned int *)(v38 - 8); do v22 = __ldaxr(v21); while ( __stlxr(v22 - 1, v21) ); } else { v22 = *(_DWORD *)(v38 - 8); *(_DWORD *)(v38 - 8) = v22 - 1; } if ( v22 > 0 ) { return 1; } else { operator delete(v20); return 1; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source