// // GJMultiplayerManager::uploadComment from 0x6422b4 to 0x642654 (928 bytes) // // 2 xrefs: // > ShareCommentLayer::onShare @ 0x541092 // > MPLobbyLayer::postComment @ 0x66a74c // // 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:55:29 +0000 // int __fastcall GJMultiplayerManager::uploadComment(cocos2d::CCObject *a1, unsigned __int8 *a2, const char *a3) { bool v5; // zf int v6; // r3 int v7; // r0 int v8; // r0 unsigned int v9; // r3 unsigned int v10; // r0 void *v11; // r0 void *v12; // r9 int v13; // r8 int v14; // r2 int v15; // r2 int v16; // r0 int v17; // r1 int v18; // r2 cocos2d::CCString *v19; // r0 GameLevelManager *CString; // r11 int v21; // r8 char *v22; // r2 int v23; // r3 const char *v24; // r9 _BYTE *v25; // r8 cocos2d::CCString *v26; // r0 int v27; // r0 cocos2d::CCString *v28; // r0 char *v29; // r0 GJAccountManager *v30; // r0 int v31; // r0 unsigned __int8 *v32; // r2 _BYTE *v33; // r3 cocos2d::CCString *v34; // r0 const char *v35; // r8 size_t v36; // r0 char *v37; // r9 const void *v38; // r0 unsigned __int8 *v39; // r3 char *v40; // r2 size_t v41; // r0 char *v42; // r1 size_t v43; // r2 size_t v44; // r0 GJMultiplayerManager *v45; // r0 GJAccountManager *v46; // r8 char v49; // [sp+24h] [bp-C0h] BYREF _BYTE v50[7]; // [sp+25h] [bp-BFh] BYREF _BYTE *v51; // [sp+2Ch] [bp-B8h] _DWORD v52[3]; // [sp+30h] [bp-B4h] BYREF int v53[2]; // [sp+3Ch] [bp-A8h] BYREF char *v54; // [sp+44h] [bp-A0h] unsigned __int8 v55; // [sp+48h] [bp-9Ch] BYREF char v56; // [sp+49h] [bp-9Bh] BYREF size_t v57; // [sp+4Ch] [bp-98h] char *v58; // [sp+50h] [bp-94h] int v59[3]; // [sp+54h] [bp-90h] BYREF int v60[3]; // [sp+60h] [bp-84h] BYREF int v61[3]; // [sp+6Ch] [bp-78h] BYREF int v62[3]; // [sp+78h] [bp-6Ch] BYREF int v63[3]; // [sp+84h] [bp-60h] BYREF int v64; // [sp+90h] [bp-54h] BYREF int v65; // [sp+94h] [bp-50h] int v66; // [sp+98h] [bp-4Ch] unsigned __int8 v67[20]; // [sp+9Ch] [bp-48h] BYREF unsigned __int8 v68[44]; // [sp+B0h] [bp-34h] BYREF std::string::basic_string(v63, (int)a2); LevelTools::base64EncodeString(&v64, v63); v6 = *a2 & 1; v5 = v6 == 0; if ( (*a2 & 1) != 0 ) { v6 = 0; **((_BYTE **)a2 + 2) = 0; } else { *a2 = v6; a2[1] = v6; } v7 = *a2; if ( !v5 ) *((_DWORD *)a2 + 1) = v6; if ( (v7 & 1) != 0 ) { v8 = *((_DWORD *)a2 + 1); v9 = (*(_DWORD *)a2 & 0xFFFFFFFE) - 1; if ( (unsigned int)v8 <= 0xA ) { if ( (*(_DWORD *)a2 & 0xFFFFFFFE) == 0xB ) goto LABEL_22; goto LABEL_13; } } else { v8 = v7 >> 1; if ( v8 <= 10 ) goto LABEL_22; v9 = 10; } v10 = (v8 + 16) & 0xFFFFFFF0; if ( v10 - 1 == v9 ) goto LABEL_22; if ( v10 != 11 ) { v11 = (void *)operator new(v10); v13 = *a2 & 1; if ( (*a2 & 1) != 0 ) v12 = *((void **)a2 + 2); else v12 = a2 + 1; goto LABEL_17; } LABEL_13: v11 = a2 + 1; v12 = *((void **)a2 + 2); v13 = 1; LABEL_17: v14 = *a2; if ( (v14 & 1) != 0 ) v15 = *((_DWORD *)a2 + 1); else v15 = v14 >> 1; std::char_traits::copy(v11, v12, v15 + 1); if ( v13 ) operator delete(v12); LABEL_22: v16 = v64; v17 = v65; v18 = v66; v64 = 0; v65 = 0; v66 = 0; *(_DWORD *)a2 = v16; *((_DWORD *)a2 + 1) = v17; *((_DWORD *)a2 + 2) = v18; std::string::~string((int)&v64); std::string::~string((int)v63); v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i_comment", a3); CString = (GameLevelManager *)cocos2d::CCString::getCString(v19); v21 = GameLevelManager::sharedState(CString); std::string::basic_string(&v64, (int)a2); GameLevelManager::removeDelimiterChars(v21, (unsigned __int8 *)&v64, 1); std::string::~string((int)&v64); GameToolbox::gen_random((GameToolbox *)&v49, 10); GJMultiplayerManager::getBasePostString((GJMultiplayerManager *)v52, (int)a1, v22, v23); if ( (*a2 & 1) != 0 ) v24 = *((const char **)a2 + 2); else v24 = (const char *)(a2 + 1); if ( (v49 & 1) != 0 ) v25 = v51; else v25 = v50; v26 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%c%s%s%c%c%s", (const char *)&dword_54 + 3, "mfv", "3899", 103, 99, &a1i2r3e45s789g[11]); v27 = cocos2d::CCString::getCString(v26); v28 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"&comment=%s&gameID=%i&extra=%s&secret=%s", v24, a3, v25, v27); v29 = (char *)cocos2d::CCString::getCString(v28); v30 = (GJAccountManager *)std::string::append(v52, v29); v31 = GJAccountManager::sharedState(v30); if ( (*a2 & 1) != 0 ) v32 = *((unsigned __int8 **)a2 + 2); else v32 = a2 + 1; if ( (v49 & 1) != 0 ) v33 = v51; else v33 = v50; v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i%s%i%s", (const char *)(*(_DWORD *)(v31 + 280) - *(_DWORD *)(v31 + 284)), v32, a3, v33); v35 = (const char *)cocos2d::CCString::getCString(v34); v53[0] = 0; v53[1] = 0; v54 = nullptr; v36 = strlen(v35); std::string::__init(v53, v35, v36); if ( (v53[0] & 1) != 0 ) v37 = v54; else v37 = (char *)v53 + 1; v38 = (const void *)strlen(v37); rtsha1::calc((rtsha1 *)v37, v38, (int)v67, v39); rtsha1::toHexString((rtsha1 *)v67, v68, v40); memset(v59, 0, sizeof(v59)); v41 = strlen((const char *)v68); std::string::__init(v59, v68, v41); memset(v60, 0, sizeof(v60)); std::string::__init(v60, "52832", 5u); cocos2d::ZipUtils::base64EncodeEnc(&v55, v59, v60); std::string::~string((int)v60); std::string::~string((int)v59); std::string::append(v52, "&chk="); if ( (v55 & 1) != 0 ) { v42 = v58; v43 = v57; } else { v43 = (int)v55 >> 1; v42 = &v56; } std::string::append(v52, v42, v43); memset(v61, 0, sizeof(v61)); std::string::__init(v61, "https://www.geometrydash.com/database/uploadMPComment.php", 0x39u); std::string::basic_string(v62, (int)v52); memset(v63, 0, sizeof(v63)); v44 = strlen((const char *)CString); std::string::__init(v63, CString, v44); GJMultiplayerManager::ProcessHttpRequest(a1, v61, (int)v62, (int)v63, 13); std::string::~string((int)v63); std::string::~string((int)v62); v45 = (GJMultiplayerManager *)std::string::~string((int)v61); v46 = (GJAccountManager *)GJMultiplayerManager::sharedState(v45); std::string::basic_string(&v64, (int)a2); GJMultiplayerManager::createAndAddComment(v46, (int)&v64, (int)a3); std::string::~string((int)&v64); std::string::~string((int)&v55); std::string::~string((int)v53); std::string::~string((int)v52); std::string::~string((int)&v49); return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source