//
// PlayLayer::destroyPlayer from 0x140512390 to 0x14051369c (4876 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407d5e30
// > ??> @ 0x14092abfc
//
// This function is hookable on this platform (idp: pc, 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 11:33:32 +0000
//
// Hidden C++ exception states: #wind=22
void __fastcall PlayLayer::destroyPlayer(__int64 a1, _DWORD *a2, __int64 a3)
{
_DWORD *v3; // r13
__int64 v5; // rax
float CurrentPercent; // xmm0_4
unsigned __int64 v7; // rdx
int v8; // r14d
__int64 v9; // rdi
__int64 v10; // rcx
__int64 v11; // r15
int v12; // r12d
__int64 v13; // rbx
__int64 v14; // rcx
int v15; // ecx
int v16; // ecx
__int64 v17; // rcx
__int64 v18; // r8
unsigned __int64 v19; // r9
__int64 v20; // rbx
bool v21; // r15
float v22; // xmm10_4
char v23; // r12
float *v24; // rbx
int v25; // r12d
float v26; // xmm0_4
int v27; // ebx
int v28; // r11d
__int64 v29; // rdi
__int64 v30; // rax
int v31; // ebx
__int64 v32; // rdi
_QWORD *v33; // r12
cocos2d::CCString *v34; // rax
char *CString; // rax
size_t v36; // rbx
size_t v37; // r8
cocos2d::CCString *v38; // rax
char *v39; // rax
__int64 v40; // rcx
float *v41; // rbx
unsigned int v42; // edi
float v43; // xmm0_4
char v44; // dl
bool v45; // al
__int64 v46; // rcx
_DWORD *v47; // rax
int v48; // ebx
_QWORD *v49; // rcx
int v50; // edi
__int64 v51; // rcx
int v52; // r12d
int v53; // ebx
__int64 v54; // rax
double v55; // xmm0_8
_QWORD *v56; // rdi
_QWORD *v57; // rax
_QWORD *v58; // rbx
__int64 v59; // rax
__int64 v60; // rdx
int v61; // ecx
__int64 v62; // rcx
__int64 v63; // rax
__int64 v64; // rcx
float v65; // xmm6_4
__int64 v66; // rbx
struct cocos2d::CCFiniteTimeAction *v67; // rax
struct cocos2d::CCAction *v68; // rdx
float v69; // xmm7_4
__int64 v70; // rcx
__int64 v71; // rcx
char v72; // al
__int64 v73; // rcx
__int64 v74; // rcx
char v75; // bl
char v76; // r14
_DWORD *v77; // rcx
char v78; // al
__int64 v79; // rcx
void **v80; // rax
cocos2d::CCNode *DialogLayer; // r12
__int64 v82; // rax
__int64 v83; // rdi
__int64 v84; // rbx
__int64 v85; // rax
__int64 v86; // rdx
const struct cocos2d::CCPoint *v87; // rax
__int64 v88; // rdi
__int64 v89; // rcx
cocos2d::CCDirector *v90; // rax
float v91; // xmm0_4
__int64 v92; // rbx
__int64 v93; // rax
struct cocos2d::CCActionInterval *v94; // rax
struct cocos2d::CCAction *v95; // rax
float v96; // xmm6_4
struct cocos2d::CCAction *v97; // rax
__int64 v98; // rbx
struct cocos2d::CCFiniteTimeAction *v99; // rax
struct cocos2d::CCSequence *v100; // rbx
char v101; // [rsp+48h] [rbp-C0h]
char v102; // [rsp+48h] [rbp-C0h]
char v103; // [rsp+49h] [rbp-BFh]
int v104; // [rsp+58h] [rbp-B0h] BYREF
__int64 v105; // [rsp+68h] [rbp-A0h]
_QWORD v106[2]; // [rsp+70h] [rbp-98h] BYREF
__int64 v107; // [rsp+80h] [rbp-88h]
__int64 v108; // [rsp+88h] [rbp-80h]
void *v109; // [rsp+90h] [rbp-78h] BYREF
__int128 v110; // [rsp+98h] [rbp-70h] BYREF
__int64 v111; // [rsp+A8h] [rbp-60h]
__int64 v112; // [rsp+B0h] [rbp-58h]
struct __timeb64 Time; // [rsp+B8h] [rbp-50h] BYREF
v3 = a2;
if ( !a2 )
v3 = *(_DWORD **)(a1 + 3512);
if ( *(_BYTE *)(*(_QWORD *)(a1 + 3512) + 2610LL) || *(_BYTE *)(a1 + 13130) )
return;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 14560);
if ( v5 )
{
if ( *(_DWORD *)(a3 + 924) == *(_DWORD *)(v5 + 924) )
{
*(_BYTE *)(a1 + 14680) = 1;
return;
}
}
}
cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 20);
*(_BYTE *)(a1 + 2214) = 1;
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1312LL))(a1);
PlayLayer::commitJumps(a1);
CurrentPercent = PlayLayer::getCurrentPercent(a1);
v8 = (int)floorf(CurrentPercent);
v9 = 0;
if ( v8 < 0 )
v8 = 0;
if ( v8 > 99 )
v8 = 99;
LODWORD(v105) = v8;
if ( !*(_BYTE *)(a1 + 13024) )
goto LABEL_17;
v10 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v10 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v10, "0212") )
{
LABEL_17:
v11 = *(_QWORD *)(a1 + 2408);
if ( *(_QWORD *)(v11 + 320) )
{
v12 = 0;
v13 = *(_QWORD *)(v11 + 608);
v7 = (*(_QWORD *)(v11 + 616) - v13) / 48;
if ( v7 )
{
do
{
if ( !*(_BYTE *)(v9 + v13) )
{
sub_14018CFB0(v106, v9 + v13 + 24);
(***(void (__fastcall ****)(_QWORD, _QWORD, _QWORD, _QWORD *, _DWORD, _DWORD))(v11 + 320))(
*(_QWORD *)(v11 + 320),
*(unsigned int *)(v9 + v13 + 4),
*(unsigned __int8 *)(v9 + v13 + 8),
v106,
*(_DWORD *)(v9 + v13 + 12),
*(_DWORD *)(v9 + v13 + 16));
sub_140069730((__int64)v106);
}
++v12;
v9 += 48;
v13 = *(_QWORD *)(v11 + 608);
v7 = (*(_QWORD *)(v11 + 616) - v13) / 48;
}
while ( v12 < v7 );
v8 = v105;
}
}
}
*(_DWORD *)(a1 + 2156) = 0;
if ( !*(_BYTE *)(a1 + 13024) )
{
v14 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v14 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v14, "0014") )
GJBaseGameLayer::shakeCamera(a1, 0.15000001, 1.0, 0.0);
}
*(_BYTE *)(a1 + 13128) = 1;
if ( !*(_BYTE *)(a1 + 15001) )
{
v15 = *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 332LL);
if ( (v15 == 1 || v15 == 1001) && !*(_BYTE *)(*(_QWORD *)(a1 + 3512) + 2704LL) && *(int *)(a1 + 12644) >= 2 )
PlayLayer::showHint(a1, v7);
if ( !*(_BYTE *)(a1 + 15001) )
{
v16 = *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 332LL);
if ( (v16 == 3 || v16 == 1003) && !*(_BYTE *)(*(_QWORD *)(a1 + 3512) + 2705LL) && *(int *)(a1 + 12644) >= 2 )
PlayLayer::showHint(a1, v7);
}
}
*(_BYTE *)(a1 + 13130) = 1;
if ( (*(_BYTE *)(a1 + 14474) || *(_BYTE *)(a1 + 14476))
&& !(*(unsigned __int8 (__fastcall **)(_QWORD, unsigned __int64))(**(_QWORD **)(a1 + 14448) + 344LL))(
*(_QWORD *)(a1 + 14448),
v7) )
{
PlayLayer::toggleDebugDraw((cocos2d::CCDrawNode **)a1);
}
PlayerObject::playerDestroyed((__int64)v3, 0);
if ( *(_BYTE *)(a1 + 1058) )
{
v20 = *(_QWORD *)(a1 + 3512);
if ( v3[231] == *(_DWORD *)(v20 + 924) )
v20 = *(_QWORD *)(a1 + 3520);
GJBaseGameLayer::playExitDualEffect((_BYTE *)a1, v20);
PlayerObject::playerDestroyed(v20, 1);
}
v21 = 0;
v103 = 0;
v104 = 0;
LODWORD(v105) = 0;
v22 = 0.0;
v23 = 0;
v101 = 0;
if ( *(_BYTE *)(a1 + 2200) )
{
*(_DWORD *)(a1 + 15136) = 0x80000000;
*(_DWORD *)(a1 + 15140) = 0x80000000;
goto LABEL_69;
}
if ( !*(_BYTE *)(a1 + 13024) )
{
v24 = (float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v3 + 200LL))(v3);
v25 = (int)floorf(*v24 / 10.0);
LODWORD(Time.time) = v25;
v26 = floorf(v24[1] / 10.0);
v17 = (unsigned int)(int)v26;
LODWORD(v109) = (int)v26;
v27 = v25;
if ( v25 > 0xFFFF )
v27 = 0xFFFF;
if ( v27 < 0 )
v27 = 0;
v28 = (int)v26;
if ( (int)v17 > 0xFFFF )
v28 = 0xFFFF;
if ( v28 < 0 )
v28 = 0;
v29 = *(_QWORD *)(a1 + 15096);
if ( (unsigned __int64)((*(_QWORD *)(a1 + 15104) - v29) >> 2) < 4 )
{
LABEL_64:
if ( v25 != *(_DWORD *)(a1 + 15136) || (_DWORD)v17 != *(_DWORD *)(a1 + 15140) )
{
v23 = 0;
v101 = 0;
*(_DWORD *)(a1 + 15136) = Time.time;
*(_DWORD *)(a1 + 15140) = v17;
goto LABEL_69;
}
}
else
{
v17 = 0;
v19 = 4;
v18 = *(_QWORD *)(a1 + 15096);
while ( *(_DWORD *)(v17 + v29) != v27 || *(_DWORD *)(v17 + v29 + 4) != v28 )
{
v17 += 16;
v19 += 4LL;
if ( v19 > (*(_QWORD *)(a1 + 15104) - v29) >> 2 )
{
v17 = (unsigned int)v109;
goto LABEL_64;
}
}
}
v23 = 1;
v101 = 1;
}
LABEL_69:
if ( !*(_BYTE *)(a1 + 12670) || *(_BYTE *)(a1 + 15232) )
{
if ( *(_BYTE *)(a1 + 14841) )
goto LABEL_104;
if ( !*(_BYTE *)(a1 + 14842) && !*(_BYTE *)(a1 + 12668) )
{
if ( !*(_BYTE *)(a1 + 13024) && *(int *)(a1 + 992) >= 30 && !v23 )
{
v30 = *(_QWORD *)(a1 + 12912);
v31 = *(_DWORD *)(a1 + 14844);
v32 = *(_QWORD *)(a1 + 2168);
*(_DWORD *)(v32 + 1712) = 2;
if ( v30 )
{
GJGameLevel::dtBumpRun(v17, (size_t *)(v32 + 1752), v31, v8);
v33 = (_QWORD *)(v32 + 1816);
if ( v31 > 100 )
v31 = 100;
if ( v31 < 0 )
v31 = 0;
if ( *(_QWORD *)(v32 + 1832) )
sub_140044D80((_QWORD *)(v32 + 1816), byte_14070ECF8, 1u);
v34 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v31);
CString = (char *)cocos2d::CCString::getCString(v34);
v36 = -1;
v37 = -1;
do
++v37;
while ( CString[v37] );
sub_140044D80((_QWORD *)(v32 + 1816), CString, v37);
if ( *(_QWORD *)(v32 + 1832) )
sub_140044D80(v33, byte_14070ECF8, 1u);
v38 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v8);
v39 = (char *)cocos2d::CCString::getCString(v38);
do
++v36;
while ( v39[v36] );
sub_140044D80(v33, v39, v36);
v23 = v101;
}
else
{
GJGameLevel::dtBumpBucket(v17, (size_t *)(v32 + 1720), v8);
GJGameLevel::dtAppendOrder(v40, (__int64 *)(v32 + 1784), (unsigned int)v8, 1);
*(_BYTE *)(v32 + 1976) = 1;
}
if ( !*(_QWORD *)(a1 + 12912) && v8 > *(_DWORD *)(a1 + 15124) )
*(_DWORD *)(a1 + 15124) = v8;
}
*(_DWORD *)(*(_QWORD *)(a1 + 2168) + 1712LL) = 2;
PlayLayer::dtCommitPlaytime(a1);
}
}
if ( !*(_BYTE *)(a1 + 14841)
&& !*(_BYTE *)(a1 + 14842)
&& !*(_BYTE *)(a1 + 12668)
&& !*(_BYTE *)(a1 + 13024)
&& !*(_QWORD *)(a1 + 12912)
&& *(int *)(a1 + 992) >= 30 )
{
v102 = 1;
if ( !v23 )
{
v41 = (float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v3 + 200LL))(v3);
v42 = (int)floorf(v41[1] / 10.0);
v43 = floorf(*v41 / 10.0);
PlayLayer::dtBumpCell(a1, (unsigned int)(int)v43, v42, (unsigned int)v8);
*(_DWORD *)(*(_QWORD *)(a1 + 2168) + 1712LL) = 2;
*(_BYTE *)(*(_QWORD *)(a1 + 2168) + 1976LL) = 1;
}
goto LABEL_105;
}
LABEL_104:
v102 = 0;
LABEL_105:
if ( *(_BYTE *)(a1 + 13096) || *(_BYTE *)(a1 + 12670) && !*(_BYTE *)(a1 + 15232) )
goto LABEL_131;
v44 = *(_BYTE *)(a1 + 13024);
v45 = false;
if ( !v44 )
{
v21 = v8 > *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 932LL) - *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 928LL);
if ( v8 > *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 936LL) - *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 940LL) )
v45 = true;
}
if ( *(_BYTE *)(a1 + 15316)
&& !v44
&& !v21
&& !v45
&& v8 > *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 948LL) - *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 952LL) )
{
v21 = 1;
v103 = 1;
}
ftime64(&Time);
GJGameLevel::savePercentage(
*(_QWORD *)(a1 + 2168),
v8,
*(_BYTE *)(a1 + 13024),
*(_DWORD *)(a1 + 12640),
(int)((double)Time.millitm / 1000.0 + (double)SLODWORD(Time.time) - *(double *)(a1 + 15408) - *(double *)(a1 + 15416)),
*(_BYTE *)(a1 + 14680));
v47 = *(_DWORD **)(a1 + 2168);
if ( v47[305] == 1 && !*(_BYTE *)(a1 + 12670) )
{
v48 = v47[82] - v47[83];
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
GameManager::reportPercentageForLevel(v46, v48, v8, *(_BYTE *)(a1 + 13024));
}
if ( *(_BYTE *)(a1 + 13024)
|| *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 1020LL) - *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 1024LL) <= 0 )
{
LABEL_131:
v52 = v105;
v50 = v105;
}
else
{
v49 = (_QWORD *)qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Time.time = (__time64_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v49 = (_QWORD *)qword_14090BFE0;
}
v50 = GameStatsManager::awardCurrencyForLevel(v49, *(_QWORD *)(a1 + 2168));
v104 = v50;
if ( GJGameLevel::levelHasDiamonds(*(_QWORD *)(a1 + 2168)) )
{
v51 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Time.time = (__time64_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v51 = qword_14090BFE0;
}
v52 = GameStatsManager::awardDiamondsForLevel(v51, *(_QWORD *)(a1 + 2168));
}
else
{
v52 = v105;
}
}
v53 = v52 + v50;
LODWORD(v105) = v52 + v50;
if ( !*(_BYTE *)(a1 + 13024) )
*(_DWORD *)(a1 + 15320) = v8;
if ( v102 )
{
v54 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v3 + 200LL))(v3);
v55 = PlayLayer::tryShowDeathMarkers(a1, v54, (unsigned int)v8, v21);
v22 = *(float *)&v55;
}
if ( !*(_BYTE *)(a1 + 1302) )
{
if ( !*(_BYTE *)(a1 + 13024) || *(_BYTE *)(a1 + 13025) )
{
if ( !qword_14090BF60 )
{
Time.time = (__time64_t)operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
}
v56 = (_QWORD *)qword_14090BF60;
v57 = *(_QWORD **)(qword_14090BF60 + 328);
v58 = (_QWORD *)*v57;
if ( (_QWORD *)*v57 != v57 )
{
do
{
if ( !*((_BYTE *)v58 + 73) )
{
v59 = FMODAudioEngine::channelForChannelID(v56, *((_DWORD *)v58 + 6));
if ( v59 )
{
LOBYTE(v60) = 1;
FMOD::ChannelControl::setPaused(v59, v60);
}
}
v58 = (_QWORD *)*v58;
}
while ( v58 != (_QWORD *)v56[41] );
}
v53 = v105;
v50 = v104;
}
if ( !qword_14090BF60 )
{
Time.time = (__time64_t)operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
}
FMODAudioEngine::stopAllEffects((_QWORD *)qword_14090BF60);
}
if ( !*(_BYTE *)(a1 + 1308) )
{
Time.time = (__time64_t)v106;
v107 = 14;
v108 = 15;
strcpy((char *)v106, "explode_11.ogg");
HIBYTE(v106[1]) = 0;
v61 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v109 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v109);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v61 = qword_14090BF60;
}
FMODAudioEngine::playEffect(v61, (__int64)v106, v18, v19, 1059481190);
}
v62 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v62 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v62, "0026") && !*(_BYTE *)(a1 + 13024) )
{
if ( (v21 || v53 > 0) && v52 + v50 > 0 )
PlayLayer::showNewBest(a1, !v21, v50, v52, 0, 0, 0);
v63 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v63 = qword_14090BFD0;
}
v64 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v63 + 560) + 13888LL) + 568LL);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v64 + 936LL))(v64, 0);
v65 = 0.5;
if ( *(float *)(a1 + 1304) > 0.5 )
v65 = *(float *)(a1 + 1304);
v66 = cocos2d::CCCallFunc::create(a1, PlayLayer::showRetryLayer);
v67 = cocos2d::CCDelayTime::create(v65);
v68 = cocos2d::CCSequence::create(v67, v66, 0);
goto LABEL_206;
}
*(_BYTE *)(a1 + 15318) = 1;
v69 = 1.0;
v70 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v70 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v70, "0052") )
v69 = 0.5;
if ( v22 > 0.0 )
v69 = v22;
if ( !*(_BYTE *)(a1 + 13024) )
goto LABEL_179;
v71 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v71 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v71, "0212") )
v72 = 1;
else
LABEL_179:
v72 = 0;
if ( *(float *)(a1 + 1304) > v69 && !v72 )
v69 = *(float *)(a1 + 1304);
if ( !v21 && v53 <= 0 )
goto LABEL_192;
v73 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v73 = qword_14090BFD0;
}
if ( GameManager::getUGV(v73, &word_140737FF0) )
goto LABEL_192;
v74 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Time.time = (__time64_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v74 = qword_14090BFE0;
}
if ( (int)GameStatsManager::getStat(v74, &word_140737D98) <= 500 )
LABEL_192:
v75 = 0;
else
v75 = 1;
v76 = v75;
if ( v21 || v52 + v50 > 0 )
{
v77 = (_DWORD *)qword_14090BFE0;
if ( !qword_14090BFE0 )
{
Time.time = (__time64_t)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v77 = (_DWORD *)qword_14090BFE0;
}
v78 = GameStatsManager::awardSecretKey(v77);
PlayLayer::showNewBest(a1, !v21, v50, v52, v78, v75, v103);
v69 = fmaxf(v69, 1.4);
if ( v52 + v50 > 0 )
v76 = 1;
}
if ( v75 )
{
v79 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
Time.time = (__time64_t)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(Time.time);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v79 = qword_14090BFD0;
}
GameManager::setUGV(v79, &word_140737FF0, 1u);
Time.time = (__time64_t)&v110;
LOWORD(v104) = -1;
BYTE2(v104) = -1;
v110 = 0;
v111 = 0;
v112 = 0;
*(_QWORD *)&v110 = sub_14003D460(0x50u);
v111 = 71;
v112 = 79;
strcpy((char *)v110, "I see you have a lot of orbs. You should visit my shop!");
v107 = 14;
v108 = 15;
strcpy((char *)v106, "The Shopkeeper");
HIBYTE(v106[1]) = 0;
v80 = DialogObject::create((__int64)v106, (__int64)&v110, 5, 1.0, 0, (__int64)&v104);
DialogLayer = DialogLayer::createDialogLayer((__int64)v80, 0, 1u);
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, DialogLayer, 100);
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)DialogLayer + 51) + 40LL))((__int64)DialogLayer + 408, 0);
*((_QWORD *)DialogLayer + 78) = a1 + 14664;
v82 = cocos2d::CCDirector::sharedDirector(a1 + 14664);
cocos2d::CCDirector::getWinSize(v82, &Time);
v83 = **((_QWORD **)DialogLayer + 70);
v84 = *((_QWORD *)DialogLayer + 70);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v109,
*(float *)&Time.time * 0.5,
(float)(*((float *)&Time.time + 1) - 50.0) - 20.0);
(*(void (__fastcall **)(__int64, __int64))(v83 + 184))(v84, v85);
LOBYTE(v86) = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)DialogLayer + 336LL))(DialogLayer, v86);
ftime64(&Time);
*((double *)DialogLayer + 69) = (double)Time.millitm / 1000.0 + (double)SLODWORD(Time.time);
v87 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)DialogLayer + 70) + 200LL))(*((_QWORD *)DialogLayer + 70));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&Time, v87);
v88 = **((_QWORD **)DialogLayer + 70);
v90 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v89);
v91 = (float)(cocos2d::CCDirector::getScreenTop(v90) + 50.0) + 1.0;
v92 = *((_QWORD *)DialogLayer + 70);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v109, *(float *)&Time.time, v91);
(*(void (__fastcall **)(__int64, __int64))(v88 + 184))(v92, v93);
v94 = cocos2d::CCMoveTo::create(0.5, (const struct cocos2d::CCPoint *)&Time);
v95 = cocos2d::CCEaseElasticOut::create(v94, 0.60000002);
cocos2d::CCNode::runAction(*((cocos2d::CCNode **)DialogLayer + 70), v95);
v96 = (float)(*(unsigned __int8 (__fastcall **)(__int64))(*((_QWORD *)DialogLayer + 51) + 32LL))((__int64)DialogLayer + 408);
if ( v96 > 0.0 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)DialogLayer + 51) + 40LL))((__int64)DialogLayer + 408, 0);
v97 = cocos2d::CCFadeTo::create(0.14, (int)v96);
cocos2d::CCNode::runAction(DialogLayer, v97);
}
}
cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 16);
if ( !v76 )
{
v98 = cocos2d::CCCallFunc::create(a1, PlayLayer::delayedResetLevel);
v99 = cocos2d::CCDelayTime::create(v69);
v100 = cocos2d::CCSequence::create(v99, v98, 0);
(*(void (__fastcall **)(struct cocos2d::CCSequence *, __int64))(*(_QWORD *)v100 + 64LL))(v100, 16);
v68 = v100;
LABEL_206:
cocos2d::CCNode::runAction((cocos2d::CCNode *)a1, v68);
}
}