// // GameLevelManager::uploadLevelList from 0x100541200 to 0x100541c85 (2693 bytes) // // 1 xrefs: // > UploadListPopup::init @ 0x100363c9c // // 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 // void __fastcall GameLevelManager::uploadLevelList(GameLevelManager *a1, GJLevelList *a2) { __m128 v2; // xmm0 std::__tree_end_node *>::pointer left; // r14 size_t v4; // r12 char *v5; // rbx unsigned int v6; // r15d size_t v7; // r15 const void *v8; // rsi size_t v9; // r13 int v10; // eax bool v11; // cl int v12; // eax bool v13; // cl std::string *p_m_queuedLists; // rdi cocos2d::CCString *v15; // rax const char *CString; // rax const char *data; // rdi int v18; // eax int v19; // r15d __int64 v20; // r13 std::string::pointer v21; // rax GJAccountManager *v22; // rax const std::string::value_type *v23; // rsi std::string::size_type size; // rdx const char *v25; // r14 unsigned int v26; // eax size_t v27; // rax std::string::size_type v28; // r14 char *v29; // r15 size_t v30; // r12 cocos2d::CCString *v31; // rax const char *v32; // rax cocos2d::CCString *v33; // rax const char *v34; // rax const char *v35; // r14 size_t v36; // rax size_t v37; // r15 char *v38; // r12 cocos2d::CCObject *v39; // rdi size_t v40; // r13 char v41; // [rsp+0h] [rbp-270h] char *v42; // [rsp+28h] [rbp-248h] std::string v44; // [rsp+38h] [rbp-238h] BYREF std::string v45; // [rsp+50h] [rbp-220h] BYREF std::string v46; // [rsp+70h] [rbp-200h] BYREF std::string v47; // [rsp+90h] [rbp-1E0h] BYREF __int128 v48; // [rsp+B0h] [rbp-1C0h] BYREF void *v49; // [rsp+C0h] [rbp-1B0h] __int128 v50; // [rsp+D0h] [rbp-1A0h] BYREF void *v51; // [rsp+E0h] [rbp-190h] std::string __dst; // [rsp+E8h] [rbp-188h] BYREF _QWORD v53[2]; // [rsp+100h] [rbp-170h] BYREF void *v54; // [rsp+110h] [rbp-160h] std::string v55; // [rsp+118h] [rbp-158h] BYREF std::string v56; // [rsp+130h] [rbp-140h] BYREF GameLevelManager *v57; // [rsp+148h] [rbp-128h] __int128 v58; // [rsp+150h] [rbp-120h] BYREF void *v59; // [rsp+160h] [rbp-110h] __int128 v60; // [rsp+168h] [rbp-108h] BYREF void *__s1; // [rsp+178h] [rbp-F8h] __m128 v62; // [rsp+180h] [rbp-F0h] BYREF void *longStorage; // [rsp+190h] [rbp-E0h] __m128 v64; // [rsp+1A0h] [rbp-D0h] BYREF void *v65; // [rsp+1B0h] [rbp-C0h] std::string v66; // [rsp+1B8h] [rbp-B8h] BYREF std::string __str; // [rsp+1D0h] [rbp-A0h] BYREF char v68; // [rsp+1EFh] [rbp-81h] char __src[48]; // [rsp+1F0h] [rbp-80h] BYREF _BYTE v70[32]; // [rsp+220h] [rbp-50h] BYREF GameToolbox::intToString((size_t *)&v60, a2->m_M_ID, *(double *)v2.i64); v57 = a1; left = a1->m_queuedLists.__tree_.__pair1_.__value_.__left_; if ( !left ) { LABEL_19: p_m_queuedLists = (std::string *)&v57->m_queuedLists; sub_100564020(&v57->m_queuedLists, &v60); if ( (a2->m_listName.m_data.m_short.sizex2 & 1) != 0 ) { p_m_queuedLists = (std::string *)&v62; sub_100006B70( &v62, a2->m_listName.m_data.m_long.longStorage, a2->m_listName.m_data.m_long.size, *(double *)v2.i64); } else { longStorage = a2->m_listName.m_data.m_long.longStorage; v2 = *(__m128 *)&a2->m_listName.m_data.m_short.sizex2; v62 = v2; } if ( (a2->m_listDesc.m_data.m_short.sizex2 & 1) != 0 ) { p_m_queuedLists = (std::string *)&v64; sub_100006B70( &v64, a2->m_listDesc.m_data.m_long.longStorage, a2->m_listDesc.m_data.m_long.size, *(double *)v2.i64); } else { v65 = a2->m_listDesc.m_data.m_long.longStorage; v2 = *(__m128 *)&a2->m_listDesc.m_data.m_short.sizex2; v64 = v2; } if ( (a2->m_levelsString.m_data.m_short.sizex2 & 1) != 0 ) { p_m_queuedLists = &__str; sub_100006B70( &__str, a2->m_levelsString.m_data.m_long.longStorage, a2->m_levelsString.m_data.m_long.size, *(double *)v2.i64); } else { __str.__r_.__value_.__r.__words[2] = (std::string::size_type)a2->m_levelsString.m_data.m_long.longStorage; v2 = *(__m128 *)&a2->m_levelsString.m_data.m_short.sizex2; *(__m128 *)&__str.__r_.__value_.__l.0 = v2; } if ( (v62.i8[0] & 1) != 0 ) { p_m_queuedLists = &v45; sub_100006B70(&v45, longStorage, v62.u64[1], *(double *)v2.i64); } else { v45.__r_.__value_.__r.__words[2] = (std::string::size_type)longStorage; v2 = v62; *(__m128 *)&v45.__r_.__value_.__l.0 = v62; } GameLevelManager::removeDelimiterChars((__int64)p_m_queuedLists, &v45, 0); if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) != 0 ) { p_m_queuedLists = (std::string *)v45.__r_.__value_.__l.__data_; operator delete(v45.__r_.__value_.__l.__data_); } if ( (v64.i8[0] & 1) != 0 ) { p_m_queuedLists = &v46; sub_100006B70(&v46, v65, v64.u64[1], *(double *)v2.i64); } else { v46.__r_.__value_.__r.__words[2] = (std::string::size_type)v65; v2 = v64; *(__m128 *)&v46.__r_.__value_.__l.0 = v64; } GameLevelManager::removeDelimiterChars((__int64)p_m_queuedLists, &v46, 0); if ( (*(_BYTE *)&v46.__r_.__value_.__s.0 & 1) != 0 ) { p_m_queuedLists = (std::string *)v46.__r_.__value_.__l.__data_; operator delete(v46.__r_.__value_.__l.__data_); } if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) { p_m_queuedLists = &v47; sub_100006B70(&v47, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_, *(double *)v2.i64); } else { v47 = __str; v2 = *(__m128 *)&__str.__r_.__value_.__l.0; } GameLevelManager::removeDelimiterChars((__int64)p_m_queuedLists, &v47, 0); if ( (*(_BYTE *)&v47.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v47.__r_.__value_.__l.__data_); GameLevelManager::getBasePostString(&v56, v2); v15 = (cocos2d::CCString *)sub_1007AB580( "&listID=%i&listName=%s&listDesc=%s&listLevels=%s&difficulty=%i&listVersion=%i&original=%i&unlisted=%i", a2->m_listVersion); CString = cocos2d::CCString::getCString(v15); std::string::append(&v56, CString); sub_10051A8B0(&v58, 5, *(double *)v2.i64); *(_WORD *)&v55.__r_.__value_.__l.0 = 0; data = __str.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) data = __str.__r_.__value_.__l.__data_; v18 = strlen(data); if ( v18 > 49 ) { v2.i32[1] = 0; v2.f32[0] = (float)v18 / 50.0; v19 = 50; v20 = 0; do { v21 = __str.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) v21 = __str.__r_.__value_.__l.__data_; std::string::push_back(&v55, v21[v20]); v20 += (int)v2.f32[0]; --v19; } while ( v19 ); } else { std::string::operator=(&v55, &__str); } v22 = GJAccountManager::sharedState(); GameToolbox::intToString((size_t *)&v66, v22->m_accountID - v22->m_unkInt1, *(double *)v2.i64); if ( (*(_BYTE *)&v66.__r_.__value_.__s.0 & 1) != 0 ) { v23 = v66.__r_.__value_.__l.__data_; size = v66.__r_.__value_.__l.__size_; } else { size = *(_BYTE *)&v66.__r_.__value_.__l.0 >> 1; v23 = v66.__r_.__value_.__s.__data_; } std::string::append(&v55, v23, size); if ( (*(_BYTE *)&v66.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v66.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) != 0 ) v25 = v55.__r_.__value_.__l.__data_; else v25 = v55.__r_.__value_.__s.__data_; v26 = strlen(v25); sub_100792420(v25, v26, v70); sub_100792C00(v70, __src); v27 = strlen(__src); if ( v27 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)v2.i64); v28 = v27; if ( v27 >= 0x17 ) { v30 = 26; if ( (v27 | 7) != 0x17 ) v30 = (v27 | 7) + 1; v29 = (char *)operator new(v30); __dst.__r_.__value_.__r.__words[2] = (std::string::size_type)v29; __dst.__r_.__value_.__r.__words[0] = v30 | 1; __dst.__r_.__value_.__l.__size_ = v28; } else { __dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v27); v29 = __dst.__r_.__value_.__s.__data_; if ( !v27 ) { __dst.__r_.__value_.__s.__data_[0] = 0; if ( (v58 & 1) == 0 ) { LABEL_63: v49 = v59; v2.i64[0] = v58; v48 = v58; goto LABEL_69; } LABEL_68: sub_100006B70(&v48, v59, *((unsigned __int64 *)&v58 + 1), *(double *)v2.i64); LABEL_69: cocos2d::ZipUtils::base64EncodeEnc(&v66, &__dst, &v48, *(double *)v2.i64); if ( (v48 & 1) != 0 ) { operator delete(v49); if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_74: v31 = (cocos2d::CCString *)sub_1007AB580("&seed=%s&seed2=%s", v41); v32 = cocos2d::CCString::getCString(v31); std::string::append(&v56, v32); std::string::append(&v56, "&secret="); v33 = (cocos2d::CCString *)sub_1007AB580("%c%s%s%c%c%s", (char)"7"); v34 = cocos2d::CCString::getCString(v33); std::string::append(&v56, v34); v44.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u); v44.__r_.__value_.__r.__words[0] = 65; v44.__r_.__value_.__l.__size_ = 56; strcpy(v44.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/uploadGJLevelList.php"); if ( (*(_BYTE *)&v56.__r_.__value_.__s.0 & 1) != 0 ) v35 = v56.__r_.__value_.__l.__data_; else v35 = v56.__r_.__value_.__s.__data_; v36 = strlen(v35); if ( v36 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(2.057594829120962e-81); v37 = v36; if ( v36 >= 0x17 ) { v40 = 26; if ( (v36 | 7) != 0x17 ) v40 = (v36 | 7) + 1; v38 = (char *)operator new(v40); v54 = v38; v53[0] = v40 | 1; v53[1] = v37; } else { LOBYTE(v53[0]) = 2 * v36; v38 = (char *)v53 + 1; if ( !v36 ) { BYTE1(v53[0]) = 0; if ( (v60 & 1) == 0 ) { LABEL_81: v51 = __s1; v50 = v60; v39 = v57; goto LABEL_87; } LABEL_86: sub_100006B70(&v50, __s1, *((unsigned __int64 *)&v60 + 1), 2.057594829120962e-81); v39 = v57; LABEL_87: GameLevelManager::ProcessHttpRequest(v39, &v44, (__int64)v53, (__int64)&v50, 61); if ( (v50 & 1) != 0 ) { operator delete(v51); if ( (v53[0] & 1) == 0 ) { LABEL_89: if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_90; goto LABEL_103; } } else if ( (v53[0] & 1) == 0 ) { goto LABEL_89; } operator delete(v54); if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_90: if ( (*(_BYTE *)&v66.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_91; goto LABEL_104; } LABEL_103: operator delete(v44.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v66.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_91: if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_92; goto LABEL_105; } LABEL_104: operator delete(v66.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_92: if ( (v58 & 1) == 0 ) goto LABEL_93; goto LABEL_106; } LABEL_105: operator delete(v55.__r_.__value_.__l.__data_); if ( (v58 & 1) == 0 ) { LABEL_93: if ( (*(_BYTE *)&v56.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_94; goto LABEL_107; } LABEL_106: operator delete(v59); if ( (*(_BYTE *)&v56.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_94: if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_95; goto LABEL_108; } LABEL_107: operator delete(v56.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_95: if ( (v64.i8[0] & 1) == 0 ) goto LABEL_96; goto LABEL_109; } LABEL_108: operator delete(__str.__r_.__value_.__l.__data_); if ( (v64.i8[0] & 1) == 0 ) { LABEL_96: if ( (v62.i8[0] & 1) == 0 ) goto LABEL_98; goto LABEL_97; } LABEL_109: operator delete(v65); if ( (v62.i8[0] & 1) == 0 ) { LABEL_98: if ( (v60 & 1) == 0 ) return; goto LABEL_99; } LABEL_97: operator delete(longStorage); goto LABEL_98; } } memmove(v38, v35, v37); v38[v37] = 0; if ( (v60 & 1) == 0 ) goto LABEL_81; goto LABEL_86; } } else if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 ) { goto LABEL_74; } operator delete(__dst.__r_.__value_.__l.__data_); goto LABEL_74; } } memcpy(v29, __src, v28); v29[v28] = 0; if ( (v58 & 1) == 0 ) goto LABEL_63; goto LABEL_68; } v68 = v60 & 1; if ( (v60 & 1) != 0 ) { v4 = *((_QWORD *)&v60 + 1); v5 = (char *)__s1; } else { v4 = (unsigned __int8)v60 >> 1; v5 = (char *)&v60 + 1; } v42 = v5; while ( 1 ) { v6 = *((unsigned __int8 *)left + 32); if ( (v6 & 1) != 0 ) { v7 = *((_QWORD *)left + 5); v8 = *((const void **)left + 6); } else { v7 = v6 >> 1; v8 = (char *)left + 33; } v9 = v4; if ( v7 < v4 ) v9 = v7; v10 = memcmp(v5, v8, v9); v11 = v4 < v7; if ( v10 ) v11 = v10 < 0; if ( v11 ) goto LABEL_6; v12 = memcmp(v8, v5, v9); v13 = v7 < v4; if ( v12 ) v13 = v12 < 0; if ( !v13 ) break; left = (std::__tree_end_node *>::pointer)((char *)left + 8); LABEL_6: left = *(std::__tree_end_node *>::pointer *)left; v5 = v42; if ( !left ) goto LABEL_19; } if ( v68 ) LABEL_99: operator delete(__s1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source