//
// SecretLayer::onSubmit from 0x1005fb960 to 0x1005fcb1c (4540 bytes)
//
// 1 xrefs:
// > SecretLayer::init @ 0x1005fb458
//
// 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 __fastcall SecretLayer::onSubmit(SecretLayer *a1, cocos2d::CCObject *a2)
{
__m128 v2; // xmm0
bool v3; // al
unsigned int v4; // ebx
std::string::size_type v5; // r15
std::string::pointer data; // rcx
char v7; // al
std::string::pointer v8; // rcx
GameManager *v9; // rax
std::string *p_m_playerName; // rax
bool v11; // al
unsigned int v12; // ebx
unsigned __int64 v13; // r15
__int8 *v14; // rcx
char v15; // al
__int8 *v16; // rcx
std::string::pointer v17; // rbx
unsigned __int128 v18; // kr10_16
unsigned __int8 v19; // r13
std::string::size_type v20; // rax
size_t v21; // rdx
_BYTE *v22; // r12
void *v23; // rax
_BYTE *v24; // rax
std::string::size_type v25; // rax
const std::string::value_type *v26; // rcx
std::string::size_type v27; // r8
std::string::size_type v28; // r14
__int64 v29; // rax
std::string::size_type v30; // rcx
unsigned int v31; // r12d
SecretLayer *v32; // r12
CCTextInputNode *m_searchInput; // rdi
std::string::size_type size; // r13
size_t v35; // r15
AchievementManager *v36; // rax
GameManager *v37; // rax
void *v38; // rdi
size_t v39; // r12
AchievementManager *v40; // rax
FMODAudioEngine *v41; // rax
GameManager *v42; // rax
GameStatsManager *v43; // rax
GameStatsManager *v44; // rax
AchievementManager *v45; // rax
GameManager *v46; // rax
char *v47; // r14
size_t v48; // rdx
int v49; // eax
AchievementManager *v50; // rax
GameManager *v51; // rax
size_t v52; // rdx
AchievementManager *v53; // rax
GameManager *v54; // rax
char v55; // r14
AchievementManager *v56; // rax
int m_selectedThread; // r14d
std::string::pointer v58; // rsi
int v59; // eax
cocos2d::CCLabelBMFont *v60; // rdi
void *v61; // rsi
GameManager *v62; // rax
char v63; // r14
AchievementManager *v64; // rax
GameManager *v65; // rax
char v66; // r14
AchievementManager *v67; // rax
GameManager *v68; // rax
char v69; // r14
AchievementManager *v70; // rax
GameManager *v71; // rax
const char *v72; // rsi
char v73; // r14
AchievementManager *v74; // rax
GameManager *v75; // rax
char v76; // r14
AchievementManager *v77; // rax
GameManager *v78; // rax
AchievementManager *v79; // rax
char v80; // r14
char v81; // r14
bool v82; // zf
void **v83; // rax
char v84; // r14
char v85; // r14
char v86; // r14
SecretLayer *v87; // rbx
char v88; // r14
SecretLayer *v89; // rax
cocos2d::CCLabelBMFont *m_messageLabel; // rdi
GameManager *v91; // rax
void *v92[3]; // [rsp+0h] [rbp-270h] BYREF
__int16 v93[8]; // [rsp+18h] [rbp-258h] BYREF
void *v94; // [rsp+28h] [rbp-248h]
_QWORD v95[3]; // [rsp+30h] [rbp-240h] BYREF
_QWORD v96[3]; // [rsp+48h] [rbp-228h] BYREF
_QWORD v97[3]; // [rsp+60h] [rbp-210h] BYREF
_QWORD v98[3]; // [rsp+78h] [rbp-1F8h] BYREF
_QWORD v99[3]; // [rsp+90h] [rbp-1E0h] BYREF
_QWORD v100[3]; // [rsp+A8h] [rbp-1C8h] BYREF
void *v101[3]; // [rsp+C0h] [rbp-1B0h] BYREF
_BYTE v102[16]; // [rsp+D8h] [rbp-198h] BYREF
char v103; // [rsp+E8h] [rbp-188h] BYREF
_QWORD v104[2]; // [rsp+F0h] [rbp-180h] BYREF
char v105; // [rsp+100h] [rbp-170h] BYREF
_QWORD v106[2]; // [rsp+108h] [rbp-168h] BYREF
char v107; // [rsp+118h] [rbp-158h] BYREF
_QWORD v108[2]; // [rsp+120h] [rbp-150h] BYREF
char v109; // [rsp+130h] [rbp-140h] BYREF
_QWORD v110[2]; // [rsp+138h] [rbp-138h] BYREF
char v111; // [rsp+148h] [rbp-128h] BYREF
_QWORD v112[2]; // [rsp+150h] [rbp-120h] BYREF
char v113; // [rsp+160h] [rbp-110h] BYREF
char v114; // [rsp+168h] [rbp-108h]
_BYTE v115[23]; // [rsp+169h] [rbp-107h] BYREF
_BYTE v116[24]; // [rsp+180h] [rbp-F0h] BYREF
void *v117[3]; // [rsp+198h] [rbp-D8h] BYREF
std::string v118; // [rsp+1B0h] [rbp-C0h] BYREF
void **v119; // [rsp+1C8h] [rbp-A8h]
__m128 v120; // [rsp+1D0h] [rbp-A0h] BYREF
void *v121; // [rsp+1E0h] [rbp-90h]
void **v122; // [rsp+1E8h] [rbp-88h]
__m128 v123; // [rsp+1F0h] [rbp-80h] BYREF
void *longStorage; // [rsp+200h] [rbp-70h]
int m_doomedIndex; // [rsp+20Ch] [rbp-64h]
std::string v126; // [rsp+210h] [rbp-60h] BYREF
SecretLayer *v127; // [rsp+228h] [rbp-48h]
__int128 __s; // [rsp+230h] [rbp-40h] BYREF
void *__p; // [rsp+240h] [rbp-30h]
CCTextInputNode::getString(&v120, (__int64)a1->m_searchInput, *(double *)v2.i64);
if ( (v120.i8[0] & 1) != 0 )
{
sub_100006B70(&v126, v121, v120.u64[1], *(double *)v2.i64);
}
else
{
v126.__r_.__value_.__r.__words[2] = (std::string::size_type)v121;
v2 = v120;
*(__m128 *)&v126.__r_.__value_.__l.0 = v120;
}
v3 = (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0;
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) != 0 )
{
if ( !v126.__r_.__value_.__l.__size_ )
goto LABEL_16;
}
else if ( !(*(_BYTE *)&v126.__r_.__value_.__l.0 >> 1) )
{
goto LABEL_16;
}
v4 = 1;
v5 = 0;
do
{
while ( 1 )
{
data = v126.__r_.__value_.__s.__data_;
if ( !v3 )
data = v126.__r_.__value_.__l.__data_;
v7 = __tolower(data[v5]);
v8 = v126.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) != 0 )
v8 = v126.__r_.__value_.__l.__data_;
v8[v5] = v7;
v3 = (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0;
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0 )
break;
v5 = v4++;
if ( v126.__r_.__value_.__l.__size_ <= v5 )
goto LABEL_16;
}
v5 = v4++;
}
while ( *(_BYTE *)&v126.__r_.__value_.__l.0 >> 1 > v5 );
LABEL_16:
v9 = GameManager::sharedState();
if ( (v9->m_playerName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v123,
v9->m_playerName.m_data.m_long.longStorage,
v9->m_playerName.m_data.m_long.size,
*(double *)v2.i64);
}
else
{
p_m_playerName = &v9->m_playerName;
longStorage = p_m_playerName->m_data.m_long.longStorage;
v2 = *(__m128 *)&p_m_playerName->m_data.m_short.sizex2;
v123 = *(__m128 *)&p_m_playerName->m_data.m_short.sizex2;
}
v11 = (v123.i8[0] & 1) == 0;
if ( (v123.i8[0] & 1) != 0 )
{
if ( !v123.i64[1] )
goto LABEL_31;
}
else if ( !(v123.u8[0] >> 1) )
{
goto LABEL_31;
}
v12 = 1;
v13 = 0;
do
{
while ( 1 )
{
v14 = &v123.i8[1];
if ( !v11 )
v14 = (__int8 *)longStorage;
v15 = __tolower(v14[v13]);
v16 = &v123.i8[1];
if ( (v123.i8[0] & 1) != 0 )
v16 = (__int8 *)longStorage;
v16[v13] = v15;
v11 = (v123.i8[0] & 1) == 0;
if ( (v123.i8[0] & 1) == 0 )
break;
v13 = v12++;
if ( v123.i64[1] <= v13 )
goto LABEL_31;
}
v13 = v12++;
}
while ( v123.u8[0] >> 1 > v13 );
LABEL_31:
v127 = a1;
LOWORD(__s) = 0;
v17 = v126.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) != 0 )
v18 = *(_OWORD *)&v126.__r_.__value_.__r.__words[1];
else
v18 = __PAIR128__((std::string *)((char *)&v126.__r_.__value_.__l.0 + 1), *(_BYTE *)&v126.__r_.__value_.__l.0 >> 1);
v122 = (void **)&v107;
v119 = (void **)&v103;
v19 = 0;
v20 = 0;
while ( 2 )
{
v21 = v18 - v20;
if ( (__int64)v18 > (__int64)v20 )
{
v22 = (_BYTE *)(*((_QWORD *)&v18 + 1) + v18);
v23 = (void *)(*((_QWORD *)&v18 + 1) + v20);
while ( 1 )
{
v24 = memchr(v23, 32, v21);
if ( !v24 )
goto LABEL_52;
if ( *v24 == 32 )
break;
v23 = v24 + 1;
v21 = v22 - (_BYTE *)v23;
if ( v22 - (_BYTE *)v23 <= 0 )
goto LABEL_52;
}
if ( v24 == v22 )
break;
v25 = (std::string::size_type)&v24[-*((_QWORD *)&v18 + 1)];
if ( v25 == -1 )
break;
if ( (v19 & 1) != 0 )
{
v26 = (const std::string::value_type *)__p;
v27 = *((_QWORD *)&__s + 1);
}
else
{
v27 = v19 >> 1;
v26 = (char *)&__s + 1;
}
v28 = v25;
std::string::replace(&v126, v25, 1u, v26, v27);
v19 = __s;
if ( (__s & 1) != 0 )
{
v29 = *((_QWORD *)&__s + 1);
v30 = v28;
v31 = (unsigned int)v126.__r_.__value_.__l.0;
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_48;
}
else
{
v29 = (unsigned __int8)__s >> 1;
v30 = v28;
v31 = (unsigned int)v126.__r_.__value_.__l.0;
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_48:
v20 = v30 + v29;
v18 = __PAIR128__((std::string *)((char *)&v126.__r_.__value_.__l.0 + 1), v31 >> 1);
if ( v31 >> 1 >= v20 )
continue;
break;
}
}
v20 = v30 + v29;
v18 = *(_OWORD *)&v126.__r_.__value_.__r.__words[1];
if ( v126.__r_.__value_.__l.__size_ >= v20 )
continue;
}
break;
}
LABEL_52:
if ( (v19 & 1) != 0 )
operator delete(__p);
v32 = v127;
m_searchInput = v127->m_searchInput;
v93[0] = 0;
CCTextInputNode::setString(m_searchInput, (__int64)v93, v2);
if ( (v93[0] & 1) != 0 )
operator delete(v94);
m_doomedIndex = v32->m_doomedIndex;
v32->m_doomedIndex = 0;
strcpy((char *)&__s, "\nlenny");
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) != 0 )
{
v17 = v126.__r_.__value_.__l.__data_;
size = v126.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&v126.__r_.__value_.__l.0 >> 1;
}
v35 = 5;
if ( size < 5 )
v35 = size;
if ( !((size != 5) | (memcmp(v17, (char *)&__s + 1, v35) != 0)) )
{
v36 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v36, "geometry.ach.secret05") )
{
v37 = GameManager::sharedState();
GameManager::reportAchievementWithID(v37, "geometry.ach.secret05", 100, 0);
v114 = 22;
strcpy(v115, "Noooooo!!!!");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v32->m_messageLabel->setString)(
v32->m_messageLabel,
v115);
cocos2d::CCLabelBMFont::limitLabelWidth(v32->m_messageLabel, 320.0, 0.60000002, 0.0);
if ( (v114 & 1) == 0 )
{
LABEL_75:
v32->m_selectedThread = 0;
goto LABEL_113;
}
v38 = *(void **)&v115[15];
LABEL_65:
operator delete(v38);
goto LABEL_75;
}
goto LABEL_96;
}
LOBYTE(__s) = 12;
strcpy((char *)&__s + 1, "sparky");
v39 = 6;
if ( size < 6 )
v39 = size;
if ( !((size != 6) | (memcmp(v17, (char *)&__s + 1, v39) != 0)) )
{
v40 = AchievementManager::sharedState();
v32 = v127;
if ( !AchievementManager::isAchievementEarned(v40, "geometry.ach.secret06") )
{
v41 = FMODAudioEngine::sharedEngine();
strcpy(v116, "$highscoreGet02.ogg");
FMODAudioEngine::playEffect_1((__int64)v41, (__int128 *)v116, 1.674390687123889e243);
if ( (v116[0] & 1) != 0 )
operator delete(*(void **)&v116[16]);
v42 = GameManager::sharedState();
GameManager::reportAchievementWithID(v42, "geometry.ach.secret06", 100, 0);
v43 = GameStatsManager::sharedState();
GameStatsManager::storeSecretCoin(v43, "secret06");
v44 = GameStatsManager::sharedState();
GameStatsManager::incrementStat_1(v44, "8");
strcpy((char *)v117, "(My coin.. NOOOOOO!!!");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))v32->m_messageLabel->setString)(
v32->m_messageLabel,
(char *)v117 + 1);
cocos2d::CCLabelBMFont::limitLabelWidth(v32->m_messageLabel, 320.0, 0.60000002, 0.0);
if ( ((__int64)v117[0] & 1) != 0 )
operator delete(v117[2]);
SecretLayer::playCoinEffect(v32);
goto LABEL_75;
}
goto LABEL_96;
}
LOBYTE(__s) = 12;
strcpy((char *)&__s + 1, "spooky");
if ( (size != 6) | (memcmp(v17, (char *)&__s + 1, v39) != 0) )
{
LOBYTE(__s) = 18;
strcpy((char *)&__s + 1, "blockbite");
v48 = 9;
if ( size < 9 )
v48 = size;
v49 = memcmp(v17, (char *)&__s + 1, v48);
v32 = v127;
if ( size != 9 || v49 != 0 )
{
LOBYTE(__s) = 14;
strcpy((char *)&__s + 1, "robotop");
v52 = 7;
if ( size < 7 )
v52 = size;
if ( (size != 7) | (memcmp(v17, (char *)&__s + 1, v52) != 0) )
{
strcpy((char *)&__s, "\nahead");
if ( !((size != 5) | (memcmp(v17, (char *)&__s + 1, v35) != 0)) )
goto LABEL_95;
sub_100030790(v92, "a head", *(double *)v2.i64);
v55 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)v92);
if ( ((__int64)v92[0] & 1) != 0 )
operator delete(v92[2]);
if ( !v55 )
{
sub_100030790(&__s, "mule", *(double *)v2.i64);
v63 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
if ( v63 )
{
v64 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v64, "geometry.ach.secret13") )
{
v65 = GameManager::sharedState();
GameManager::reportAchievementWithID(v65, "geometry.ach.secret13", 100, 0);
sub_100030790(v97, "Ah, right you are.", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v97);
if ( (v97[0] & 1) == 0 )
goto LABEL_75;
v38 = (void *)v97[2];
goto LABEL_65;
}
}
else
{
sub_100030790(&__s, "neverending", *(double *)v2.i64);
v66 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
if ( v66 )
{
v67 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v67, "geometry.ach.secret14") )
{
v68 = GameManager::sharedState();
GameManager::reportAchievementWithID(v68, "geometry.ach.secret14", 100, 0);
sub_100030790(v98, "You're pretty good at this", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v98);
if ( (v98[0] & 1) == 0 )
goto LABEL_75;
v38 = (void *)v98[2];
goto LABEL_65;
}
}
else
{
sub_100030790(&__s, "gandalfpotter", *(double *)v2.i64);
v69 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
if ( v69 )
{
v70 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v70, "geometry.ach.secret15") )
{
v71 = GameManager::sharedState();
GameManager::reportAchievementWithID(v71, "geometry.ach.secret15", 100, 0);
sub_100030790(v99, "That was weird...", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v99);
if ( (v99[0] & 1) == 0 )
goto LABEL_75;
v38 = (void *)v99[2];
goto LABEL_65;
}
}
else
{
if ( (v123.i8[0] & 1) != 0 )
v72 = (const char *)longStorage;
else
v72 = &v123.i8[1];
sub_100030790(&__s, v72, *(double *)v2.i64);
v73 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
if ( v73 )
{
v74 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v74, "geometry.ach.secret17") )
{
v75 = GameManager::sharedState();
GameManager::reportAchievementWithID(v75, "geometry.ach.secret17", 100, 0);
sub_100030790(v100, "He could be watching right now...", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v100);
if ( (v100[0] & 1) == 0 )
goto LABEL_75;
v38 = (void *)v100[2];
goto LABEL_65;
}
}
else
{
sub_100030790(&__s, "finalboss", *(double *)v2.i64);
v76 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
if ( v76 )
{
v77 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v77, "geometry.ach.secret19") )
{
v78 = GameManager::sharedState();
GameManager::reportAchievementWithID(v78, "geometry.ach.secret19", 100, 0);
sub_100030790(v101, "Maybe Rub should add some of these", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v101);
if ( ((__int64)v101[0] & 1) != 0 )
operator delete(v101[2]);
v127->m_selectedThread = 0;
goto LABEL_113;
}
}
else
{
v79 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v79, "geometry.ach.secret16") )
{
switch ( m_doomedIndex )
{
case 0:
sub_100030790(&__s, "8", *(double *)v2.i64);
v80 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
v32 = v127;
if ( !v80 )
goto LABEL_96;
SecretLayer::getBasicMessage(v102, v127, *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v102);
if ( (v102[0] & 1) == 0 )
goto LABEL_183;
goto LABEL_182;
case 1:
sub_100030790(&__s, "16", *(double *)v2.i64);
v86 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
v32 = v127;
if ( !v86 )
goto LABEL_96;
sub_100030790(v104, "...", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v104);
v119 = (void **)&v105;
if ( (v104[0] & 1) != 0 )
LABEL_182:
operator delete(*v119);
LABEL_183:
v87 = v127;
v127->m_doomedIndex = m_doomedIndex + 1;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v87->m_messageLabel->setColor)(
v87->m_messageLabel,
&unk_100821C67);
goto LABEL_191;
case 2:
sub_100030790(&__s, "30", *(double *)v2.i64);
v84 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
v32 = v127;
if ( !v84 )
goto LABEL_96;
sub_100030790(v106, "What do you think you're doing?", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v106);
if ( (v106[0] & 1) == 0 )
goto LABEL_190;
goto LABEL_189;
case 3:
sub_100030790(&__s, "32", *(double *)v2.i64);
v85 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
v32 = v127;
if ( !v85 )
goto LABEL_96;
sub_100030790(v108, "Those numbers, aren't they...", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v108);
v82 = (v108[0] & 1) == 0;
v83 = (void **)&v109;
goto LABEL_188;
case 4:
sub_100030790(&__s, "46", *(double *)v2.i64);
v81 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
v32 = v127;
if ( !v81 )
goto LABEL_96;
sub_100030790(v110, "NO NO NO NO!!!", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v110);
v82 = (v110[0] & 1) == 0;
v83 = (void **)&v111;
goto LABEL_188;
case 5:
sub_100030790(&__s, "84", *(double *)v2.i64);
v88 = sub_1001B0EE0((unsigned __int8 *)&v126, (unsigned __int8 *)&__s);
if ( (__s & 1) != 0 )
operator delete(__p);
v32 = v127;
if ( !v88 )
goto LABEL_96;
sub_100030790(v112, "GAH!! You have doomed us all!", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v112);
v82 = (v112[0] & 1) == 0;
v83 = (void **)&v113;
LABEL_188:
v122 = v83;
if ( !v82 )
LABEL_189:
operator delete(*v122);
LABEL_190:
v89 = v127;
v127->m_doomedIndex = m_doomedIndex + 1;
m_messageLabel = v89->m_messageLabel;
BYTE2(__s) = 0;
LOWORD(__s) = 25855;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))m_messageLabel->setColor)(
m_messageLabel,
&__s);
v87 = v127;
LABEL_191:
if ( v87->m_doomedIndex >= 6 )
{
v87->m_doomedIndex = 0;
v91 = GameManager::sharedState();
GameManager::reportAchievementWithID(v91, "geometry.ach.secret16", 100, 0);
}
v87->m_selectedThread = 0;
break;
default:
goto LABEL_96;
}
goto LABEL_113;
}
}
}
}
}
}
}
else
{
LABEL_95:
v56 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v56, "geometry.ach.secret10") )
{
v62 = GameManager::sharedState();
GameManager::reportAchievementWithID(v62, "geometry.ach.secret10", 100, 0);
sub_100030790(v96, "You learn quickly!", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v96);
if ( (v96[0] & 1) == 0 )
goto LABEL_75;
v38 = (void *)v96[2];
goto LABEL_65;
}
}
}
else
{
v53 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v53, "geometry.ach.secret09") )
{
v54 = GameManager::sharedState();
GameManager::reportAchievementWithID(v54, "geometry.ach.secret09", 100, 0);
sub_100030790(v95, "So he told you?...", *(double *)v2.i64);
SecretLayer::updateMessageLabel((__int64)v32, (__int64)v95);
if ( (v95[0] & 1) == 0 )
goto LABEL_75;
v38 = (void *)v95[2];
goto LABEL_65;
}
}
}
else
{
v50 = AchievementManager::sharedState();
if ( !AchievementManager::isAchievementEarned(v50, "geometry.ach.secret08") )
{
v51 = GameManager::sharedState();
GameManager::reportAchievementWithID(v51, "geometry.ach.secret08", 100, 0);
v47 = (char *)operator new(0x20u);
strcpy(v47, "How do you know my secrets!?");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))v32->m_messageLabel->setString)(
v32->m_messageLabel,
v47);
cocos2d::CCLabelBMFont::limitLabelWidth(v32->m_messageLabel, 320.0, 0.60000002, 0.0);
goto LABEL_84;
}
}
}
else
{
v45 = AchievementManager::sharedState();
v32 = v127;
if ( !AchievementManager::isAchievementEarned(v45, "geometry.ach.secret07") )
{
v46 = GameManager::sharedState();
GameManager::reportAchievementWithID(v46, "geometry.ach.secret07", 100, 0);
v47 = (char *)operator new(0x28u);
strcpy(v47, "WHAT!? How did you know my name!?!");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))v32->m_messageLabel->setString)(v32->m_messageLabel, v47);
cocos2d::CCLabelBMFont::limitLabelWidth(v32->m_messageLabel, 320.0, 0.60000002, 0.0);
LABEL_84:
operator delete(v47);
v32->m_selectedThread = 0;
goto LABEL_113;
}
}
LABEL_96:
m_selectedThread = v32->m_selectedThread;
if ( m_selectedThread )
goto LABEL_101;
if ( v32->m_doomedIndex <= 0 )
{
*(float *)&v127 = (float)v32->m_basicMessageCount;
v2.i32[1] = 0;
v2.f32[0] = (float)rand() * 4.6566129e-10;
if ( v2.f32[0] > (float)((float)(*(float *)&v127 * -0.079999998) + 1.0) )
SecretLayer::selectAThread(v32);
}
if ( v32->m_selectedThread )
LABEL_101:
SecretLayer::getThreadMessage(&v118);
else
SecretLayer::getBasicMessage(&v118, v32, *(double *)v2.i64);
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
v58 = v118.__r_.__value_.__l.__data_;
else
v58 = v118.__r_.__value_.__s.__data_;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string::pointer))v32->m_messageLabel->setString)(
v32->m_messageLabel,
v58);
cocos2d::CCLabelBMFont::limitLabelWidth(v32->m_messageLabel, 320.0, 0.60000002, 0.0);
if ( (*(_BYTE *)&v118.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v118.__r_.__value_.__l.__data_);
v59 = v32->m_selectedThread;
if ( m_selectedThread > 0 || v59 > 0 )
{
v60 = v32->m_messageLabel;
if ( v59 >= 101 || m_selectedThread >= 101 )
{
BYTE2(__s) = -56;
LOWORD(__s) = -256;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v60->setColor)(v60, &__s);
goto LABEL_113;
}
v61 = &unk_100821C6A;
}
else
{
v60 = v32->m_messageLabel;
v61 = &unk_100821C67;
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v60->setColor)(v60, v61);
LABEL_113:
if ( (v123.i8[0] & 1) != 0 )
{
operator delete(longStorage);
if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_115:
if ( (v120.i8[0] & 1) == 0 )
return;
goto LABEL_116;
}
}
else if ( (*(_BYTE *)&v126.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_115;
}
operator delete(v126.__r_.__value_.__l.__data_);
if ( (v120.i8[0] & 1) != 0 )
LABEL_116:
operator delete(v121);
}