// // SecretLayer4::onSubmit from 0x10039b500 to 0x10039c115 (3093 bytes) // // 1 xrefs: // > SecretLayer4::init @ 0x10039a979 // // 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 12:29:18 +0000 // void __fastcall SecretLayer4::onSubmit(__int64 a1) { char v1; // al bool v2; // cl unsigned int v3; // ebx std::string::size_type v4; // r15 std::string::size_type size; // r12 std::string::pointer data; // rax char v7; // al std::string::pointer v8; // rcx std::string::pointer v9; // r14 unsigned __int8 v10; // r13 std::string::size_type v11; // rax size_t v12; // rdx char *v13; // r12 char *v14; // rax char *v15; // rax std::string::size_type v16; // rax const std::string::value_type *v17; // rcx std::string::size_type v18; // r8 std::string::size_type v19; // r14 __int64 v20; // rax std::string::size_type v21; // rcx unsigned int v22; // r12d __int64 v23; // r13 _QWORD *v24; // rdi std::string::pointer v25; // r12 std::string::size_type v26; // rbx size_t v27; // r15 __int64 v28; // rax __int64 v29; // rax std::string::pointer v30; // rdi size_t v31; // r12 __int64 v32; // rax __int64 v33; // rax char *v34; // r14 __int64 v35; // rdi char *v36; // rsi size_t v37; // rdx void *v38; // rdi size_t v39; // r13 __int64 v40; // rax int v41; // ebx int v42; // r14d std::string::pointer v43; // rsi void *v44; // rsi __int64 v45; // rax char *v46; // r14 __int64 v47; // rdi void *v48; // rdi __int64 v49; // rax __int64 v50; // rax char *v51; // rsi void *v52; // rdi void *v53; // r12 int v54; // eax __int64 v55; // rax __int64 v56; // rax size_t v57; // rdx __int64 v58; // rax __int64 v59; // rax void *v60; // rdi char v61; // r14 __int64 v62; // rax __int64 v63; // rax __int64 v64; // rdi __int64 v65; // rax __int64 v66; // rdi __int16 v67[8]; // [rsp+0h] [rbp-160h] BYREF void *v68; // [rsp+10h] [rbp-150h] void *v69[3]; // [rsp+18h] [rbp-148h] BYREF void *v70[3]; // [rsp+30h] [rbp-130h] BYREF void *v71[3]; // [rsp+48h] [rbp-118h] BYREF _BYTE v72[16]; // [rsp+60h] [rbp-100h] BYREF void *v73; // [rsp+70h] [rbp-F0h] char v74; // [rsp+78h] [rbp-E8h] _BYTE v75[23]; // [rsp+79h] [rbp-E7h] BYREF char v76; // [rsp+90h] [rbp-D0h] _QWORD __s2[2]; // [rsp+91h] [rbp-CFh] BYREF void *v78[3]; // [rsp+A8h] [rbp-B8h] BYREF std::string v79; // [rsp+C0h] [rbp-A0h] BYREF __int128 v80; // [rsp+D8h] [rbp-88h] BYREF void *v81; // [rsp+E8h] [rbp-78h] __int64 v82; // [rsp+F0h] [rbp-70h] void *__s1; // [rsp+F8h] [rbp-68h] std::string v84; // [rsp+100h] [rbp-60h] BYREF __int128 __s; // [rsp+120h] [rbp-40h] BYREF void *__p; // [rsp+130h] [rbp-30h] CCTextInputNode::getString(&v80, *(_QWORD *)(a1 + 456)); if ( (v80 & 1) != 0 ) { sub_10001AD30(&v84, v81, *((unsigned __int64 *)&v80 + 1)); } else { v84.__r_.__value_.__r.__words[2] = (std::string::size_type)v81; *(_OWORD *)&v84.__r_.__value_.__l.0 = v80; } v1 = *(_BYTE *)&v84.__r_.__value_.__s.0 & 1; v2 = (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) == 0; if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) != 0 ) { if ( v84.__r_.__value_.__l.__size_ ) goto LABEL_6; LABEL_16: size = 0; goto LABEL_17; } if ( !(*(_BYTE *)&v84.__r_.__value_.__l.0 >> 1) ) goto LABEL_16; LABEL_6: v3 = 1; v4 = 0; do { while ( 1 ) { data = v84.__r_.__value_.__s.__data_; if ( !v2 ) data = v84.__r_.__value_.__l.__data_; v7 = __tolower(data[v4]); v8 = v84.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) != 0 ) v8 = v84.__r_.__value_.__l.__data_; v8[v4] = v7; v1 = *(_BYTE *)&v84.__r_.__value_.__s.0 & 1; v2 = (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) == 0; if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) == 0 ) break; size = v84.__r_.__value_.__l.__size_; v4 = v3++; if ( v84.__r_.__value_.__l.__size_ <= v4 ) goto LABEL_17; } size = *(_BYTE *)&v84.__r_.__value_.__l.0 >> 1; v4 = v3++; } while ( size > v4 ); LABEL_17: v82 = a1; LOWORD(__s) = 0; v9 = v84.__r_.__value_.__s.__data_; if ( v1 ) v9 = v84.__r_.__value_.__l.__data_; v10 = 0; v11 = 0; while ( 2 ) { v12 = size - v11; if ( (__int64)size > (__int64)v11 ) { v13 = &v9[size]; v14 = &v9[v11]; while ( 1 ) { v15 = (char *)memchr(v14, 32, v12); if ( !v15 ) goto LABEL_37; if ( *v15 == 32 ) break; v14 = v15 + 1; v12 = v13 - v14; if ( v13 - v14 <= 0 ) goto LABEL_37; } if ( v15 == v13 ) break; v16 = v15 - v9; if ( v16 == -1 ) break; if ( (v10 & 1) != 0 ) { v17 = (const std::string::value_type *)__p; v18 = *((_QWORD *)&__s + 1); } else { v18 = v10 >> 1; v17 = (char *)&__s + 1; } v19 = v16; std::string::replace(&v84, v16, 1u, v17, v18); v10 = __s; if ( (__s & 1) != 0 ) { v20 = *((_QWORD *)&__s + 1); v21 = v19; v22 = (unsigned int)v84.__r_.__value_.__l.0; if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_33; } else { v20 = (unsigned __int8)__s >> 1; v21 = v19; v22 = (unsigned int)v84.__r_.__value_.__l.0; if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_33: size = v22 >> 1; v9 = v84.__r_.__value_.__s.__data_; v11 = v21 + v20; if ( size >= v11 ) continue; break; } } v9 = v84.__r_.__value_.__l.__data_; size = v84.__r_.__value_.__l.__size_; v11 = v21 + v20; if ( v84.__r_.__value_.__l.__size_ >= v11 ) continue; } break; } LABEL_37: if ( (v10 & 1) != 0 ) operator delete(__p); v23 = v82; v24 = *(_QWORD **)(v82 + 456); v67[0] = 0; CCTextInputNode::setString(v24, (__int64)v67); v25 = v84.__r_.__value_.__s.__data_; if ( (v67[0] & 1) != 0 ) operator delete(v68); LOBYTE(__s) = 16; strcpy((char *)&__s + 1, "darkness"); if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) != 0 ) { v25 = v84.__r_.__value_.__l.__data_; v26 = v84.__r_.__value_.__l.__size_; } else { v26 = *(_BYTE *)&v84.__r_.__value_.__l.0 >> 1; } v27 = 8; if ( v26 < 8 ) v27 = v26; if ( !((v26 != 8) | (memcmp(v25, (char *)&__s + 1, v27) != 0)) ) { v28 = AchievementManager::sharedState(v25, (char *)&__s + 1); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v28, "geometry.ach.v3.secret01") ) { v29 = GameManager::sharedState(); GameManager::reportAchievementWithID(v29, "geometry.ach.v3.secret01", 100, 0); v74 = 20; strcpy(v75, "Impressive"); (*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(v23 + 464) + 928LL))(*(_QWORD *)(v23 + 464), v75); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 320.0, 0.60000002, 0.0); if ( (v74 & 1) != 0 ) operator delete(*(void **)&v75[15]); LABEL_111: v64 = *(_QWORD *)(v23 + 464); BYTE2(__s) = -1; LOWORD(__s) = -256; (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v64 + 1072LL))(v64, &__s); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 400.0, 0.80000001, 0.0); goto LABEL_79; } goto LABEL_63; } LOBYTE(__s) = 14; strcpy((char *)&__s + 1, "silence"); v30 = v25; v31 = 7; if ( v26 < 7 ) v31 = v26; __s1 = v30; if ( !((v26 != 7) | (memcmp(v30, (char *)&__s + 1, v31) != 0)) ) { v32 = AchievementManager::sharedState(v30, (char *)&__s + 1); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v32, "geometry.ach.v3.secret02") ) { v33 = GameManager::sharedState(); GameManager::reportAchievementWithID(v33, "geometry.ach.v3.secret02", 100, 0); v34 = (char *)operator new(0x20u); strcpy(v34, "Something you always ruin..."); (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v23 + 464) + 928LL))(*(_QWORD *)(v23 + 464), v34); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 320.0, 0.60000002, 0.0); operator delete(v34); v35 = *(_QWORD *)(v23 + 464); BYTE2(__s) = -1; LOWORD(__s) = -256; (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v35 + 1072LL))(v35, &__s); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 400.0, 0.80000001, 0.0); LABEL_79: *(_DWORD *)(v23 + 440) = 0; goto LABEL_80; } goto LABEL_63; } strcpy((char *)&__s, "\nriver"); v36 = (char *)&__s + 1; v37 = 5; if ( v26 < 5 ) v37 = v26; v38 = __s1; if ( !((v26 != 5) | (memcmp(__s1, (char *)&__s + 1, v37) != 0)) ) goto LABEL_62; v76 = 12; v36 = (char *)__s2; strcpy((char *)__s2, "ariver"); v39 = 6; if ( v26 < 6 ) v39 = v26; v38 = __s1; if ( !((v26 != 6) | (memcmp(__s1, __s2, v39) != 0)) ) { LABEL_62: v40 = AchievementManager::sharedState(v38, v36); v23 = v82; if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v40, "geometry.ach.v3.secret03") ) { v45 = GameManager::sharedState(); GameManager::reportAchievementWithID(v45, "geometry.ach.v3.secret03", 100, 0); v46 = (char *)operator new(0x1Au); strcpy(v46, "Be like water my friend"); (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v23 + 464) + 928LL))(*(_QWORD *)(v23 + 464), v46); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 320.0, 0.60000002, 0.0); operator delete(v46); v47 = *(_QWORD *)(v23 + 464); BYTE2(__s) = -1; LOWORD(__s) = -256; (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v47 + 1072LL))(v47, &__s); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 400.0, 0.80000001, 0.0); goto LABEL_79; } goto LABEL_63; } LOBYTE(__s) = 12; strcpy((char *)&__s + 1, "hunger"); v48 = __s1; if ( !((v26 != 6) | (memcmp(__s1, (char *)&__s + 1, v39) != 0)) ) { v49 = AchievementManager::sharedState(v48, (char *)&__s + 1); v23 = v82; if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v49, "geometry.ach.v3.secret04") ) { v50 = GameManager::sharedState(); GameManager::reportAchievementWithID(v50, "geometry.ach.v3.secret04", 100, 0); strcpy((char *)v78, "*A pizza would be nice"); (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v23 + 464) + 928LL))( *(_QWORD *)(v23 + 464), (char *)v78 + 1); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 320.0, 0.60000002, 0.0); if ( ((__int64)v78[0] & 1) != 0 ) operator delete(v78[2]); goto LABEL_111; } goto LABEL_63; } LOBYTE(__s) = 14; v51 = (char *)&__s + 1; strcpy((char *)&__s + 1, "volcano"); v52 = __s1; if ( !((v26 != 7) | (memcmp(__s1, (char *)&__s + 1, v31) != 0)) ) { v23 = v82; goto LABEL_94; } v76 = 16; v51 = (char *)__s2; strcpy((char *)__s2, "avolcano"); v53 = __s1; v52 = __s1; v54 = memcmp(__s1, __s2, v27); v23 = v82; if ( v26 == 8 && v54 == 0 ) { LABEL_94: v55 = AchievementManager::sharedState(v52, v51); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v55, "geometry.ach.v3.secret05") ) { v56 = GameManager::sharedState(); GameManager::reportAchievementWithID(v56, "geometry.ach.v3.secret05", 100, 0); sub_10000E4E0(v69, "Hot answer, well done"); sub_10039B120(v23, (__int64)v69); if ( ((__int64)v69[0] & 1) != 0 ) operator delete(v69[2]); goto LABEL_111; } goto LABEL_63; } strcpy((char *)&__s + 1, "backontrack"); v57 = 11; if ( v26 < 0xB ) v57 = v26; if ( !((v26 != 11) | (memcmp(v53, (char *)&__s + 1, v57) != 0)) ) { v58 = AchievementManager::sharedState(v53, (char *)&__s + 1); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v58, "geometry.ach.v3.secret06") ) { v59 = GameManager::sharedState(); GameManager::reportAchievementWithID(v59, "geometry.ach.v3.secret06", 100, 0); sub_10000E4E0(v70, "That's some skill"); sub_10039B120(v23, (__int64)v70); if ( ((__int64)v70[0] & 1) != 0 ) operator delete(v70[2]); goto LABEL_111; } goto LABEL_63; } sub_10000E4E0(&__s, "givemehelper"); v60 = &v84; v61 = sub_1001914B0((unsigned __int8 *)&v84, (unsigned __int8 *)&__s); if ( (__s & 1) != 0 ) { v60 = __p; operator delete(__p); } if ( v61 ) { v62 = AchievementManager::sharedState(v60, &__s); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v62, "geometry.ach.v3.secret07") ) { v63 = GameManager::sharedState(); GameManager::reportAchievementWithID(v63, "geometry.ach.v3.secret07", 100, 0); sub_10000E4E0(v71, "Is that even a real thing..."); sub_10039B120(v23, (__int64)v71); if ( ((__int64)v71[0] & 1) != 0 ) operator delete(v71[2]); goto LABEL_111; } goto LABEL_63; } if ( (v80 & 1) != 0 ) v65 = *((_QWORD *)&v80 + 1); else v65 = (unsigned __int8)v80 >> 1; if ( !v65 ) { LABEL_63: v41 = *(_DWORD *)(v23 + 440); if ( v41 ) goto LABEL_67; v42 = *(_DWORD *)(v23 + 448); if ( (float)((float)rand() * 4.6566129e-10) > (float)((float)((float)v42 * -0.050000001) + 1.0) ) SecretLayer4::selectAThread(v23); if ( *(_DWORD *)(v23 + 440) ) LABEL_67: SecretLayer4::getThreadMessage(&v79); else SecretLayer4::getBasicMessage(&v79, v23); if ( (*(_BYTE *)&v79.__r_.__value_.__s.0 & 1) != 0 ) v43 = v79.__r_.__value_.__l.__data_; else v43 = v79.__r_.__value_.__s.__data_; (*(void (__fastcall **)(_QWORD, std::string::pointer))(**(_QWORD **)(v23 + 464) + 928LL))( *(_QWORD *)(v23 + 464), v43); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v23 + 464), 320.0, 0.60000002, 0.0); if ( (*(_BYTE *)&v79.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v79.__r_.__value_.__l.__data_); if ( v41 <= 0 ) { v44 = &unk_100A08EEB; if ( *(int *)(v23 + 440) > 0 ) v44 = &unk_100A08EEE; } else { v44 = &unk_100A08EEE; } (*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v23 + 464) + 1072LL))(*(_QWORD *)(v23 + 464), v44); goto LABEL_80; } sub_10039CD20(v72, v23); sub_10039B120(v23, (__int64)v72); if ( (v72[0] & 1) != 0 ) operator delete(v73); *(_DWORD *)(v23 + 440) = 0; v66 = *(_QWORD *)(v23 + 464); BYTE2(__s) = 0; LOWORD(__s) = -26881; (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v66 + 1072LL))(v66, &__s); LABEL_80: if ( (*(_BYTE *)&v84.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v84.__r_.__value_.__l.__data_); if ( (v80 & 1) != 0 ) operator delete(v81); }
GD Web Decomp Icon

GD Web Decomp

Raw Source