//
// SecretLayer4::onSubmit from 0x140586620 to 0x140587ad2 (5298 bytes)
//
// 2 xrefs:
// > SecretLayer4::init @ 0x140586138
// > ??> @ 0x14092ca50
//
// 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:34:28 +0000
//
// Hidden C++ exception states: #wind=11
void __fastcall SecretLayer4::onSubmit(__int64 a1)
{
__int64 v2; // rcx
_BYTE *v3; // rax
size_t v4; // r8
__int64 v5; // rcx
void **v6; // rsi
__int64 v7; // rbx
unsigned __int64 v8; // r15
unsigned __int64 v9; // r10
unsigned __int64 v10; // rdx
unsigned int v11; // r15d
__int64 v12; // rsi
void **v13; // rcx
void **v14; // rbx
size_t v15; // rsi
unsigned __int64 v16; // r15
unsigned __int64 v17; // r8
unsigned __int64 v18; // rcx
unsigned __int64 v19; // rbx
void **v20; // r9
void **v21; // rcx
unsigned __int64 v22; // rax
unsigned __int64 v23; // rbx
char *v24; // r9
void *v25; // rcx
void *v26; // rcx
void **v27; // rcx
void **v28; // r15
unsigned __int64 v29; // r12
unsigned __int64 v30; // rbx
size_t v31; // r8
__int64 v32; // rdx
__int64 v33; // r8
int v34; // r13d
__int64 v35; // rbx
cocos2d::CCString *v36; // rax
__int64 v37; // rcx
int v38; // ebx
__int64 v39; // r8
unsigned __int64 v40; // rdx
void *v41; // r8
__int64 v42; // rsi
__int64 v43; // rbx
cocos2d::CCString *v44; // rax
int v45; // ebx
void *v46; // r8
__int64 v47; // rdx
__int64 v48; // rcx
__int64 v49; // r8
__int64 v50; // rax
void **v51; // rcx
size_t v52; // r8
__int64 v53; // rdx
int v54; // esi
__int64 v55; // r8
__int64 v56; // rbx
cocos2d::CCString *v57; // rax
__int64 v58; // rcx
int v59; // ebx
__int64 v60; // r8
unsigned __int64 v61; // rdx
void *v62; // r8
__int64 v63; // rsi
__int64 v64; // rbx
cocos2d::CCString *v65; // rax
int v66; // ebx
void *v67; // r8
__int64 v68; // rdx
__int64 v69; // rcx
__int64 v70; // r8
__int64 v71; // rax
void (__fastcall ***v72)(_QWORD, void **); // rcx
char v73; // si
void **v74; // rcx
size_t v75; // r8
unsigned __int64 v76; // rdx
__int64 v77; // rcx
__int64 v78; // r8
char *v79; // r13
void **v80; // rcx
size_t v81; // r8
char *v82; // rax
__int64 v83; // rbx
cocos2d::CCString *v84; // rax
__int64 v85; // rcx
int v86; // ebx
__int64 v87; // r8
unsigned __int64 v88; // rdx
void *v89; // r8
__int64 v90; // rsi
__int64 v91; // rbx
cocos2d::CCString *v92; // rax
int v93; // ebx
void *v94; // r8
__int64 v95; // rdx
__int64 v96; // rcx
__int64 v97; // r8
__int64 v98; // rax
_QWORD *v99; // rdx
void **v100; // rcx
size_t v101; // r8
__int64 v102; // rdx
__int64 v103; // r8
int v104; // r13d
__int64 v105; // rbx
cocos2d::CCString *v106; // rax
__int64 v107; // rcx
int v108; // ebx
__int64 v109; // r8
unsigned __int64 v110; // rdx
void *v111; // r8
__int64 v112; // rsi
__int64 v113; // rbx
cocos2d::CCString *v114; // rax
int v115; // ebx
void *v116; // r8
__int64 v117; // rax
__int64 v118; // rdx
__int64 v119; // rcx
__int64 v120; // r8
__int64 v121; // rax
char v122; // si
void **v123; // rcx
size_t v124; // r8
unsigned __int64 v125; // rdx
__int64 v126; // r8
__int64 v127; // r13
void **v128; // rcx
size_t v129; // r8
__int64 v130; // rax
__int64 v131; // rbx
cocos2d::CCString *v132; // rax
int v133; // ebx
void *v134; // r8
__int64 v135; // rax
const char *v136; // rdx
void **v137; // rcx
size_t v138; // r8
__int64 v139; // rdx
__int64 v140; // rcx
int v141; // esi
__int64 v142; // r8
__int64 v143; // rax
bool v144; // bl
__int64 v145; // rdx
__int64 v146; // rcx
__int64 v147; // r8
__int64 v148; // rax
_QWORD *ErrorMessage; // rax
__int16 *v150; // rdx
int v151; // ebx
_QWORD *Message; // rax
void *v153; // [rsp+30h] [rbp-69h] BYREF
bool v154; // [rsp+38h] [rbp-61h]
void *Buf2[2]; // [rsp+40h] [rbp-59h] BYREF
__int64 v156; // [rsp+50h] [rbp-49h]
unsigned __int64 v157; // [rsp+58h] [rbp-41h]
void *Block[2]; // [rsp+60h] [rbp-39h] BYREF
unsigned __int64 v159; // [rsp+70h] [rbp-29h]
unsigned __int64 v160; // [rsp+78h] [rbp-21h]
void *Buf1[2]; // [rsp+80h] [rbp-19h] BYREF
unsigned __int64 v162; // [rsp+90h] [rbp-9h]
unsigned __int64 v163; // [rsp+98h] [rbp-1h]
void *Src[2]; // [rsp+A0h] [rbp+7h] BYREF
unsigned __int64 v165; // [rsp+B0h] [rbp+17h]
unsigned __int64 v166; // [rsp+B8h] [rbp+1Fh]
LODWORD(v153) = 0;
v2 = *(_QWORD *)(*(_QWORD *)(a1 + 456) + 592LL) + 600LL;
v3 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 8LL))(v2);
*(_OWORD *)Src = 0;
v165 = 0;
v166 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003D230(Src, v3, v4);
*(_OWORD *)Buf1 = 0;
v162 = 0;
v163 = 0;
v6 = Src;
if ( v166 > 0xF )
v6 = (void **)Src[0];
v7 = 0x7FFFFFFFFFFFFFFFLL;
v8 = v165;
if ( v165 > 0x7FFFFFFFFFFFFFFFLL )
sub_140009D90(v5);
if ( v165 > 0xF )
{
if ( (v165 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v7 = v165 | 0xF;
if ( (v165 | 0xF) < 0x16 )
v7 = 22;
}
Buf1[0] = sub_14003D460(v7 + 1);
v162 = v8;
v163 = v7;
memcpy(Buf1[0], v6, v8 + 1);
v10 = v7;
v9 = v8;
}
else
{
v9 = v165;
v162 = v165;
v10 = 15;
v163 = 15;
*(_OWORD *)Buf1 = *(_OWORD *)v6;
}
v11 = 0;
if ( v9 )
{
v12 = 0;
do
{
v13 = Buf1;
if ( v10 > 0xF )
v13 = (void **)Buf1[0];
v14 = Buf1;
if ( v10 > 0xF )
v14 = (void **)Buf1[0];
*((_BYTE *)v14 + v12) = tolower(*((char *)v13 + v12));
v12 = ++v11;
v9 = v162;
v10 = v163;
}
while ( v11 < v162 );
}
*(_OWORD *)Buf2 = 0;
v15 = 0;
v156 = 0;
v16 = 15;
v157 = 15;
LOBYTE(Buf2[0]) = 0;
*(_OWORD *)Block = 0;
v17 = 1;
v159 = 1;
v18 = 15;
v160 = 15;
LOWORD(Block[0]) = (unsigned __int8)asc_1406ED6E4[0];
v19 = 0;
while ( 1 )
{
v20 = Block;
if ( v18 > 0xF )
v20 = (void **)Block[0];
v21 = Buf1;
if ( v10 > 0xF )
v21 = (void **)Buf1[0];
v22 = sub_14003EFB0((__int64)v21, v9, v19, (__int64)v20, v17);
v23 = v22;
if ( v22 == -1 )
break;
v24 = (char *)Buf2;
if ( v16 > 0xF )
v24 = (char *)Buf2[0];
sub_140045CE0(Buf1, v22, v159, v24, v15);
v15 = v156;
v19 = v156 + v23;
v10 = v163;
v9 = v162;
v16 = v157;
v18 = v160;
v17 = v159;
}
if ( v160 > 0xF )
{
v25 = Block[0];
if ( v160 + 1 >= 0x1000 )
{
v25 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v25 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v25);
}
v159 = 0;
v160 = 15;
LOBYTE(Block[0]) = 0;
if ( v16 > 0xF )
{
v26 = Buf2[0];
if ( v16 + 1 >= 0x1000 )
{
v26 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v26 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v26);
}
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 15;
LOBYTE(Buf2[0]) = 0;
CCTextInputNode::setString(*(_QWORD **)(a1 + 456), Buf2);
Buf2[1] = nullptr;
v156 = 8;
v157 = 15;
Buf2[0] = (void *)0x7373656E6B726164LL;
v27 = Buf1;
v28 = (void **)Buf1[0];
v29 = v163;
if ( v163 > 0xF )
v27 = (void **)Buf1[0];
v30 = v162;
v31 = v162;
if ( v162 > 8 )
v31 = 8;
v34 = memcmp(v27, Buf2, v31);
if ( !v34 )
{
if ( v30 >= 8 )
v34 = v30 > 8;
else
v34 = -1;
}
if ( v34 )
{
Buf2[1] = nullptr;
v156 = 7;
v157 = 15;
Buf2[0] = (void *)0x65636E656C6973LL;
v51 = Buf1;
if ( v29 > 0xF )
v51 = v28;
v52 = v30;
if ( v30 > 7 )
v52 = 7;
v54 = memcmp(v51, Buf2, v52);
if ( !v54 )
{
if ( v30 >= 7 )
v54 = v30 > 7;
else
v54 = -1;
}
if ( !v54 )
{
v56 = AchievementManager::sharedState(15, v53, v55);
*(_OWORD *)Block = 0;
v159 = 0;
v160 = 0;
Block[0] = sub_14003D460(0x20u);
v159 = 24;
v160 = 31;
strcpy((char *)Block[0], "geometry.ach.v3.secret02");
v57 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v56 + 352), Block);
v59 = cocos2d::CCString::intValue(v57);
v61 = v160;
if ( v160 > 0xF )
{
v62 = Block[0];
if ( v160 + 1 >= 0x1000 )
{
v62 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v62 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v62);
}
v159 = 0;
v160 = 15;
LOBYTE(Block[0]) = 0;
if ( v59 < 100 )
{
v63 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v153 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v153);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v63 = qword_14090BFD0;
}
v64 = AchievementManager::sharedState(v58, v61, v60);
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret02");
v65 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v64 + 352), Buf2);
v66 = cocos2d::CCString::intValue(v65);
if ( v157 > 0xF )
{
v67 = Buf2[0];
if ( v157 + 1 >= 0x1000 )
{
v67 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v67 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v67);
}
if ( v66 < 100 )
{
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret02");
GameManager::completedAchievement(v63, (__int64)Buf2);
v71 = AchievementManager::sharedState(v69, v68, v70);
AchievementManager::reportAchievementWithID(v71, (__int64)"geometry.ach.v3.secret02", 100);
}
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 28;
v157 = 31;
strcpy((char *)Buf2[0], "Something you always ruin...");
goto LABEL_88;
}
goto LABEL_201;
}
*(_OWORD *)Buf2 = 0;
v156 = 5;
v157 = 15;
strcpy((char *)Buf2, "river");
v73 = 17;
v74 = Buf1;
if ( v29 > 0xF )
v74 = v28;
v75 = v30;
if ( v30 > 5 )
v75 = 5;
if ( !memcmp(v74, Buf2, v75) && v30 == 5 )
{
v79 = (char *)Block[0];
v154 = 1;
}
else
{
*(_OWORD *)Block = 0;
v159 = 6;
v160 = 15;
strcpy((char *)Block, "ariver");
v73 = 19;
v79 = (char *)Block[0];
v80 = Buf1;
if ( v29 > 0xF )
v80 = v28;
v81 = v30;
if ( v30 > 6 )
v81 = 6;
v154 = !memcmp(v80, Block, v81) && v30 == 6;
}
if ( (v73 & 2) != 0 )
{
v73 &= ~2u;
v76 = v160;
if ( v160 > 0xF )
{
v82 = v79;
if ( v160 + 1 >= 0x1000 )
{
v79 = *((char **)v79 - 1);
if ( (unsigned __int64)(v82 - v79 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v79);
v29 = v163;
v30 = v162;
v28 = (void **)Buf1[0];
}
}
if ( (v73 & 1) != 0 )
v73 &= ~1u;
if ( v154 )
{
v83 = AchievementManager::sharedState(v77, v76, v78);
*(_OWORD *)Block = 0;
v159 = 0;
v160 = 0;
Block[0] = sub_14003D460(0x20u);
v159 = 24;
v160 = 31;
strcpy((char *)Block[0], "geometry.ach.v3.secret03");
v84 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v83 + 352), Block);
v86 = cocos2d::CCString::intValue(v84);
v88 = v160;
if ( v160 > 0xF )
{
v89 = Block[0];
if ( v160 + 1 >= 0x1000 )
{
v89 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v89 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v89);
}
v159 = 0;
v160 = 15;
LOBYTE(Block[0]) = 0;
if ( v86 >= 100 )
goto LABEL_201;
v90 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v153 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v153);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v90 = qword_14090BFD0;
}
v91 = AchievementManager::sharedState(v85, v88, v87);
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret03");
v92 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v91 + 352), Buf2);
v93 = cocos2d::CCString::intValue(v92);
if ( v157 > 0xF )
{
v94 = Buf2[0];
if ( v157 + 1 >= 0x1000 )
{
v94 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v94 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v94);
}
if ( v93 < 100 )
{
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret03");
GameManager::completedAchievement(v90, (__int64)Buf2);
v98 = AchievementManager::sharedState(v96, v95, v97);
AchievementManager::reportAchievementWithID(v98, (__int64)"geometry.ach.v3.secret03", 100);
}
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 23;
v157 = 31;
strcpy((char *)Buf2[0], "Be like water my friend");
v99 = Buf2;
LABEL_195:
SecretLayer2::updateMessageLabel(a1, v99);
LOWORD(v153) = -256;
BYTE2(v153) = -1;
(**(void (__fastcall ***)(__int64, void **))(*(_QWORD *)(a1 + 464) + 368LL))(*(_QWORD *)(a1 + 464) + 368LL, &v153);
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 464), 400.0, 0.80000001, 0.0);
*(_DWORD *)(a1 + 440) = 0;
goto LABEL_205;
}
*(_OWORD *)Buf2 = 0;
v156 = 6;
v157 = 15;
strcpy((char *)Buf2, "hunger");
v100 = Buf1;
if ( v29 > 0xF )
v100 = v28;
v101 = v30;
if ( v30 > 6 )
v101 = 6;
v104 = memcmp(v100, Buf2, v101);
if ( !v104 )
{
if ( v30 >= 6 )
v104 = v30 > 6;
else
v104 = -1;
}
if ( !v104 )
{
v105 = AchievementManager::sharedState(15, v102, v103);
*(_OWORD *)Block = 0;
v159 = 0;
v160 = 0;
Block[0] = sub_14003D460(0x20u);
v159 = 24;
v160 = 31;
strcpy((char *)Block[0], "geometry.ach.v3.secret04");
v106 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v105 + 352), Block);
v108 = cocos2d::CCString::intValue(v106);
v110 = v160;
if ( v160 > 0xF )
{
v111 = Block[0];
if ( v160 + 1 >= 0x1000 )
{
v111 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v111 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v111);
}
v159 = 0;
v160 = 15;
LOBYTE(Block[0]) = 0;
if ( v108 >= 100 )
goto LABEL_201;
v112 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v153 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v153);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v112 = qword_14090BFD0;
}
v113 = AchievementManager::sharedState(v107, v110, v109);
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret04");
v114 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v113 + 352), Buf2);
v115 = cocos2d::CCString::intValue(v114);
if ( v157 > 0xF )
{
v116 = Buf2[0];
if ( v157 + 1 >= 0x1000 )
{
v116 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v116 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v116);
}
if ( v115 < 100 )
{
v117 = sub_14003D1F0((__int64)Buf2, (__int64)"geometry.ach.v3.secret04");
GameManager::completedAchievement(v112, v117);
v121 = AchievementManager::sharedState(v119, v118, v120);
AchievementManager::reportAchievementWithID(v121, (__int64)"geometry.ach.v3.secret04", 100);
}
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 21;
v157 = 31;
strcpy((char *)Buf2[0], "A pizza would be nice");
v99 = Buf2;
goto LABEL_195;
}
Block[1] = nullptr;
v159 = 7;
v160 = 15;
Block[0] = (void *)0x6F6E61636C6F76LL;
v122 = v73 | 4;
v123 = Buf1;
if ( v29 > 0xF )
v123 = v28;
v124 = v30;
if ( v30 > 7 )
v124 = 7;
if ( !memcmp(v123, Block, v124) && v30 == 7 )
{
v127 = (__int64)Buf2[0];
v154 = 1;
}
else
{
Buf2[1] = nullptr;
v156 = 8;
v157 = 15;
v127 = 0x6F6E61636C6F7661LL;
Buf2[0] = (void *)0x6F6E61636C6F7661LL;
v122 |= 8u;
v128 = Buf1;
if ( v29 > 0xF )
v128 = v28;
v129 = v30;
if ( v30 > 8 )
v129 = 8;
v154 = !memcmp(v128, Buf2, v129) && v30 == 8;
}
if ( (v122 & 8) != 0 )
{
v125 = v157;
if ( v157 > 0xF )
{
v130 = v127;
if ( v157 + 1 >= 0x1000 )
{
v127 = *(_QWORD *)(v127 - 8);
if ( (unsigned __int64)(v130 - v127 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free((void *)v127);
v29 = v163;
v30 = v162;
v28 = (void **)Buf1[0];
}
}
if ( v154 )
{
v131 = AchievementManager::sharedState(15, v125, v126);
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret05");
v132 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v131 + 352), Buf2);
v133 = cocos2d::CCString::intValue(v132);
if ( v157 > 0xF )
{
v134 = Buf2[0];
if ( v157 + 1 >= 0x1000 )
{
v134 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v134 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v134);
}
if ( v133 >= 100 )
goto LABEL_201;
v135 = GameManager::sharedState();
GameManager::reportAchievementWithID(v135, "geometry.ach.v3.secret05", 100);
v136 = "Hot answer, well done";
goto LABEL_194;
}
v156 = 11;
v157 = 15;
Buf2[0] = (void *)0x72746E6F6B636162LL;
Buf2[1] = (void *)7037793;
v137 = Buf1;
if ( v29 > 0xF )
v137 = v28;
v138 = v30;
if ( v30 > 0xB )
v138 = 11;
v141 = memcmp(v137, Buf2, v138);
if ( !v141 )
{
if ( v30 >= 0xB )
v141 = v30 > 0xB;
else
v141 = -1;
}
if ( v141 )
{
sub_14003D1F0((__int64)Buf2, (__int64)"givemehelper");
v144 = Current_set(Buf1, Buf2);
sub_14003D310((__int64)Buf2);
if ( v144 )
{
AchievementManager::sharedState(v146, v145, v147);
if ( !AchievementManager::isAchievementEarned() )
{
v148 = GameManager::sharedState();
GameManager::reportAchievementWithID(v148, "geometry.ach.v3.secret07", 100);
v136 = "Is that even a real thing...";
goto LABEL_194;
}
}
else if ( v165 )
{
ErrorMessage = (_QWORD *)SecretLayer2::getErrorMessage(a1, (__int64)Buf2);
SecretLayer2::updateMessageLabel(a1, ErrorMessage);
*(_DWORD *)(a1 + 440) = 0;
LOWORD(v153) = -26881;
BYTE2(v153) = 0;
v150 = (__int16 *)&v153;
LABEL_204:
(**(void (__fastcall ***)(__int64, __int16 *))(*(_QWORD *)(a1 + 464) + 368LL))(
*(_QWORD *)(a1 + 464) + 368LL,
v150);
goto LABEL_205;
}
}
else
{
AchievementManager::sharedState(v140, v139, v142);
if ( !AchievementManager::isAchievementEarned() )
{
v143 = GameManager::sharedState();
GameManager::reportAchievementWithID(v143, "geometry.ach.v3.secret06", 100);
v136 = "That's some skill";
LABEL_194:
v99 = (_QWORD *)sub_14003D1F0((__int64)Buf2, (__int64)v136);
goto LABEL_195;
}
}
LABEL_201:
v151 = *(_DWORD *)(a1 + 440);
Message = (_QWORD *)SecretLayer4::getMessage(a1, Buf2);
SecretLayer2::updateMessageLabel(a1, Message);
if ( v151 > 0 || (v150 = &word_140704650, *(int *)(a1 + 440) > 0) )
v150 = (__int16 *)&unk_140704654;
goto LABEL_204;
}
v35 = AchievementManager::sharedState(15, v32, v33);
*(_OWORD *)Block = 0;
v159 = 0;
v160 = 0;
Block[0] = sub_14003D460(0x20u);
v159 = 24;
v160 = 31;
strcpy((char *)Block[0], "geometry.ach.v3.secret01");
v36 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v35 + 352), Block);
v38 = cocos2d::CCString::intValue(v36);
v40 = v160;
if ( v160 > 0xF )
{
v41 = Block[0];
if ( v160 + 1 >= 0x1000 )
{
v41 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v41 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v41);
}
v159 = 0;
v160 = 15;
LOBYTE(Block[0]) = 0;
if ( v38 >= 100 )
goto LABEL_201;
v42 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v153 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v153);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v42 = qword_14090BFD0;
}
v43 = AchievementManager::sharedState(v37, v40, v39);
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret01");
v44 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v43 + 352), Buf2);
v45 = cocos2d::CCString::intValue(v44);
if ( v157 > 0xF )
{
v46 = Buf2[0];
if ( v157 + 1 >= 0x1000 )
{
v46 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v46 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v46);
}
if ( v45 < 100 )
{
*(_OWORD *)Buf2 = 0;
v156 = 0;
v157 = 0;
Buf2[0] = sub_14003D460(0x20u);
v156 = 24;
v157 = 31;
strcpy((char *)Buf2[0], "geometry.ach.v3.secret01");
GameManager::completedAchievement(v42, (__int64)Buf2);
v50 = AchievementManager::sharedState(v48, v47, v49);
AchievementManager::reportAchievementWithID(v50, (__int64)"geometry.ach.v3.secret01", 100);
}
Buf2[1] = (void *)25974;
v156 = 10;
v157 = 15;
Buf2[0] = (void *)0x6973736572706D49LL;
LABEL_88:
SecretLayer2::updateMessageLabel(a1, Buf2);
LOWORD(v153) = -256;
v72 = (void (__fastcall ***)(_QWORD, void **))(*(_QWORD *)(a1 + 464) + 368LL);
LOWORD(v153) = -256;
BYTE2(v153) = -1;
(**v72)(v72, &v153);
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 464), 400.0, 0.80000001, 0.0);
*(_DWORD *)(a1 + 440) = 0;
LABEL_205:
sub_14003D310((__int64)Buf1);
sub_14003D310((__int64)Src);
}