// // GameLevelManager::onGetGJChallengesCompleted from 0x83ac14 to 0x83b4dc (2248 bytes) // // 2 xrefs: // > GameLevelManager::handleIt @ 0x85ad58 // > @ 0x811c0 // // This function is hookable on this platform (idp: arm, 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:55:14 +0000 // __int64 __fastcall GameLevelManager::onGetGJChallengesCompleted(GameLevelManager *a1, unsigned __int8 *a2) { __int64 v4; // x0 cocos2d::CCArray *v6; // x23 cocos2d::CCString *v7; // x0 const char *CString; // x0 size_t v9; // x0 cocos2d::CCString *v10; // x0 const char *v11; // x0 size_t v12; // x0 size_t v13; // x1 __int64 v14; // x0 cocos2d::CCString *v15; // x0 size_t v16; // x0 char *v17; // x25 unsigned int v18; // w0 unsigned __int8 *v19; // x3 char *v20; // x2 size_t v21; // x0 _BOOL4 v22; // w26 __int64 v23; // x0 cocos2d::CCArray *v24; // x26 __int64 v25; // x0 cocos2d::CCString *v26; // x0 GameManager *v27; // x0 int v28; // w27 __int64 v29; // x0 __int64 v30; // x28 int v31; // w2 cocos2d::CCString *v32; // x0 GameManager *v33; // x0 int v34; // w27 __int64 v35; // x0 cocos2d::CCString *v36; // x0 size_t v37; // x0 GameManager *v38; // x0 __int64 v39; // x2 char v40; // w0 __int64 v41; // x0 __int64 v42; // x1 _BOOL4 v43; // w27 __int64 v44; // x0 cocos2d::CCString *v45; // x0 GJAccountManager *v46; // x0 int v47; // w27 __int64 v48; // x0 cocos2d::CCString *v49; // x0 cocos2d::CCString *v50; // x0 size_t v51; // x0 cocos2d::CCString *v52; // x0 size_t v53; // x0 cocos2d::CCString *v54; // x0 size_t v55; // x0 unsigned __int64 hasCompletedChallenge; // x0 int i; // w26 GameStatsManager *v58; // x0 __int64 Challenge; // x28 GameStatsManager *v60; // x0 GameStatsManager *v61; // x0 __int64 *v62; // x2 char v63; // w0 __int64 v64; // x0 __int64 v65; // x1 unsigned int *v66; // x27 GameStatsManager *v67; // x0 GameStatsManager *v68; // x0 GameStatsManager *v69; // x0 void (__fastcall ***v70)(_QWORD); // x0 GameStatsManager *v71; // x0 GameStatsManager *v72; // x0 GameStatsManager *v73; // x0 int v74; // [xsp+7Ch] [xbp+7Ch] __int64 SecondaryQueuedChallenge; // [xsp+80h] [xbp+80h] GameStatsManager *v76; // [xsp+88h] [xbp+88h] GameStatsManager *v77; // [xsp+88h] [xbp+88h] GameStatsManager *v78; // [xsp+88h] [xbp+88h] GameStatsManager *v79; // [xsp+88h] [xbp+88h] GameStatsManager *v80; // [xsp+88h] [xbp+88h] GameStatsManager *v81; // [xsp+88h] [xbp+88h] GameStatsManager *v82; // [xsp+88h] [xbp+88h] GameStatsManager *QueuedChallenge; // [xsp+88h] [xbp+88h] __int64 v84; // [xsp+98h] [xbp+98h] BYREF size_t v85; // [xsp+A0h] [xbp+A0h] _BYTE *v86; // [xsp+A8h] [xbp+A8h] __int64 v87[2]; // [xsp+B0h] [xbp+B0h] BYREF void *v88; // [xsp+C0h] [xbp+C0h] __int64 v89; // [xsp+C8h] [xbp+C8h] BYREF size_t v90; // [xsp+D0h] [xbp+D0h] _BYTE *v91; // [xsp+D8h] [xbp+D8h] __int64 v92; // [xsp+E0h] [xbp+E0h] BYREF size_t v93; // [xsp+E8h] [xbp+E8h] char *v94; // [xsp+F0h] [xbp+F0h] __int64 v95[2]; // [xsp+F8h] [xbp+F8h] BYREF void *v96; // [xsp+108h] [xbp+108h] void *v97[3]; // [xsp+110h] [xbp+110h] BYREF __int64 v98[2]; // [xsp+128h] [xbp+128h] BYREF void *v99; // [xsp+138h] [xbp+138h] __int64 v100[2]; // [xsp+140h] [xbp+140h] BYREF void *v101; // [xsp+150h] [xbp+150h] __int64 v102; // [xsp+158h] [xbp+158h] BYREF __int64 v103; // [xsp+160h] [xbp+160h] void *v104; // [xsp+168h] [xbp+168h] __int64 v105[2]; // [xsp+170h] [xbp+170h] BYREF void *v106; // [xsp+180h] [xbp+180h] __int64 v107[2]; // [xsp+188h] [xbp+188h] BYREF void *v108; // [xsp+198h] [xbp+198h] __int64 v109[2]; // [xsp+1A0h] [xbp+1A0h] BYREF void *v110; // [xsp+1B0h] [xbp+1B0h] __int64 v111; // [xsp+1B8h] [xbp+1B8h] BYREF __int64 v112; // [xsp+1C0h] [xbp+1C0h] void *v113; // [xsp+1C8h] [xbp+1C8h] unsigned __int8 v114[24]; // [xsp+1D0h] [xbp+1D0h] BYREF unsigned __int8 v115[48]; // [xsp+1E8h] [xbp+1E8h] BYREF GameLevelManager::removeDLFromActive(a1, "get_chal"); v111 = 3222788; v112 = 0; v113 = nullptr; if ( !sub_7FEA60((__int64)a2, (__int64)&v111) ) { v6 = sub_80CFCC(a2, "|"); if ( (unsigned int)cocos2d::CCArray::count(v6) > 1 ) { v7 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v6, 0); CString = (const char *)cocos2d::CCString::getCString(v7); v84 = 0; v85 = 0; v86 = nullptr; v76 = (GameStatsManager *)CString; v9 = strlen(CString); std::string::__init(&v84, v76, v9); v10 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v6, 1u); v11 = (const char *)cocos2d::CCString::getCString(v10); v87[0] = 0; v87[1] = 0; v88 = nullptr; v77 = (GameStatsManager *)v11; v12 = strlen(v11); std::string::__init(v87, v77, v12); v13 = (unsigned __int8)v84 >> 1; if ( (v84 & 1) != 0 ) v13 = v85; if ( v13 <= 4 ) { v14 = *((_QWORD *)a1 + 178); if ( v14 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 8LL))(v14); LABEL_11: if ( (v87[0] & 1) != 0 ) operator delete(v88); if ( (v84 & 1) != 0 ) operator delete(v86); return _stack_chk_guard; } std::string::basic_string(&v89, (__int64)&v84, 5u, 0xFFFFFFFFFFFFFFFFLL); if ( (v84 & 1) != 0 ) { *v86 = 0; v85 = 0; } else { LOWORD(v84) = 0; } std::string::reserve(&v84, 0); v84 = v89; v85 = v90; v86 = v91; v92 = 0; v93 = 0; v94 = nullptr; if ( (v89 & 1) != 0 ) { std::string::__init(&v92, v91, v85); } else { v92 = v89; v93 = v90; v94 = v91; } v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%c%s%s%c%c%s", (const char *)&qword_68 + 7, "C36", "fpYa", 80, 116, "dg"); v78 = (GameStatsManager *)cocos2d::CCString::getCString(v15); v16 = strlen((const char *)v78); std::string::append((__int64)&v92, v78, v16); v17 = (char *)&v92 + 1; if ( (v92 & 1) != 0 ) v17 = v94; v18 = strlen(v17); rtsha1::calc((rtsha1 *)v17, (const void *)v18, (__int64)v114, v19); rtsha1::toHexString((rtsha1 *)v114, v115, v20); v95[0] = 0; v95[1] = 0; v96 = nullptr; v21 = strlen((const char *)v115); std::string::__init(v95, v115, v21); v22 = sub_7FEA60((__int64)v95, (__int64)v87); if ( (v95[0] & 1) != 0 ) operator delete(v96); if ( !v22 ) { v23 = *((_QWORD *)a1 + 178); if ( v23 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v23 + 8LL))(v23); LABEL_26: if ( (v92 & 1) != 0 ) operator delete(v94); goto LABEL_11; } v98[0] = 0; v98[1] = 0; v99 = nullptr; std::string::__init(v98, "19847", 5u); cocos2d::ZipUtils::base64DecodeEnc(v97, &v84, v98); if ( (v98[0] & 1) != 0 ) operator delete(v99); v24 = sub_80CFCC((unsigned __int8 *)v97, ":"); if ( (unsigned int)cocos2d::CCArray::count(v24) > 8 ) { v26 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 1u); v27 = (GameManager *)cocos2d::CCString::intValue(v26); v28 = (int)v27; if ( (int)v27 > 0 ) { v29 = GameManager::sharedState(v27); *(_DWORD *)(v29 + 668) = v28; v30 = v29; v31 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0); *(_DWORD *)(v30 + 664) = v31; *(_DWORD *)(v30 + 660) = v28 + v31; v32 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 2u); v33 = (GameManager *)cocos2d::CCString::intValue(v32); v34 = (int)v33; v35 = GameManager::sharedState(v33); if ( v34 == *(_DWORD *)(v35 + 896) - *(_DWORD *)(v35 + 900) ) { v36 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 3u); v79 = (GameStatsManager *)cocos2d::CCString::getCString(v36); v100[0] = 0; v100[1] = 0; v101 = nullptr; v37 = strlen((const char *)v79); v38 = (GameManager *)std::string::__init(v100, v79, v37); v39 = GameManager::sharedState(v38) + 608; v40 = *(_BYTE *)v39; v102 = 0; v103 = 0; v104 = nullptr; if ( (v40 & 1) != 0 ) { std::string::__init(&v102, *(void **)(v39 + 16), *(_QWORD *)(v39 + 8)); } else { v41 = *(_QWORD *)v39; v42 = *(_QWORD *)(v39 + 8); v104 = *(void **)(v39 + 16); v102 = v41; v103 = v42; } v43 = sub_7FEA60((__int64)v100, (__int64)&v102); if ( (v102 & 1) != 0 ) operator delete(v104); if ( v43 && (v45 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 4u), v46 = (GJAccountManager *)cocos2d::CCString::intValue(v45), v47 = (int)v46, v48 = GJAccountManager::sharedState(v46), v47 == *(_DWORD *)(v48 + 352) - *(_DWORD *)(v48 + 356)) ) { v49 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 5u); v74 = cocos2d::CCString::intValue(v49); v50 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 6u); v80 = (GameStatsManager *)cocos2d::CCString::getCString(v50); v105[0] = 0; v105[1] = 0; v106 = nullptr; v51 = strlen((const char *)v80); std::string::__init(v105, v80, v51); v52 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 7u); v81 = (GameStatsManager *)cocos2d::CCString::getCString(v52); v107[0] = 0; v107[1] = 0; v108 = nullptr; v53 = strlen((const char *)v81); std::string::__init(v107, v81, v53); v54 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v24, 8u); v82 = (GameStatsManager *)cocos2d::CCString::getCString(v54); v109[0] = 0; v109[1] = 0; v110 = nullptr; v55 = strlen((const char *)v82); hasCompletedChallenge = std::string::__init(v109, v82, v55); for ( i = 1; i != 4; ++i ) { v58 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)hasCompletedChallenge); Challenge = GameStatsManager::getChallenge(v58, i); v60 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)Challenge); QueuedChallenge = (GameStatsManager *)GameStatsManager::getQueuedChallenge(v60, i); v61 = (GameStatsManager *)GameStatsManager::sharedState(QueuedChallenge); SecondaryQueuedChallenge = GameStatsManager::getSecondaryQueuedChallenge(v61, i); if ( i == 1 ) { v62 = v105; } else if ( i == 2 ) { v62 = v107; } else { v62 = v109; } v63 = *(_BYTE *)v62; v111 = 0; v112 = 0; v113 = nullptr; if ( (v63 & 1) != 0 ) { std::string::__init(&v111, (void *)v62[2], v62[1]); } else { v64 = *v62; v65 = v62[1]; v113 = (void *)v62[2]; v111 = v64; v112 = v65; } v66 = (unsigned int *)GJChallengeItem::createFromString(&v111); v67 = (GameStatsManager *)(unsigned __int8)v111; if ( (v111 & 1) != 0 ) operator delete(v113); v66[26] = i; v68 = (GameStatsManager *)GameStatsManager::sharedState(v67); hasCompletedChallenge = (unsigned __int8)GameStatsManager::hasCompletedChallenge( v68, (GJChallengeItem *)v66); if ( !(_BYTE)hasCompletedChallenge ) { if ( !Challenge || (hasCompletedChallenge = v66[24], *(_DWORD *)(Challenge + 96) < (int)hasCompletedChallenge) ) { if ( !QueuedChallenge || (hasCompletedChallenge = v66[24], *((_DWORD *)QueuedChallenge + 24) < (int)hasCompletedChallenge) ) { if ( !SecondaryQueuedChallenge || (hasCompletedChallenge = v66[24], *(_DWORD *)(SecondaryQueuedChallenge + 96) < (int)hasCompletedChallenge) ) { if ( (!Challenge || (v71 = (GameStatsManager *)*(unsigned __int8 *)(Challenge + 100), *(_BYTE *)(Challenge + 100))) && (v71 = QueuedChallenge) != nullptr ) { v72 = (GameStatsManager *)GameStatsManager::sharedState(QueuedChallenge); hasCompletedChallenge = GameStatsManager::storeSecondaryQueuedChallenge( v72, i, (GJChallengeItem *)v66); } else { v73 = (GameStatsManager *)GameStatsManager::sharedState(v71); hasCompletedChallenge = GameStatsManager::storeQueuedChallenge(v73, i, (GJChallengeItem *)v66); } } } } } } v69 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)hasCompletedChallenge); GameStatsManager::storeChallengeTime(v69, v74); v70 = *((void (__fastcall ****)(_QWORD))a1 + 178); if ( v70 ) (**v70)(v70); if ( (v109[0] & 1) != 0 ) operator delete(v110); if ( (v107[0] & 1) != 0 ) operator delete(v108); if ( (v105[0] & 1) != 0 ) operator delete(v106); } else { v44 = *((_QWORD *)a1 + 176); if ( v44 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v44 + 8LL))(v44); } if ( (v100[0] & 1) != 0 ) operator delete(v101); goto LABEL_35; } } v25 = *((_QWORD *)a1 + 176); if ( !v25 ) { LABEL_35: if ( ((__int64)v97[0] & 1) != 0 ) operator delete(v97[2]); goto LABEL_26; } } else { v25 = *((_QWORD *)a1 + 178); if ( !v25 ) goto LABEL_35; } (*(void (__fastcall **)(__int64))(*(_QWORD *)v25 + 8LL))(v25); goto LABEL_35; } } v4 = *((_QWORD *)a1 + 178); if ( v4 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 8LL))(v4); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source