// // GJGameLevel::create from 0x3c57c4 to 0x3c62a8 (2788 bytes) // // 2 xrefs: // > GameLevelManager::createAndGetLevels @ 0x3c6316 // > GameLevelManager::processOnDownloadLevelCompleted @ 0x3c7476 // // 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 // GJGameLevel *GJGameLevel::create() { cocos2d::CCDictionary *v0; // r0 int v1; // r1 int v2; // r4 cocos2d::CCDictionary *v3; // r5 cocos2d::CCString *v4; // r0 int v5; // r10 cocos2d::CCString *v6; // r0 char *CString; // r0 cocos2d::CCString *v8; // r0 char *v9; // r0 cocos2d::CCString *v10; // r0 char *v11; // r0 cocos2d::CCString *v12; // r0 cocos2d::CCString *v13; // r0 const char *v14; // r6 cocos2d::CCString *v15; // r0 char *v16; // r0 cocos2d::CCString *v17; // r0 char *v18; // r0 cocos2d::CCString *v19; // r0 cocos2d::CCString *v20; // r0 cocos2d::CCString *v21; // r0 cocos2d::CCString *v22; // r0 cocos2d::CCString *v23; // r0 cocos2d::CCString *v24; // r0 cocos2d::CCString *v25; // r0 cocos2d::CCString *v26; // r0 cocos2d::CCString *v27; // r0 cocos2d::CCString *v28; // r0 cocos2d::CCString *v29; // r0 cocos2d::CCString *v30; // r0 cocos2d::CCString *v31; // r0 cocos2d::CCString *v32; // r0 cocos2d::CCString *v33; // r0 cocos2d::CCString *v34; // r0 cocos2d::CCString *v35; // r0 cocos2d::CCString *v36; // r0 cocos2d::CCString *v37; // r0 char *v38; // r0 int v39; // r8 std::string *v40; // r0 cocos2d::CCString *v41; // r0 cocos2d::CCString *v42; // r0 cocos2d::CCString *v43; // r0 bool v44; // r11 cocos2d::CCString *v45; // r0 cocos2d::CCString *v46; // r0 char *v47; // r0 GJGameLevel *v48; // r0 int *v49; // r4 GameLevelManager *v50; // r0 int v51; // r9 GameLevelManager *v52; // r0 GameLevelManager *v53; // r0 int v54; // r3 int v55; // s15 cocos2d::CCString *v56; // r0 char *v57; // r0 int v58; // s15 cocos2d::CCString *v59; // r0 cocos2d::CCString *v60; // r0 int v61; // r0 cocos2d::CCString *v62; // r0 cocos2d::CCString *v63; // r0 cocos2d::CCString *v64; // r0 cocos2d::CCString *v65; // r0 cocos2d::CCString *v66; // r0 char *v67; // r0 cocos2d::CCString *v68; // r0 char *v69; // r0 cocos2d::CCString *v70; // r0 char *v71; // r0 cocos2d::CCString *v72; // r0 _BOOL4 v73; // r7 int v74; // r3 int v76; // [sp+4h] [bp-140h] int v77; // [sp+8h] [bp-13Ch] int v78; // [sp+Ch] [bp-138h] int v79; // [sp+10h] [bp-134h] int v80; // [sp+14h] [bp-130h] int v81; // [sp+18h] [bp-12Ch] int v82; // [sp+1Ch] [bp-128h] int v83; // [sp+20h] [bp-124h] int v84; // [sp+24h] [bp-120h] _BOOL4 v85; // [sp+28h] [bp-11Ch] int v86; // [sp+2Ch] [bp-118h] int v87; // [sp+30h] [bp-114h] int v88; // [sp+34h] [bp-110h] _BOOL4 v89; // [sp+38h] [bp-10Ch] int v90; // [sp+3Ch] [bp-108h] int v91; // [sp+40h] [bp-104h] int v92; // [sp+44h] [bp-100h] bool v93; // [sp+48h] [bp-FCh] int v94; // [sp+4Ch] [bp-F8h] int v95; // [sp+50h] [bp-F4h] int v96; // [sp+54h] [bp-F0h] _BYTE v97[4]; // [sp+5Ch] [bp-E8h] BYREF _BYTE v98[4]; // [sp+60h] [bp-E4h] BYREF std::string v99; // [sp+64h] [bp-E0h] BYREF _BYTE v100[4]; // [sp+68h] [bp-DCh] BYREF std::string v101; // [sp+6Ch] [bp-D8h] BYREF std::string v102; // [sp+70h] [bp-D4h] BYREF std::string v103; // [sp+74h] [bp-D0h] BYREF _BYTE v104[4]; // [sp+78h] [bp-CCh] BYREF std::string v105; // [sp+7Ch] [bp-C8h] BYREF _BYTE v106[4]; // [sp+80h] [bp-C4h] BYREF std::string v107; // [sp+84h] [bp-C0h] BYREF std::string v108; // [sp+88h] [bp-BCh] BYREF std::string v109; // [sp+8Ch] [bp-B8h] BYREF std::string v110; // [sp+90h] [bp-B4h] BYREF std::string v111; // [sp+94h] [bp-B0h] BYREF std::string v112; // [sp+98h] [bp-ACh] BYREF std::string v113; // [sp+9Ch] [bp-A8h] BYREF std::string v114; // [sp+A0h] [bp-A4h] BYREF std::string v115; // [sp+A4h] [bp-A0h] BYREF std::string v116; // [sp+A8h] [bp-9Ch] BYREF std::string v117; // [sp+ACh] [bp-98h] BYREF std::string v118; // [sp+B0h] [bp-94h] BYREF std::string v119; // [sp+B4h] [bp-90h] BYREF std::string v120; // [sp+B8h] [bp-8Ch] BYREF std::string v121; // [sp+BCh] [bp-88h] BYREF std::string v122; // [sp+C0h] [bp-84h] BYREF std::string v123; // [sp+C4h] [bp-80h] BYREF std::string v124; // [sp+C8h] [bp-7Ch] BYREF std::string v125; // [sp+CCh] [bp-78h] BYREF std::string v126; // [sp+D0h] [bp-74h] BYREF _BYTE v127[4]; // [sp+D4h] [bp-70h] BYREF std::string v128; // [sp+D8h] [bp-6Ch] BYREF std::string v129; // [sp+DCh] [bp-68h] BYREF std::string v130; // [sp+E0h] [bp-64h] BYREF std::string v131; // [sp+E4h] [bp-60h] BYREF _BYTE v132[4]; // [sp+E8h] [bp-5Ch] BYREF std::string v133; // [sp+ECh] [bp-58h] BYREF int v134; // [sp+F0h] [bp-54h] BYREF char v135; // [sp+F4h] [bp-50h] BYREF _BYTE v136[4]; // [sp+F8h] [bp-4Ch] BYREF _BYTE v137[4]; // [sp+FCh] [bp-48h] BYREF _BYTE v138[4]; // [sp+100h] [bp-44h] BYREF _BYTE v139[4]; // [sp+104h] [bp-40h] BYREF std::string v140; // [sp+108h] [bp-3Ch] BYREF _BYTE v141[4]; // [sp+10Ch] [bp-38h] BYREF _BYTE v142[4]; // [sp+110h] [bp-34h] BYREF std::string v143; // [sp+114h] [bp-30h] BYREF std::string v144; // [sp+118h] [bp-2Ch] BYREF std::string v145; // [sp+11Ch] [bp-28h] BYREF std::string v146; // [sp+120h] [bp-24h] BYREF std::string v147; // [sp+124h] [bp-20h] BYREF std::string v148; // [sp+128h] [bp-1Ch] BYREF int v149; // [sp+12Ch] [bp-18h] BYREF int v150; // [sp+130h] [bp-14h] BYREF std::string v151; // [sp+134h] [bp-10h] BYREF _BYTE v152[4]; // [sp+138h] [bp-Ch] BYREF std::string v153; // [sp+13Ch] [bp-8h] BYREF std::string v154; // [sp+140h] [bp-4h] BYREF std::string v155; // [sp+144h] [bp+0h] BYREF std::string v156; // [sp+148h] [bp+4h] BYREF v2 = v1; v3 = v0; sub_776584((int)&v156, (char *)&aO1i2r3e45s7t89[1]); v4 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v156); v5 = cocos2d::CCString::intValue(v4); sub_774008(&v156); sub_776584((int)&v156, (char *)&aO1i2r3e45s7t89[3]); v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v156); CString = (char *)cocos2d::CCString::getCString(v6); sub_776584((int)v97, CString); sub_774008(&v156); sub_776584((int)&v99, (char *)&aO1i2r3e45s7t89[5]); v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v99); v9 = (char *)cocos2d::CCString::getCString(v8); sub_776584((int)v98, v9); sub_774008(&v99); sub_776584((int)&v101, (char *)&aO1i2r3e45s7t89[7]); v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v101); v11 = (char *)cocos2d::CCString::getCString(v10); sub_776584((int)v100, v11); sub_774008(&v101); sub_776584((int)&v102, (char *)&aO1i2r3e45s7t89[8]); v12 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v102); v76 = cocos2d::CCString::intValue(v12); sub_774008(&v102); sub_776584((int)&v103, "6"); v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v103); v14 = (const char *)cocos2d::CCString::intValue(v13); sub_774008(&v103); sub_776584((int)&v105, "28"); v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v105); v16 = (char *)cocos2d::CCString::getCString(v15); sub_776584((int)v104, v16); sub_774008(&v105); sub_776584((int)&v107, "29"); v17 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v107); v18 = (char *)cocos2d::CCString::getCString(v17); sub_776584((int)v106, v18); sub_774008(&v107); sub_776584((int)&v108, (char *)&aO1i2r3e45s7t89[12]); v19 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v108); v77 = cocos2d::CCString::intValue(v19); sub_774008(&v108); sub_776584((int)&v109, (char *)&aO1i2r3e45s7t89[13]); v20 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v109); v78 = cocos2d::CCString::intValue(v20); sub_774008(&v109); sub_776584((int)&v110, "10"); v21 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v110); v79 = cocos2d::CCString::intValue(v21); sub_774008(&v110); sub_776584((int)&v111, "12"); v22 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v111); v80 = cocos2d::CCString::intValue(v22); sub_774008(&v111); sub_776584((int)&v112, "13"); v23 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v112); v81 = cocos2d::CCString::intValue(v23); sub_774008(&v112); sub_776584((int)&v113, "14"); v24 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v113); v82 = cocos2d::CCString::intValue(v24); sub_774008(&v113); sub_776584((int)&v114, "16"); v25 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v114); v83 = cocos2d::CCString::intValue(v25); sub_774008(&v114); sub_776584((int)&v115, "15"); v26 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v115); v84 = cocos2d::CCString::intValue(v26); sub_774008(&v115); sub_776584((int)&v116, "17"); v27 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v116); v85 = cocos2d::CCString::boolValue(v27); sub_774008(&v116); sub_776584((int)&v117, "43"); v28 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v117); v86 = cocos2d::CCString::intValue(v28); sub_774008(&v117); sub_776584((int)&v118, "18"); v29 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v118); v87 = cocos2d::CCString::intValue(v29); sub_774008(&v118); sub_776584((int)&v119, "37"); v30 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v119); v88 = cocos2d::CCString::intValue(v30); sub_774008(&v119); sub_776584((int)&v120, "38"); v31 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v120); v89 = cocos2d::CCString::boolValue(v31); sub_774008(&v120); sub_776584((int)&v121, "19"); v32 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v121); v90 = cocos2d::CCString::intValue(v32); sub_774008(&v121); sub_776584((int)&v122, "42"); v33 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v122); v91 = cocos2d::CCString::intValue(v33); sub_774008(&v122); sub_776584((int)&v123, "45"); v34 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v123); v92 = cocos2d::CCString::intValue(v34); sub_774008(&v123); sub_776584((int)&v124, "25"); v35 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v124); v93 = cocos2d::CCString::boolValue(v35); sub_774008(&v124); sub_776584((int)&v125, "39"); v36 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v125); v94 = cocos2d::CCString::intValue(v36); sub_774008(&v125); if ( v2 ) { sub_776584((int)&v126, "27"); v37 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v126); v38 = (char *)cocos2d::CCString::getCString(v37); sub_776584((int)&v155, v38); sub_774008(&v126); if ( *((_DWORD *)v155.m_data.m_data - 3) > 1u ) { sub_776584((int)v127, "26364"); cocos2d::ZipUtils::base64DecodeEnc((cocos2d::ZipUtils *)&v156, &v155, (std::string)v127); sub_774008(v127); v39 = atoi((const char *)v156.m_data.m_data); sub_774008(&v156); } else { v39 = 0; } v40 = &v155; } else { sub_776584((int)&v128, "27"); v41 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v128); v39 = cocos2d::CCString::intValue(v41); v40 = &v128; } sub_774008(v40); sub_776584((int)&v129, "30"); v42 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v129); v95 = cocos2d::CCString::intValue(v42); sub_774008(&v129); sub_776584((int)&v130, "31"); v43 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v130); v44 = cocos2d::CCString::boolValue(v43); sub_774008(&v130); sub_776584((int)&v131, "35"); v45 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v131); v96 = cocos2d::CCString::intValue(v45); sub_774008(&v131); sub_776584((int)&v133, "36"); v46 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v133); v47 = (char *)cocos2d::CCString::getCString(v46); sub_776584((int)v132, v47); v48 = (GJGameLevel *)sub_774008(&v133); v49 = GJGameLevel::create(v48); v50 = GameLevelManager::sharedState(); v51 = GameLevelManager::accountIDForUserID(v50, (int)v14); v52 = GameLevelManager::sharedState(); GameLevelManager::userNameForUserID((GameLevelManager *)&v134, (int)v52, v14); if ( *(_DWORD *)(v134 - 12) <= 1u ) { v53 = GameLevelManager::sharedState(); GameLevelManager::tryGetUsername((GameLevelManager *)&v135, (GameLevelManager_vtbl *)v53, v51, v54); sub_774794(&v134, &v135); sub_774008(&v135); } GJGameLevel::setLevelID((GJGameLevel *)v49, v5); sub_775C20(v136, v97); sub_775D40(v49 + 70, v136); sub_774008(v136); v49[107] = v76; sub_775C20(v137, v98); sub_775D40(v49 + 71, v137); sub_774008(v137); sub_775C20(v138, v100); sub_775D40(v49 + 72, v138); sub_774008(v138); v49[83] = (int)v14; v55 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0); v49[82] = v55; v49[81] = (int)&v14[v55]; sub_775C20(v139, &v134); sub_775D40(v49 + 73, v139); sub_774008(v139); GJGameLevel::setAccountID((GJGameLevel *)v49, v51); sub_776584((int)&v140, "58"); v56 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v140); v57 = (char *)cocos2d::CCString::getCString(v56); sub_776584((int)v141, v57); sub_775D40(v49 + 74, v141); sub_774008(v141); sub_774008(&v140); *((_BYTE *)v49 + 640) = v44; v49[96] = v77; v49[97] = v78; v49[98] = v79; v49[88] = v80; v49[108] = v81; v49[133] = v82; v49[134] = v83; v49[135] = v84; GJGameLevel::setDemon((GJGameLevel *)v49, v85); v49[146] = v86; GJGameLevel::setStars((GJGameLevel *)v49, v87); v49[136] = v90; v49[137] = v91; *((_BYTE *)v49 + 600) = v93; v58 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0); v49[156] = v58; v49[155] = v58 + v39; GJGameLevel::setOriginalLevel((GJGameLevel *)v49, v95); v49[89] = v96; v49[151] = v88; GJGameLevel::setCoinsVerified((GJGameLevel *)v49, v89); v49[171] = v94; sub_775C20(v142, v132); sub_775D40(v49 + 193, v142); sub_774008(v142); sub_776584((int)&v143, "40"); v59 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v143); *((_BYTE *)v49 + 408) = cocos2d::CCString::boolValue(v59); sub_774008(&v143); sub_776584((int)&v144, "41"); v60 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v144); v61 = cocos2d::CCString::intValue(v60); GJGameLevel::setDailyID((GJGameLevel *)v49, v61); sub_774008(&v144); sub_776584((int)&v145, "44"); v62 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v145); *((_BYTE *)v49 + 397) = cocos2d::CCString::boolValue(v62); sub_774008(&v145); GJGameLevel::setObjectCount((GJGameLevel *)v49, v92); sub_776584((int)&v146, "46"); v63 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v146); v49[100] = cocos2d::CCString::intValue(v63); sub_774008(&v146); sub_776584((int)&v147, "47"); v64 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v147); v49[101] = cocos2d::CCString::intValue(v64); sub_774008(&v147); sub_776584((int)&v148, "57"); v65 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v148); v49[196] = cocos2d::CCString::intValue(v65); sub_774008(&v148); sub_775C20(&v149, v104); sub_775D40(v49 + 75, &v149); sub_774008(&v149); sub_775C20(&v150, v106); sub_775D40(v49 + 76, &v150); sub_774008(&v150); sub_776584((int)&v151, "48"); v66 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v151); v67 = (char *)cocos2d::CCString::getCString(v66); sub_776584((int)v152, v67); GJGameLevel::parseSettingsString(); sub_774008(v152); sub_774008(&v151); sub_776584((int)&v153, "52"); v68 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v153); v69 = (char *)cocos2d::CCString::getCString(v68); sub_7753D4((int)(v49 + 198), v69); sub_774008(&v153); sub_776584((int)&v154, "53"); v70 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v154); v71 = (char *)cocos2d::CCString::getCString(v70); sub_7753D4((int)(v49 + 199), v71); sub_774008(&v154); sub_776584((int)&v155, "54"); v72 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v155); v49[200] = cocos2d::CCString::intValue(v72); sub_774008(&v155); sub_776584((int)&v156, (char *)&unk_939830); v73 = sub_3BE0D8((int)v100, (int)&v156); sub_774008(&v156); if ( v73 ) v74 = 4; else v74 = 3; v49[190] = v74; sub_774008(&v134); sub_774008(v132); sub_774008(v106); sub_774008(v104); sub_774008(v100); sub_774008(v98); sub_774008(v97); return (GJGameLevel *)v49; }
GD Web Decomp Icon

GD Web Decomp

Raw Source