//
// GJGameLevel::dataLoaded from 0x709e68 to 0x70b38c (5412 bytes)
//
// 2 xrefs:
// > GJGameLevel::createWithCoder @ 0x70b3b0
// > ??> @ 0x81330
//
// 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 GJGameLevel::dataLoaded(GJGameLevel *a1, DS_Dictionary *a2)
{
int IntegerForKey; // w0
int v5; // w22
int v6; // w2
int v7; // w0
int v8; // w22
int v9; // w2
int v10; // w0
int v11; // w0
int v12; // w22
int v13; // w2
int v14; // w0
int v15; // w22
int v16; // w2
int v17; // w0
int v18; // w22
int v19; // w2
int v20; // w0
int v21; // w22
int v22; // w2
int v23; // w0
int v24; // w22
int v25; // w2
char *v26; // x0
_BOOL4 BoolForKey; // w24
int v28; // w2
int v29; // w0
int v30; // w24
int v31; // w2
int v32; // w0
int v33; // w24
int v34; // w2
char *v35; // x0
char *v36; // x0
char *v37; // x0
char *v38; // x0
GJLevelType m_levelType; // w1
int v40; // w0
char *v41; // x0
char *v42; // x0
char *v43; // x0
char *v44; // x0
char *v45; // x0
char *v46; // x0
int v47; // w24
int v48; // w0
float v49; // s0
float v50; // s1
_BOOL4 v51; // w24
int v52; // w2
int v53; // w0
int v54; // w24
int v55; // w2
int v56; // w0
int v57; // w24
int v58; // w2
bool v59; // w0
_BOOL4 v60; // w24
int v61; // w2
int v62; // w0
int v63; // w24
int v64; // w2
int v65; // w0
int v66; // w24
int v67; // w2
int v68; // w0
int v69; // w24
int v70; // w2
char *v71; // x0
char *v72; // x0
char *v73; // x0
float FloatForKey; // s10
float v75; // s0
float v76; // s0
float v77; // s1
cocos2d::CCDictionary *DictForKey; // x0
cocos2d::CCDictionary *v79; // x24
cocos2d::CCDictionary *m_lastBuildSave; // x1
_BOOL4 v81; // w24
int v82; // w2
_BOOL4 v83; // w24
int v84; // w2
_BOOL4 v85; // w24
int v86; // w2
char *v87; // x0
unsigned int *v88; // x1
int v89; // w2
_DWORD *v90; // x25
unsigned __int64 v91; // x26
stl::StringData::Internal *m_data; // x0
unsigned __int64 v93; // x24
size_t v94; // x2
int v95; // w3
int v96; // w20
__int64 v97; // x24
char *v98; // x0
std::string *p_m_levelDesc; // x19
char *v100; // x0
void *v101; // x20
unsigned int *v102; // x19
int v103; // w0
unsigned int *v104; // x1
int v105; // w2
unsigned int *v106; // x1
int v107; // w2
unsigned int *v108; // x1
int v109; // w2
unsigned int *v110; // x1
int v111; // w2
unsigned int *v112; // x1
int v113; // w2
unsigned int *v114; // x25
int v115; // w1
char *v116; // x0
unsigned int *v117; // x1
int v118; // w2
unsigned int *v119; // x1
int v120; // w2
unsigned int *v121; // x1
int v122; // w2
unsigned int *v123; // x1
int v124; // w2
unsigned int *v125; // x1
int v126; // w2
unsigned int *v127; // x1
int v128; // w2
unsigned int *v129; // x1
int v130; // w2
unsigned int *v131; // x1
int v132; // w2
unsigned int *v133; // x1
int v134; // w2
unsigned int *v135; // x1
int v136; // w2
unsigned int *v137; // x1
int v138; // w2
__int64 v139; // [xsp+78h] [xbp+78h] BYREF
void *v140; // [xsp+80h] [xbp+80h] BYREF
a1->m_levelNotDownloaded = DS_Dictionary::getBoolForKey(a2, "k35");
IntegerForKey = DS_Dictionary::getIntegerForKey(a2, "k1");
a1->m_levelID.value = IntegerForKey;
v5 = IntegerForKey;
v6 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_levelID.seed = v6;
a1->m_levelID.random = v5 + v6;
v7 = DS_Dictionary::getIntegerForKey(a2, "k18");
a1->m_attempts.value = v7;
v8 = v7;
v9 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_attempts.seed = v9;
a1->m_attempts.random = v8 + v9;
v10 = DS_Dictionary::getIntegerForKey(a2, "k19");
GJGameLevel::setNormalPercent(a1, v10);
v11 = DS_Dictionary::getIntegerForKey(a2, "k71");
a1->m_orbCompletion.value = v11;
v12 = v11;
v13 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_orbCompletion.seed = v13;
a1->m_orbCompletion.random = v12 + v13;
v14 = DS_Dictionary::getIntegerForKey(a2, "k90");
a1->m_newNormalPercent2.value = v14;
v15 = v14;
v16 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_newNormalPercent2.seed = v16;
a1->m_newNormalPercent2.random = v15 + v16;
a1->m_practicePercent = DS_Dictionary::getIntegerForKey(a2, "k20");
v17 = DS_Dictionary::getIntegerForKey(a2, "k36");
a1->m_jumps.value = v17;
v18 = v17;
v19 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_jumps.seed = v19;
a1->m_jumps.random = v18 + v19;
v20 = DS_Dictionary::getIntegerForKey(a2, "k85");
a1->m_clicks.value = v20;
v21 = v20;
v22 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_clicks.seed = v22;
a1->m_clicks.random = v21 + v22;
v23 = DS_Dictionary::getIntegerForKey(a2, "k86");
a1->m_attemptTime.value = v23;
v24 = v23;
v25 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_attemptTime.seed = v25;
a1->m_attemptTime.random = v24 + v25;
a1->m_chk = DS_Dictionary::getIntegerForKey(a2, "k87");
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k88");
sub_D18EA8(&a1->m_personalBests, &v140);
v26 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v106 = (unsigned int *)((char *)v140 - 8);
do
v107 = __ldaxr(v106);
while ( __stlxr(v107 - 1, v106) );
}
else
{
v107 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v107 - 1;
}
if ( v107 <= 0 )
operator delete(v26);
}
a1->m_isChkValid = DS_Dictionary::getBoolForKey(a2, "k89");
a1->m_levelLength = DS_Dictionary::getIntegerForKey(a2, "k23");
BoolForKey = DS_Dictionary::getBoolForKey(a2, "k25");
a1->m_demon.value = BoolForKey;
v28 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_demon.seed = v28;
a1->m_demon.random = BoolForKey + v28;
a1->m_demonDifficulty = DS_Dictionary::getIntegerForKey(a2, "k76");
v29 = DS_Dictionary::getIntegerForKey(a2, "k26");
a1->m_stars.value = v29;
v30 = v29;
v31 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_stars.seed = v31;
a1->m_stars.random = v30 + v31;
v32 = DS_Dictionary::getIntegerForKey(a2, "k74");
a1->m_dailyID.value = v32;
v33 = v32;
v34 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_dailyID.seed = v34;
a1->m_dailyID.random = v33 + v34;
a1->m_isCompletionLegitimate = DS_Dictionary::getBoolForKey(a2, "k68");
a1->m_gauntletLevel = DS_Dictionary::getBoolForKey(a2, "k77");
a1->m_gauntletLevel2 = DS_Dictionary::getBoolForKey(a2, "k78");
a1->m_levelFavorited = DS_Dictionary::getBoolForKey(a2, "k82");
a1->m_levelFolder = DS_Dictionary::getIntegerForKey(a2, "k84");
a1->m_bestTime = DS_Dictionary::getIntegerForKey(a2, "k107");
a1->m_ticksTime = DS_Dictionary::getIntegerForKey(a2, "k115");
a1->m_clicksTime = DS_Dictionary::getIntegerForKey(a2, "k117");
a1->m_coinsTime = DS_Dictionary::getIntegerForKey(a2, "k121");
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k119");
sub_D163D4(&a1->m_inputsTime, &v140);
v35 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v108 = (unsigned int *)((char *)v140 - 8);
do
v109 = __ldaxr(v108);
while ( __stlxr(v109 - 1, v108) );
}
else
{
v109 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v109 - 1;
}
if ( v109 <= 0 )
operator delete(v35);
}
a1->m_bestPoints = DS_Dictionary::getIntegerForKey(a2, "k108");
a1->m_ticksPoints = DS_Dictionary::getIntegerForKey(a2, "k116");
a1->m_clicksPoints = DS_Dictionary::getIntegerForKey(a2, "k118");
a1->m_coinsPoints = DS_Dictionary::getIntegerForKey(a2, "k122");
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k120");
sub_D163D4(&a1->m_inputsPoints, &v140);
v36 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v110 = (unsigned int *)((char *)v140 - 8);
do
v111 = __ldaxr(v110);
while ( __stlxr(v111 - 1, v110) );
}
else
{
v111 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v111 - 1;
}
if ( v111 <= 0 )
operator delete(v36);
}
a1->m_platformerSeed = DS_Dictionary::getIntegerForKey(a2, "k111");
a1->m_savedTime = DS_Dictionary::getBoolForKey(a2, "k123");
a1->m_savedPoints = DS_Dictionary::getBoolForKey(a2, "k124");
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k109");
sub_D163D4(&a1->m_localBestTimes, &v140);
v37 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v112 = (unsigned int *)((char *)v140 - 8);
do
v113 = __ldaxr(v112);
while ( __stlxr(v113 - 1, v112) );
}
else
{
v113 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v113 - 1;
}
if ( v113 <= 0 )
operator delete(v37);
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k110");
sub_D163D4(&a1->m_localBestPoints, &v140);
v38 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v104 = (unsigned int *)((char *)v140 - 8);
do
v105 = __ldaxr(v104);
while ( __stlxr(v105 - 1, v104) );
}
else
{
v105 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v105 - 1;
}
if ( v105 <= 0 )
operator delete(v38);
}
a1->m_cbsOverride = DS_Dictionary::getIntegerForKey(a2, "k125");
if ( a1->m_levelNotDownloaded )
{
m_levelType = a1->m_levelType;
if ( m_levelType != Main )
goto LABEL_8;
LABEL_24:
a1->m_isUnlocked = DS_Dictionary::getBoolForKey(a2, "k38");
a1->m_requiredCoins = DS_Dictionary::getIntegerForKey(a2, "k37");
if ( a1->m_levelType != Editor )
goto LABEL_9;
goto LABEL_25;
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k2");
sub_D163D4(&a1->m_levelName, &v140);
v41 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v125 = (unsigned int *)((char *)v140 - 8);
do
v126 = __ldaxr(v125);
while ( __stlxr(v126 - 1, v125) );
}
else
{
v126 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v126 - 1;
}
if ( v126 <= 0 )
operator delete(v41);
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k3");
sub_D163D4(&a1->m_levelDesc, &v140);
v42 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v131 = (unsigned int *)((char *)v140 - 8);
do
v132 = __ldaxr(v131);
while ( __stlxr(v132 - 1, v131) );
}
else
{
v132 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v132 - 1;
}
if ( v132 <= 0 )
operator delete(v42);
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k4");
sub_D163D4(&a1->m_levelString, &v140);
v43 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v129 = (unsigned int *)((char *)v140 - 8);
do
v130 = __ldaxr(v129);
while ( __stlxr(v130 - 1, v129) );
}
else
{
v130 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v130 - 1;
}
if ( v130 <= 0 )
operator delete(v43);
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k5");
sub_D163D4(&a1->m_creatorName, &v140);
v44 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v135 = (unsigned int *)((char *)v140 - 8);
do
v136 = __ldaxr(v135);
while ( __stlxr(v136 - 1, v135) );
}
else
{
v136 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v136 - 1;
}
if ( v136 <= 0 )
operator delete(v44);
}
a1->m_timestamp = DS_Dictionary::getIntegerForKey(a2, "k95");
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k91");
sub_D163D4(&a1->m_lockedEditorLayers, &v140);
v45 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v133 = (unsigned int *)((char *)v140 - 8);
do
v134 = __ldaxr(v133);
while ( __stlxr(v134 - 1, v133) );
}
else
{
v134 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v134 - 1;
}
if ( v134 <= 0 )
operator delete(v45);
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k101");
sub_D163D4(&a1->m_savedCameraPositions, &v140);
v46 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v127 = (unsigned int *)((char *)v140 - 8);
do
v128 = __ldaxr(v127);
while ( __stlxr(v128 - 1, v127) );
}
else
{
v128 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v128 - 1;
}
if ( v128 <= 0 )
operator delete(v46);
}
v47 = DS_Dictionary::getIntegerForKey(a2, "k102");
v48 = DS_Dictionary::getIntegerForKey(a2, "k103");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v140, (float)v47, (float)v48);
cocos2d::CCPoint::operator=(&a1->m_previewLock, v49, v50);
a1->m_coins = DS_Dictionary::getIntegerForKey(a2, "k64");
v51 = DS_Dictionary::getBoolForKey(a2, "k65");
a1->m_coinsVerified.value = v51;
v52 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_coinsVerified.seed = v52;
a1->m_coinsVerified.random = v51 + v52;
v53 = DS_Dictionary::getIntegerForKey(a2, "k6");
a1->m_userID.value = v53;
v54 = v53;
v55 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_userID.seed = v55;
a1->m_userID.random = v54 + v55;
v56 = DS_Dictionary::getIntegerForKey(a2, "k60");
a1->m_accountID.value = v56;
v57 = v56;
v58 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_accountID.seed = v58;
a1->m_accountID.random = v57 + v58;
a1->m_difficulty = DS_Dictionary::getIntegerForKey(a2, "k7");
a1->m_audioTrack = DS_Dictionary::getIntegerForKey(a2, "k8");
a1->m_ratings = DS_Dictionary::getIntegerForKey(a2, "k9");
a1->m_ratingsSum = DS_Dictionary::getIntegerForKey(a2, "k10");
a1->m_downloads = DS_Dictionary::getIntegerForKey(a2, "k11");
a1->m_isEditable = DS_Dictionary::getBoolForKey(a2, "k13");
v59 = DS_Dictionary::getBoolForKey(a2, "k14");
a1->m_isVerifiedRaw = v59;
v60 = v59;
v61 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_isVerified.seed = v61;
a1->m_isVerified.random = v61 + v60;
a1->m_isUploaded = DS_Dictionary::getBoolForKey(a2, "k15");
a1->m_likes = DS_Dictionary::getIntegerForKey(a2, "k22");
a1->m_dislikes = DS_Dictionary::getIntegerForKey(a2, "k24");
a1->m_levelType = DS_Dictionary::getIntegerForKey(a2, "k21");
a1->m_levelVersion = DS_Dictionary::getIntegerForKey(a2, "k16");
a1->m_gameVersion = DS_Dictionary::getIntegerForKey(a2, "k17");
a1->m_featured = DS_Dictionary::getIntegerForKey(a2, "k27");
v62 = DS_Dictionary::getIntegerForKey(a2, "k75");
a1->m_isEpic = v62;
if ( !v62 )
a1->m_isEpic = DS_Dictionary::getBoolForKey(a2, "k75");
a1->m_autoLevel = DS_Dictionary::getBoolForKey(a2, "k33");
a1->m_unlisted = DS_Dictionary::getBoolForKey(a2, "k79");
a1->m_friendsOnly = DS_Dictionary::getBoolForKey(a2, "k94");
v63 = DS_Dictionary::getIntegerForKey(a2, "k41");
v64 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_password.seed = v64;
a1->m_password.random = v63 + v64;
v65 = DS_Dictionary::getIntegerForKey(a2, "k42");
a1->m_originalLevel.value = v65;
v66 = v65;
v67 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_originalLevel.seed = v67;
a1->m_originalLevel.random = v66 + v67;
a1->m_twoPlayerMode = DS_Dictionary::getBoolForKey(a2, "k43");
a1->m_songID = DS_Dictionary::getIntegerForKey(a2, "k45");
a1->m_levelRev = DS_Dictionary::getIntegerForKey(a2, "k46");
a1->m_hasBeenModified = DS_Dictionary::getBoolForKey(a2, "k47");
v68 = DS_Dictionary::getIntegerForKey(a2, "k48");
a1->m_objectCount.value = v68;
v69 = v68;
v70 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_objectCount.seed = v70;
a1->m_objectCount.random = v69 + v70;
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k67");
sub_D163D4(&a1->m_capacityString, &v140);
v71 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v137 = (unsigned int *)((char *)v140 - 8);
do
v138 = __ldaxr(v137);
while ( __stlxr(v138 - 1, v137) );
}
else
{
v138 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v138 - 1;
}
if ( v138 <= 0 )
operator delete(v71);
}
a1->m_starsRequested = DS_Dictionary::getIntegerForKey(a2, "k66");
a1->m_highObjectsEnabled = DS_Dictionary::getBoolForKey(a2, "k69");
a1->m_unlimitedObjectsEnabled = DS_Dictionary::getBoolForKey(a2, "k93");
a1->m_workingTime = DS_Dictionary::getIntegerForKey(a2, "k80");
a1->m_workingTime2 = DS_Dictionary::getIntegerForKey(a2, "k81");
a1->m_lowDetailMode = DS_Dictionary::getBoolForKey(a2, "k72");
a1->m_lowDetailModeToggled = DS_Dictionary::getBoolForKey(a2, "k73");
a1->m_disableShakeToggled = DS_Dictionary::getBoolForKey(a2, "k112");
a1->m_levelIndex = DS_Dictionary::getIntegerForKey(a2, "k83");
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k104");
sub_D163D4(&a1->m_songIDs, &v140);
v72 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v123 = (unsigned int *)((char *)v140 - 8);
do
v124 = __ldaxr(v123);
while ( __stlxr(v124 - 1, v123) );
}
else
{
v124 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v124 - 1;
}
if ( v124 <= 0 )
operator delete(v72);
}
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k105");
sub_D163D4(&a1->m_sfxIDs, &v140);
v73 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v121 = (unsigned int *)((char *)v140 - 8);
do
v122 = __ldaxr(v121);
while ( __stlxr(v122 - 1, v121) );
}
else
{
v122 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v122 - 1;
}
if ( v122 <= 0 )
operator delete(v73);
}
a1->m_songSize = DS_Dictionary::getIntegerForKey(a2, "k106");
m_levelType = a1->m_levelType;
if ( m_levelType == Main )
goto LABEL_24;
LABEL_8:
if ( m_levelType != Editor )
goto LABEL_9;
LABEL_25:
FloatForKey = DS_Dictionary::getFloatForKey(a2, "kI1");
v75 = DS_Dictionary::getFloatForKey(a2, "kI2");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v140, FloatForKey, v75);
cocos2d::CCPoint::operator=(&a1->m_lastCameraPos, v76, v77);
a1->m_lastEditorZoom = DS_Dictionary::getFloatForKey(a2, "kI3");
a1->m_lastBuildPage = DS_Dictionary::getIntegerForKey(a2, "kI4");
a1->m_lastBuildTab = DS_Dictionary::getIntegerForKey(a2, "kI5");
a1->m_lastBuildGroupID = DS_Dictionary::getIntegerForKey(a2, "kI7");
DictForKey = DS_Dictionary::getDictForKey(a2, "kI6", 0);
v79 = DictForKey;
m_lastBuildSave = a1->m_lastBuildSave;
if ( DictForKey != m_lastBuildSave )
{
if ( DictForKey )
{
cocos2d::CCObject::retain(DictForKey);
m_lastBuildSave = a1->m_lastBuildSave;
}
if ( m_lastBuildSave )
cocos2d::CCObject::release(m_lastBuildSave);
a1->m_lastBuildSave = v79;
}
v81 = DS_Dictionary::getBoolForKey(a2, "k61");
a1->m_firstCoinVerified.value = v81;
v82 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_firstCoinVerified.seed = v82;
a1->m_firstCoinVerified.random = v81 + v82;
v83 = DS_Dictionary::getBoolForKey(a2, "k62");
a1->m_secondCoinVerified.value = v83;
v84 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_secondCoinVerified.seed = v84;
a1->m_secondCoinVerified.random = v83 + v84;
v85 = DS_Dictionary::getBoolForKey(a2, "k63");
a1->m_thirdCoinVerified.value = v85;
v86 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_thirdCoinVerified.seed = v86;
a1->m_thirdCoinVerified.random = v85 + v86;
DS_Dictionary::getStringForKey((__int64 *)&v140, a2, "k34");
sub_D163D4(&a1->m_recordString, &v140);
v87 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v88 = (unsigned int *)((char *)v140 - 8);
do
v89 = __ldaxr(v88);
while ( __stlxr(v89 - 1, v88) );
}
else
{
v89 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v89 - 1;
}
if ( v89 <= 0 )
operator delete(v87);
}
LABEL_9:
v40 = DS_Dictionary::getIntegerForKey(a2, "k50");
if ( v40 > 14 )
{
if ( v40 > 26 )
return;
goto LABEL_47;
}
sub_D153B8((int)&v140, &byte_F288A0);
v90 = v140;
v91 = *((_QWORD *)v140 - 3);
m_data = a1->m_levelString.m_data.m_data;
v93 = *((_QWORD *)m_data - 3);
if ( v91 > v93 )
v94 = *((_QWORD *)m_data - 3);
else
v94 = *((_QWORD *)v140 - 3);
v96 = memcmp(m_data, v140, v94);
if ( !v96 )
{
v96 = 0x7FFFFFFF;
v97 = v93 - v91;
if ( v97 <= 0x7FFFFFFF )
{
if ( v97 >= (__int64)0xFFFFFFFF80000000LL )
v96 = v97;
else
v96 = 0x80000000;
}
}
v98 = (char *)(v90 - 6);
if ( v90 - 6 == (_DWORD *)&qword_124B6B0 )
goto LABEL_46;
if ( &pthread_create )
{
v114 = v90 - 2;
do
{
v115 = __ldaxr(v114);
v95 = __stlxr(v115 - 1, v114);
}
while ( v95 );
}
else
{
v115 = *(v90 - 2);
*(v90 - 2) = v115 - 1;
}
if ( v115 > 0 )
{
LABEL_46:
if ( v96 )
goto LABEL_54;
}
else
{
operator delete(v98);
if ( v96 )
{
LABEL_54:
if ( a1->m_levelType == Editor )
{
cocos2d::ZipUtils::compressString((cocos2d::ZipUtils *)&a1->m_levelString, nullptr, 11, v95);
sub_D163D4(&a1->m_levelString, &v140);
v116 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v117 = (unsigned int *)((char *)v140 - 8);
do
v118 = __ldaxr(v117);
while ( __stlxr(v118 - 1, v117) );
}
else
{
v118 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v118 - 1;
}
if ( v118 <= 0 )
operator delete(v116);
}
}
else
{
sub_D1798C(&a1->m_levelString, &byte_F288A0, 0);
}
}
}
LABEL_47:
p_m_levelDesc = &a1->m_levelDesc;
sub_D18D28(&v139, p_m_levelDesc);
LevelTools::base64EncodeString((cocos2d::ZipUtils *)&v139, &v140);
sub_D163D4(p_m_levelDesc, &v140);
v100 = (char *)v140 - 24;
if ( (char *)v140 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v119 = (unsigned int *)((char *)v140 - 8);
do
v120 = __ldaxr(v119);
while ( __stlxr(v120 - 1, v119) );
}
else
{
v120 = *((_DWORD *)v140 - 2);
*((_DWORD *)v140 - 2) = v120 - 1;
}
if ( v120 <= 0 )
operator delete(v100);
}
v101 = (void *)(v139 - 24);
if ( (__int64 *)(v139 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v102 = (unsigned int *)(v139 - 8);
do
v103 = __ldaxr(v102);
while ( __stlxr(v103 - 1, v102) );
}
else
{
v103 = *(_DWORD *)(v139 - 8);
*(_DWORD *)(v139 - 8) = v103 - 1;
}
if ( v103 <= 0 )
operator delete(v101);
}
}