// // GameLevelManager::storeThreadManifest from 0x4d3a04 to 0x4d411a (1814 bytes) // // 2 xrefs: // > GameLevelManager::onGetThreadMessagesCompleted @ 0x4d43d2 // > GameLevelManager::onRequestThreadMembersCompleted @ 0x4d495c // // 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:50:50 +0000 // int __fastcall GameLevelManager::storeThreadManifest(int a1, const char *a2, unsigned __int8 *a3) { cocos2d::CCArray *v4; // r0 cocos2d::CCArray *v5; // r10 _BYTE *v6; // r2 bool v7; // zf int v8; // r3 _BYTE *v9; // r2 int v10; // r3 int v11; // r0 int v12; // r1 _BYTE *v13; // r2 size_t v14; // r6 _BYTE *v15; // r2 int v16; // r3 int v17; // r0 int v18; // r1 _BYTE *v19; // r2 cocos2d::CCArray *v20; // r9 int v21; // r3 int v22; // r5 cocos2d::CCString *v23; // r0 unsigned int v24; // r5 cocos2d::CCArray *v25; // r10 cocos2d::CCString *v26; // r0 const char *CString; // r4 size_t v28; // r0 cocos2d::CCNode *v29; // r0 cocos2d::CCDictionary *v30; // r1 cocos2d::CCNode *v31; // r4 const char *v32; // r11 const char *v33; // r6 size_t v34; // r0 cocos2d::CCArray *v35; // r0 cocos2d::CCArray *v36; // r11 int v37; // r3 int v38; // r5 cocos2d::CCString *v39; // r0 unsigned int v40; // r8 cocos2d::CCString *v41; // r0 const char *v42; // r4 size_t v43; // r0 cocos2d::CCArray *v44; // r4 cocos2d::CCString *v45; // r0 char *v46; // r10 cocos2d::CCString *v47; // r0 cocos2d::CCString *v48; // r0 const char *v49; // r6 size_t v50; // r0 GJUserScore *v52; // r0 const char *v53; // r6 size_t v54; // r0 cocos2d::CCArray *v55; // r0 int *v56; // r2 int v57; // r3 int v58; // r5 cocos2d::CCString *v59; // r0 unsigned int v60; // r7 cocos2d::CCArray *v61; // r11 cocos2d::CCString *v62; // r0 const char *v63; // r4 size_t v64; // r0 cocos2d::CCArray *v65; // r5 GJUserScore *v66; // r0 cocos2d::CCNode *v67; // r4 cocos2d::CCString *v68; // r0 cocos2d::CCString *v69; // r0 cocos2d::CCString *v70; // r0 const char *v71; // r10 size_t v72; // r0 cocos2d::CCString *v73; // r0 cocos2d::CCString *v74; // r0 cocos2d::CCString *v75; // r0 cocos2d::CCString *v76; // r0 cocos2d::CCString *v77; // r0 cocos2d::CCString *v78; // r0 cocos2d::CCString *v79; // r0 cocos2d::CCString *v80; // r0 cocos2d::CCString *v81; // r0 cocos2d::CCString *v82; // r0 cocos2d::CCString *v83; // r0 cocos2d::CCString *v84; // r0 cocos2d::CCString *v85; // r0 cocos2d::CCString *v86; // r0 const char *v87; // r6 size_t v88; // r0 cocos2d::CCNode *v90; // r5 cocos2d::CCString *v91; // r0 cocos2d::CCString *v92; // r0 cocos2d::CCString *v93; // r0 cocos2d::CCString *v94; // r0 cocos2d::CCString *v95; // r0 cocos2d::CCString *v96; // r0 char *v99; // [sp+18h] [bp-FCh] cocos2d::CCArray *v100; // [sp+18h] [bp-FCh] cocos2d::CCArray *v101; // [sp+18h] [bp-FCh] const char *v102; // [sp+1Ch] [bp-F8h] int v103; // [sp+28h] [bp-ECh] BYREF int v104; // [sp+2Ch] [bp-E8h] _BYTE *v105; // [sp+30h] [bp-E4h] int v106; // [sp+34h] [bp-E0h] BYREF int v107; // [sp+38h] [bp-DCh] _BYTE *v108; // [sp+3Ch] [bp-D8h] int v109; // [sp+40h] [bp-D4h] BYREF int v110; // [sp+44h] [bp-D0h] _BYTE *v111; // [sp+48h] [bp-CCh] int v112; // [sp+4Ch] [bp-C8h] BYREF int v113; // [sp+50h] [bp-C4h] _BYTE *v114; // [sp+54h] [bp-C0h] int v115; // [sp+58h] [bp-BCh] BYREF int v116; // [sp+5Ch] [bp-B8h] _BYTE *v117; // [sp+60h] [bp-B4h] int v118; // [sp+64h] [bp-B0h] BYREF int v119; // [sp+68h] [bp-ACh] _BYTE *v120; // [sp+6Ch] [bp-A8h] int v121; // [sp+70h] [bp-A4h] BYREF int v122; // [sp+74h] [bp-A0h] _BYTE *v123; // [sp+78h] [bp-9Ch] int v124[3]; // [sp+7Ch] [bp-98h] BYREF int v125[3]; // [sp+88h] [bp-8Ch] BYREF int v126[3]; // [sp+94h] [bp-80h] BYREF int v127[3]; // [sp+A0h] [bp-74h] BYREF int v128[3]; // [sp+ACh] [bp-68h] BYREF int v129[3]; // [sp+B8h] [bp-5Ch] BYREF int v130[3]; // [sp+C4h] [bp-50h] BYREF int v131[3]; // [sp+D0h] [bp-44h] BYREF int v132[3]; // [sp+DCh] [bp-38h] BYREF int v133[3]; // [sp+E8h] [bp-2Ch] BYREF _DWORD v134[3]; // [sp+F4h] [bp-20h] BYREF int v135; // [sp+100h] [bp-14h] BYREF int v136; // [sp+104h] [bp-10h] int v137; // [sp+108h] [bp-Ch] std::string::basic_string(&v103, (int)a3); v106 = 0; v107 = 0; v108 = nullptr; v109 = 0; v110 = 0; v111 = nullptr; v4 = (cocos2d::CCArray *)std::string::find(a3, 35, 0); v5 = v4; if ( v4 != (cocos2d::CCArray *)-1 ) { std::string::basic_string(&v112, a3, 0, (size_t)v4); v8 = v103 & 1; v7 = v8 == 0; if ( (v103 & 1) != 0 ) { v6 = v105; v8 = 0; } else { BYTE1(v103) = v8; LOBYTE(v103) = v8; } if ( !v7 ) { *v6 = v8; v104 = v8; } std::string::reserve(&v103, 0); v103 = v112; v104 = v113; v105 = v114; v112 = 0; v113 = 0; v114 = nullptr; std::string::~string((int)&v112); std::string::basic_string(&v115, a3, (unsigned int)v5 + 1, 0xFFFFFFFF); v10 = v106 & 1; if ( (v106 & 1) != 0 ) { v9 = v108; v10 = 0; } else { BYTE1(v106) = v106 & 1; } if ( (v106 & 1) != 0 ) { *v9 = v10; v107 = v10; } else { LOBYTE(v106) = v10; } std::string::reserve(&v106, 0); v11 = v115; v12 = v116; v13 = v117; v115 = 0; v116 = 0; v117 = nullptr; v106 = v11; v107 = v12; v108 = v13; std::string::~string((int)&v115); v4 = (cocos2d::CCArray *)std::string::find((unsigned __int8 *)&v106, 35, 0); v14 = (size_t)v4; if ( v4 != (cocos2d::CCArray *)-1 ) { std::string::basic_string(&v118, (unsigned __int8 *)&v106, (unsigned int)v4 + 1, 0xFFFFFFFF); v16 = v109 & 1; if ( (v109 & 1) != 0 ) { v15 = v111; v16 = 0; } else { BYTE1(v109) = v109 & 1; } if ( (v109 & 1) != 0 ) { *v15 = v16; v110 = v16; } else { LOBYTE(v109) = v16; } std::string::reserve(&v109, 0); v109 = v118; v110 = v119; v111 = v120; v118 = 0; v119 = 0; v120 = nullptr; std::string::~string((int)&v118); std::string::basic_string(&v121, (unsigned __int8 *)&v106, 0, v14); if ( (v106 & 1) != 0 ) { *v108 = 0; v107 = 0; } else { LOWORD(v106) = 0; } std::string::reserve(&v106, 0); v17 = v121; v18 = v122; v19 = v123; v121 = 0; v122 = 0; v123 = nullptr; v106 = v17; v107 = v18; v108 = v19; v4 = (cocos2d::CCArray *)std::string::~string((int)&v121); } } v20 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4); if ( (v103 & 1) != 0 ) v21 = v104; else v21 = (int)(unsigned __int8)v103 >> 1; if ( v21 ) { v24 = 0; v25 = sub_4C1A88(&v103, "|"); while ( v24 < cocos2d::CCArray::count(v25) ) { v26 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v25, v24); CString = (const char *)cocos2d::CCString::getCString(v26); v135 = 0; v136 = 0; v137 = 0; v28 = strlen(CString); std::string::__init(&v135, CString, v28); std::string::basic_string(v124, (int)&v135); v29 = (cocos2d::CCNode *)GameLevelManager::responseToDict((cocos2d::CCDictionary *)v124, 0); v31 = GJUserScore::create(v29, v30); std::string::~string((int)v124); if ( v31 && *((int *)v31 + 74) > 0 ) { cocos2d::CCArray::addObject(v20, v31); v32 = *((const char **)v31 + 73); v99 = *((char **)v31 + 74); std::string::basic_string(v125, (int)v31 + 264); GameLevelManager::storeUserName((unsigned __int8 *)a1, v32, v99, (unsigned __int8 *)v125); std::string::~string((int)v125); } ++v24; std::string::~string((int)&v135); } } v22 = *(_DWORD *)(a1 + 752); v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a2); v33 = (const char *)cocos2d::CCString::getCString(v23); memset(v126, 0, sizeof(v126)); v34 = strlen(v33); std::string::__init(v126, v33, v34); cocos2d::CCDictionary::setObject(v22, v20); v35 = (cocos2d::CCArray *)std::string::~string((int)v126); v36 = (cocos2d::CCArray *)cocos2d::CCArray::create(v35); if ( (v106 & 1) != 0 ) v37 = v107; else v37 = (int)(unsigned __int8)v106 >> 1; if ( v37 ) { v40 = 0; v100 = sub_4C1A88(&v106, "|"); while ( v40 < cocos2d::CCArray::count(v100) ) { v41 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v100, v40); v42 = (const char *)cocos2d::CCString::getCString(v41); memset(v127, 0, sizeof(v127)); v43 = strlen(v42); std::string::__init(v127, v42, v43); v44 = sub_4C1A88(v127, ":"); std::string::~string((int)v127); if ( cocos2d::CCArray::count(v44) > 2u ) { v45 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 0); v46 = (char *)cocos2d::CCString::intValue(v45); v47 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 1u); v102 = (const char *)cocos2d::CCString::intValue(v47); v48 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 2u); v49 = (const char *)cocos2d::CCString::getCString(v48); memset(v128, 0, sizeof(v128)); v50 = strlen(v49); std::string::__init(v128, v49, v50); LevelTools::base64DecodeString(&v135, v128); std::string::~string((int)v128); if ( (int)v46 > 0 ) { if ( (v135 & 1) != 0 ? v136 : (int)(unsigned __int8)v135 >> 1 ) { std::string::basic_string(v129, (int)&v135); GameLevelManager::storeUserName((unsigned __int8 *)a1, v102, v46, (unsigned __int8 *)v129); std::string::~string((int)v129); v52 = (GJUserScore *)cocos2d::CCArray::count(v44); if ( (unsigned int)v52 > 8 ) { v90 = GJUserScore::create(v52); *((_DWORD *)v90 + 74) = v46; *((_DWORD *)v90 + 73) = v102; std::string::basic_string(v130, (int)&v135); std::string::operator=((unsigned __int8 *)v90 + 264, (unsigned __int8 *)v130); std::string::~string((int)v130); v91 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 3u); *((_DWORD *)v90 + 83) = cocos2d::CCString::intValue(v91); v92 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 4u); *((_DWORD *)v90 + 84) = cocos2d::CCString::intValue(v92); v93 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 5u); *((_DWORD *)v90 + 85) = cocos2d::CCString::intValue(v93); v94 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 6u); *((_DWORD *)v90 + 86) = cocos2d::CCString::intValue(v94); v95 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 7u); *((_DWORD *)v90 + 88) = cocos2d::CCString::intValue(v95); v96 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v44, 8u); *((_DWORD *)v90 + 87) = cocos2d::CCString::intValue(v96); cocos2d::CCArray::addObject(v36, v90); } } } std::string::~string((int)&v135); } ++v40; } } v38 = *(_DWORD *)(a1 + 760); v39 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a2); v53 = (const char *)cocos2d::CCString::getCString(v39); memset(v131, 0, sizeof(v131)); v54 = strlen(v53); std::string::__init(v131, v53, v54); cocos2d::CCDictionary::setObject(v38, v36); v55 = (cocos2d::CCArray *)std::string::~string((int)v131); v101 = (cocos2d::CCArray *)cocos2d::CCArray::create(v55); v56 = &v109; if ( (v109 & 1) != 0 ) v57 = v110; else v57 = (int)(unsigned __int8)v109 >> 1; if ( v57 ) { v60 = 0; v61 = sub_4C1A88(&v109, "|"); while ( v60 < cocos2d::CCArray::count(v61) ) { v62 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v61, v60); v63 = (const char *)cocos2d::CCString::getCString(v62); memset(v132, 0, sizeof(v132)); v64 = strlen(v63); std::string::__init(v132, v63, v64); v65 = sub_4C1A88(v132, ":"); std::string::~string((int)v132); v66 = (GJUserScore *)cocos2d::CCArray::count(v65); if ( (unsigned int)v66 > 3 ) { v67 = GJUserScore::create(v66); v68 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0); *((_DWORD *)v67 + 74) = cocos2d::CCString::intValue(v68); v69 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 1u); *((_DWORD *)v67 + 73) = cocos2d::CCString::intValue(v69); v70 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 2u); v71 = (const char *)cocos2d::CCString::getCString(v70); memset(v133, 0, sizeof(v133)); v72 = strlen(v71); std::string::__init(v133, v71, v72); LevelTools::base64DecodeString(v134, v133); std::string::operator=((unsigned __int8 *)v67 + 264, (unsigned __int8 *)v134); std::string::~string((int)v134); std::string::~string((int)v133); v73 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 3u); *((_DWORD *)v67 + 79) = cocos2d::CCString::intValue(v73); if ( cocos2d::CCArray::count(v65) > 0x10u ) { v74 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 4u); *((_DWORD *)v67 + 83) = cocos2d::CCString::intValue(v74); v75 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 5u); *((_DWORD *)v67 + 84) = cocos2d::CCString::intValue(v75); v76 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 6u); *((_DWORD *)v67 + 85) = cocos2d::CCString::intValue(v76); v77 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 7u); *((_DWORD *)v67 + 86) = cocos2d::CCString::intValue(v77); v78 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 8u); *((_DWORD *)v67 + 88) = cocos2d::CCString::intValue(v78); v79 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 9u); *((_DWORD *)v67 + 87) = cocos2d::CCString::intValue(v79); v80 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0xAu); *((_DWORD *)v67 + 75) = cocos2d::CCString::intValue(v80); v81 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0xBu); *((_DWORD *)v67 + 76) = cocos2d::CCString::intValue(v81); v82 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0xCu); *((_DWORD *)v67 + 78) = cocos2d::CCString::intValue(v82); v83 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0xDu); *((_DWORD *)v67 + 81) = cocos2d::CCString::intValue(v83); v84 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0xEu); *((_DWORD *)v67 + 82) = cocos2d::CCString::intValue(v84); v85 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0xFu); *((_DWORD *)v67 + 77) = cocos2d::CCString::intValue(v85); v86 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v65, 0x10u); *((_DWORD *)v67 + 94) = cocos2d::CCString::intValue(v86); } if ( *((int *)v67 + 74) > 0 ) cocos2d::CCArray::addObject(v101, v67); } ++v60; } } v58 = *(_DWORD *)(a1 + 756); v59 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a2, v56); v87 = (const char *)cocos2d::CCString::getCString(v59); v135 = 0; v136 = 0; v137 = 0; v88 = strlen(v87); std::string::__init(&v135, v87, v88); cocos2d::CCDictionary::setObject(v58, v101); std::string::~string((int)&v135); std::string::~string((int)&v109); std::string::~string((int)&v106); return std::string::~string((int)&v103); }
GD Web Decomp Icon

GD Web Decomp

Raw Source