// // GameLevelManager::uploadComment from 0x10056c2c0 to 0x10056d02a (3434 bytes) // // 5 xrefs: // > GameLevelManager::uploadLevelComment @ 0x10056c281 // > GameLevelManager::uploadAccountComment @ 0x10056d2d7 // > sub_10056D310 @ 0x10056d35e // > sub_10056D3A0 @ 0x10056d3f4 // > ShareCommentLayer::onShare @ 0x1006b2f88 // // 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:32:13 +0000 // __int64 __fastcall GameLevelManager::uploadComment(__int64 a1, __int64 a2, unsigned int a3, int a4, int a5) { unsigned int v5; // r14d bool v6; // zf __int64 v7; // rax __int64 size; // r12 size_t v9; // rax std::string::size_type v10; // r14 char *data; // r15 size_t v12; // r13 __int64 v13; // r14 __int64 v14; // r13 size_t v15; // rax std::string::size_type v16; // r14 char *v17; // r15 size_t v18; // r12 std::string *v19; // rdi __int64 v20; // rax __int64 v21; // rax __int64 v22; // rax __int64 v23; // rax int v24; // r15d __int64 v25; // rax __int64 v26; // rax const std::string::value_type *CString; // rax __int64 v28; // rax const std::string::value_type *v29; // rax __int64 v30; // rax const std::string::value_type *v31; // rax __int64 v32; // rax const std::string::value_type *v33; // rax __int64 v34; // rax const std::string::value_type *v35; // rax __int64 v36; // rax const char *v37; // rbx size_t v38; // rax std::string::size_type v39; // r14 char *v40; // r15 size_t v41; // r12 __int64 v42; // rax const std::string::value_type *v43; // rax int v44; // r15d const char *v45; // rbx unsigned int v46; // eax size_t v47; // rax std::string::size_type v48; // rbx char *v49; // r14 size_t v50; // r15 const std::string::value_type *v51; // rsi std::string::size_type v52; // rdx const char *v53; // rbx size_t v54; // rax size_t v55; // r14 char *v56; // r15 size_t v57; // r12 size_t v58; // rax size_t v59; // rbx char *v60; // r14 size_t v61; // r15 void **p_data; // rax const char *v64; // rbx size_t v65; // rax size_t v66; // r14 char *v67; // r15 size_t v68; // r12 size_t v69; // rax size_t v70; // rbx char *v71; // r14 size_t v72; // r15 char v73; // [rsp+0h] [rbp-250h] char v74; // [rsp+0h] [rbp-250h] char v75; // [rsp+0h] [rbp-250h] void *v76; // [rsp+8h] [rbp-248h] __int128 v77; // [rsp+10h] [rbp-240h] BYREF void *v78; // [rsp+20h] [rbp-230h] __int128 v79; // [rsp+28h] [rbp-228h] BYREF void *v80; // [rsp+38h] [rbp-218h] std::string v81; // [rsp+40h] [rbp-210h] BYREF std::string v82; // [rsp+58h] [rbp-1F8h] BYREF std::string v83; // [rsp+70h] [rbp-1E0h] BYREF std::string v84; // [rsp+90h] [rbp-1C0h] BYREF std::string v85; // [rsp+B0h] [rbp-1A0h] BYREF std::string v86; // [rsp+C8h] [rbp-188h] BYREF std::string v87; // [rsp+E0h] [rbp-170h] BYREF _QWORD v88[2]; // [rsp+F8h] [rbp-158h] BYREF void *v89; // [rsp+108h] [rbp-148h] __int128 v90; // [rsp+110h] [rbp-140h] BYREF void *v91; // [rsp+120h] [rbp-130h] _QWORD v92[2]; // [rsp+128h] [rbp-128h] BYREF void *v93; // [rsp+138h] [rbp-118h] __int128 v94; // [rsp+140h] [rbp-110h] BYREF void *v95; // [rsp+150h] [rbp-100h] std::string v96; // [rsp+158h] [rbp-F8h] BYREF __int128 v97; // [rsp+170h] [rbp-E0h] BYREF void *v98; // [rsp+180h] [rbp-D0h] std::string *v99; // [rsp+190h] [rbp-C0h] __int64 v100; // [rsp+198h] [rbp-B8h] std::string v101; // [rsp+1A0h] [rbp-B0h] BYREF int v102; // [rsp+1BCh] [rbp-94h] char *__s; // [rsp+1C0h] [rbp-90h] int v104; // [rsp+1CCh] [rbp-84h] std::string __dst[2]; // [rsp+1D0h] [rbp-80h] BYREF _BYTE v106[32]; // [rsp+200h] [rbp-50h] BYREF v104 = a5; v102 = a4; v5 = a3; v99 = (std::string *)a1; v6 = (*(_BYTE *)a2 & 1) == 0; v100 = a3; if ( v6 ) { v83 = *(std::string *)a2; } else { sub_10001AD30(&v83, *(const void **)(a2 + 16), *(_QWORD *)(a2 + 8)); v5 = v100; } LevelTools::base64EncodeString(__dst, &v83); if ( (*(_BYTE *)a2 & 1) != 0 ) operator delete(*(void **)(a2 + 16)); *(std::string *)a2 = __dst[0]; *(_WORD *)&__dst[0].__r_.__value_.__l.0 = 0; if ( (*(_BYTE *)&v83.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v83.__r_.__value_.__l.__data_); if ( v5 && v5 != 6 && v5 - 7 > 1 ) { __s = "acc_comment"; } else { v7 = sub_10088E820("c_%i", v73); __s = (char *)cocos2d::CCString::getCString(v7); } size = v99[45].__r_.__value_.__l.__size_; v9 = strlen(__s); if ( v9 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v10 = v9; if ( v9 >= 0x17 ) { v12 = 26; if ( (v9 | 7) != 0x17 ) v12 = (v9 | 7) + 1; data = (char *)operator new(v12); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst[0].__r_.__value_.__r.__words[0] = v12 | 1; __dst[0].__r_.__value_.__l.__size_ = v10; goto LABEL_19; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v9); data = __dst[0].__r_.__value_.__s.__data_; if ( v9 ) LABEL_19: memmove(data, __s, v10); data[v10] = 0; v13 = cocos2d::CCDictionary::objectForKey(size, (char *)__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); if ( v13 ) return __stack_chk_guard; v14 = v99[45].__r_.__value_.__l.__size_; v76 = cocos2d::CCNode::create(); v15 = strlen(__s); if ( v15 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v16 = v15; if ( v15 >= 0x17 ) { v18 = 26; if ( (v15 | 7) != 0x17 ) v18 = (v15 | 7) + 1; v17 = (char *)operator new(v18); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v17; __dst[0].__r_.__value_.__r.__words[0] = v18 | 1; __dst[0].__r_.__value_.__l.__size_ = v16; goto LABEL_30; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v15); v17 = __dst[0].__r_.__value_.__s.__data_; if ( v15 ) LABEL_30: memmove(v17, __s, v16); v17[v16] = 0; cocos2d::CCDictionary::setObject(v14, (__int64)v76, (char *)__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); v19 = v99; GameLevelManager::makeTimeStamp((__int64)v99, __s); v20 = GameManager::sharedState(); if ( (*(_BYTE *)(v20 + 632) & 1) != 0 ) { v19 = (std::string *)&v97; sub_10001AD30(&v97, *(const void **)(v20 + 648), *(_QWORD *)(v20 + 640)); } else { v21 = v20 + 632; v98 = *(void **)(v21 + 16); v97 = *(_OWORD *)v21; } v22 = GameManager::sharedState(); if ( (*(_BYTE *)(v22 + 608) & 1) != 0 ) { v19 = (std::string *)&v77; sub_10001AD30(&v77, *(const void **)(v22 + 624), *(_QWORD *)(v22 + 616)); } else { v23 = v22 + 608; v78 = *(void **)(v23 + 16); v77 = *(_OWORD *)v23; } if ( (v97 & 1) != 0 ) { v19 = &v84; sub_10001AD30(&v84, v98, *((unsigned __int64 *)&v97 + 1)); } else { v84.__r_.__value_.__r.__words[2] = (std::string::size_type)v98; *(_OWORD *)&v84.__r_.__value_.__l.0 = v97; } v24 = v100; GameLevelManager::removeDelimiterChars((__int64)v19, &v84, 0); if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) != 0 ) { v19 = (std::string *)v84.__r_.__value_.__l.__data_; operator delete(v84.__r_.__value_.__l.__data_); } if ( (*(_BYTE *)a2 & 1) != 0 ) { v19 = &v85; sub_10001AD30(&v85, *(const void **)(a2 + 16), *(_QWORD *)(a2 + 8)); } else { v85 = *(std::string *)a2; } GameLevelManager::removeDelimiterChars((__int64)v19, &v85, 1); if ( (*(_BYTE *)&v85.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v85.__r_.__value_.__l.__data_); GameLevelManager::getBasePostString(&v101); v25 = sub_10088E820("%c%s%s%c%c%s", (char)"7"); cocos2d::CCString::getCString(v25); v26 = sub_10088E820("&userName=%s&comment=%s&secret=%s", v74); CString = (const std::string::value_type *)cocos2d::CCString::getCString(v26); std::string::append(&v101, CString); if ( v24 == 6 ) goto LABEL_55; if ( v24 ) { if ( (unsigned int)(v24 - 7) > 1 ) { LABEL_57: std::string::append(&v101, "&cType="); goto LABEL_58; } LABEL_55: std::string::append(&v101, "&levelID="); v30 = sub_10088E820("%i", v75); v31 = (const std::string::value_type *)cocos2d::CCString::getCString(v30); std::string::append(&v101, v31); if ( v24 == 7 && v104 > 0 ) { std::string::append(&v101, "&percent="); v32 = sub_10088E820("%i", v75); v33 = (const std::string::value_type *)cocos2d::CCString::getCString(v32); std::string::append(&v101, v33); } goto LABEL_57; } std::string::append(&v101, "&levelID="); v28 = sub_10088E820("%i", v75); v29 = (const std::string::value_type *)cocos2d::CCString::getCString(v28); std::string::append(&v101, v29); if ( v104 <= 0 ) goto LABEL_59; std::string::append(&v101, "&percent="); LABEL_58: v34 = sub_10088E820("%i", v75); v35 = (const std::string::value_type *)cocos2d::CCString::getCString(v34); std::string::append(&v101, v35); LABEL_59: v36 = sub_10088E820("%s%s%i%i%i", v75); v37 = (const char *)cocos2d::CCString::getCString(v36); v38 = strlen(v37); if ( v38 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v39 = v38; if ( v38 >= 0x17 ) { v41 = 26; if ( (v38 | 7) != 0x17 ) v41 = (v38 | 7) + 1; v40 = (char *)operator new(v41); v96.__r_.__value_.__r.__words[2] = (std::string::size_type)v40; v96.__r_.__value_.__r.__words[0] = v41 | 1; v96.__r_.__value_.__l.__size_ = v39; goto LABEL_66; } v96.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v38); v40 = v96.__r_.__value_.__s.__data_; if ( v38 ) LABEL_66: memmove(v40, v37, v39); v40[v39] = 0; v42 = sub_10088E820("%c%s%s%c%c%s", (char)"0J"); v43 = (const std::string::value_type *)cocos2d::CCString::getCString(v42); std::string::append(&v96, v43); v44 = v100; if ( (*(_BYTE *)&v96.__r_.__value_.__s.0 & 1) != 0 ) v45 = v96.__r_.__value_.__l.__data_; else v45 = v96.__r_.__value_.__s.__data_; v46 = strlen(v45); sub_100872DB0(v45, v46, v106); sub_100873590(v106, __dst); v47 = strlen((const char *)__dst); if ( v47 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v48 = v47; if ( v47 >= 0x17 ) { v50 = 26; if ( (v47 | 7) != 0x17 ) v50 = (v47 | 7) + 1; v49 = (char *)operator new(v50); v87.__r_.__value_.__r.__words[2] = (std::string::size_type)v49; v87.__r_.__value_.__r.__words[0] = v50 | 1; v87.__r_.__value_.__l.__size_ = v48; v44 = v100; goto LABEL_77; } v87.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v47); v49 = v87.__r_.__value_.__s.__data_; if ( v47 ) LABEL_77: memcpy(v49, __dst, v48); v49[v48] = 0; strcpy((char *)&v79, "\n29481"); cocos2d::ZipUtils::base64EncodeEnc(&v86, &v87, &v79); if ( (v79 & 1) != 0 ) operator delete(v80); if ( (*(_BYTE *)&v87.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v87.__r_.__value_.__l.__data_); std::string::append(&v101, "&chk="); if ( (*(_BYTE *)&v86.__r_.__value_.__s.0 & 1) != 0 ) { v51 = v86.__r_.__value_.__l.__data_; v52 = v86.__r_.__value_.__l.__size_; } else { v52 = *(_BYTE *)&v86.__r_.__value_.__l.0 >> 1; v51 = v86.__r_.__value_.__s.__data_; } std::string::append(&v101, v51, v52); if ( v44 && v44 != 6 && (unsigned int)(v44 - 7) > 1 ) { v82.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u); v82.__r_.__value_.__r.__words[0] = 65; v82.__r_.__value_.__l.__size_ = 59; strcpy(v82.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/uploadGJAccComment20.php"); if ( (*(_BYTE *)&v101.__r_.__value_.__s.0 & 1) != 0 ) v64 = v101.__r_.__value_.__l.__data_; else v64 = v101.__r_.__value_.__s.__data_; v65 = strlen(v64); if ( v65 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v66 = v65; if ( v65 >= 0x17 ) { v68 = 26; if ( (v65 | 7) != 0x17 ) v68 = (v65 | 7) + 1; v67 = (char *)operator new(v68); v93 = v67; v92[0] = v68 | 1; v92[1] = v66; } else { LOBYTE(v92[0]) = 2 * v65; v67 = (char *)v92 + 1; if ( !v65 ) { LABEL_138: v67[v66] = 0; v69 = strlen(__s); if ( v69 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v70 = v69; if ( v69 >= 0x17 ) { v72 = 26; if ( (v69 | 7) != 0x17 ) v72 = (v69 | 7) + 1; v71 = (char *)operator new(v72); v95 = v71; *(_QWORD *)&v94 = v72 | 1; *((_QWORD *)&v94 + 1) = v70; } else { LOBYTE(v94) = 2 * v69; v71 = (char *)&v94 + 1; if ( !v69 ) { LABEL_146: v71[v70] = 0; GameLevelManager::ProcessHttpRequest((__int64)v99, &v82, (__int64)v92, &v94, 0xDu); if ( (v94 & 1) != 0 ) { operator delete(v95); if ( (v92[0] & 1) == 0 ) { LABEL_148: if ( (*(_BYTE *)&v82.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_115; LABEL_152: p_data = (void **)&v82.__r_.__value_.__l.__data_; goto LABEL_114; } } else if ( (v92[0] & 1) == 0 ) { goto LABEL_148; } operator delete(v93); if ( (*(_BYTE *)&v82.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_115; goto LABEL_152; } } memmove(v71, __s, v70); goto LABEL_146; } } memmove(v67, v64, v66); goto LABEL_138; } v81.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u); v81.__r_.__value_.__r.__words[0] = 65; v81.__r_.__value_.__l.__size_ = 56; strcpy(v81.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/uploadGJComment21.php"); if ( (*(_BYTE *)&v101.__r_.__value_.__s.0 & 1) != 0 ) v53 = v101.__r_.__value_.__l.__data_; else v53 = v101.__r_.__value_.__s.__data_; v54 = strlen(v53); if ( v54 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v55 = v54; if ( v54 >= 0x17 ) { v57 = 26; if ( (v54 | 7) != 0x17 ) v57 = (v54 | 7) + 1; v56 = (char *)operator new(v57); v89 = v56; v88[0] = v57 | 1; v88[1] = v55; goto LABEL_98; } LOBYTE(v88[0]) = 2 * v54; v56 = (char *)v88 + 1; if ( v54 ) LABEL_98: memmove(v56, v53, v55); v56[v55] = 0; v58 = strlen(__s); if ( v58 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v59 = v58; if ( v58 >= 0x17 ) { v61 = 26; if ( (v58 | 7) != 0x17 ) v61 = (v58 | 7) + 1; v60 = (char *)operator new(v61); v91 = v60; *(_QWORD *)&v90 = v61 | 1; *((_QWORD *)&v90 + 1) = v59; goto LABEL_106; } LOBYTE(v90) = 2 * v58; v60 = (char *)&v90 + 1; if ( v58 ) LABEL_106: memmove(v60, __s, v59); v60[v59] = 0; GameLevelManager::ProcessHttpRequest((__int64)v99, &v81, (__int64)v88, &v90, 0xDu); if ( (v90 & 1) == 0 ) { if ( (v88[0] & 1) == 0 ) goto LABEL_109; LABEL_112: operator delete(v89); if ( (*(_BYTE *)&v81.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_115; goto LABEL_113; } operator delete(v91); if ( (v88[0] & 1) != 0 ) goto LABEL_112; LABEL_109: if ( (*(_BYTE *)&v81.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_113: p_data = (void **)&v81.__r_.__value_.__l.__data_; LABEL_114: operator delete(*p_data); } LABEL_115: if ( (*(_BYTE *)&v86.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(v86.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v96.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_117: if ( (*(_BYTE *)&v101.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_118; goto LABEL_124; } } else if ( (*(_BYTE *)&v96.__r_.__value_.__s.0 & 1) == 0 ) { goto LABEL_117; } operator delete(v96.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v101.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_118: if ( (v77 & 1) == 0 ) goto LABEL_119; LABEL_125: operator delete(v78); if ( (v97 & 1) == 0 ) return __stack_chk_guard; goto LABEL_120; } LABEL_124: operator delete(v101.__r_.__value_.__l.__data_); if ( (v77 & 1) != 0 ) goto LABEL_125; LABEL_119: if ( (v97 & 1) != 0 ) LABEL_120: operator delete(v98); return __stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source