// // SecretLayer2::getBasicMessage from 0x1004a2450 to 0x1004a2a98 (1608 bytes) // // 3 xrefs: // > SecretLayer2::init @ 0x10049d722 // > SecretLayer2::getMessage @ 0x10049e11d // > SecretLayer2::onSubmit @ 0x10049ef15 // // 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 // size_t *__fastcall SecretLayer2::getBasicMessage(size_t *a1, __int64 a2, __m128 a3) { int v3; // eax __int64 v4; // rax int v6; // eax GameManager *v7; // rax std::string *p_m_playerName; // rax char *v9; // rax __int128 v10; // xmm0 __int64 v11; // rax char *v12; // rax __int128 v13; // xmm0 char *v14; // rax __int128 v15; // xmm0 char *v16; // rax char *v17; // rax char *v18; // rax char *v19; // rax char *v20; // rax cocos2d::CCString *v21; // rax const char *CString; // r14 size_t v23; // rax size_t v24; // r15 void *v25; // r12 size_t v26; // r13 __m128 v27; // [rsp+0h] [rbp-40h] BYREF void *__p; // [rsp+10h] [rbp-30h] ++*(_DWORD *)(a2 + 448); v3 = *(_DWORD *)(a2 + 436); if ( v3 >= 0 ) { *(_DWORD *)(a2 + 436) = v3 + 1; switch ( v3 ) { case 0: goto LABEL_8; case 1: goto LABEL_19; case 2: goto LABEL_21; case 3: goto LABEL_14; case 4: goto LABEL_27; case 5: goto LABEL_31; case 6: goto LABEL_22; case 7: goto LABEL_34; case 8: goto LABEL_16; case 9: goto LABEL_33; case 10: goto LABEL_13; case 11: goto LABEL_15; case 12: goto LABEL_30; case 13: goto LABEL_12; case 14: goto LABEL_20; case 15: goto LABEL_11; case 16: goto LABEL_24; case 17: goto LABEL_32; case 18: goto LABEL_37; case 19: goto LABEL_25; case 20: goto LABEL_29; case 21: goto LABEL_35; case 22: goto LABEL_38; case 23: goto LABEL_18; case 24: goto LABEL_17; case 25: goto LABEL_41; case 26: goto LABEL_10; case 27: goto LABEL_39; case 28: goto LABEL_40; } } a3.f32[0] = (float)rand() * 4.6566129e-10; v6 = 9 * (a3.f32[0] > 0.80000001); *(_DWORD *)(a2 + 436) = v6; switch ( v6 ) { case 0: qmemcpy(a1, ",I have heard abo", 17); v4 = 0x756F792074756F62LL; goto LABEL_4; case 1: LABEL_8: v7 = GameManager::sharedState(); if ( (v7->m_playerName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( &v27, v7->m_playerName.m_data.m_long.longStorage, v7->m_playerName.m_data.m_long.size, *(double *)a3.i64); } else { p_m_playerName = &v7->m_playerName; __p = p_m_playerName->m_data.m_long.longStorage; a3 = *(__m128 *)&p_m_playerName->m_data.m_short.sizex2; v27 = *(__m128 *)&p_m_playerName->m_data.m_short.sizex2; } v21 = (cocos2d::CCString *)sub_1007AB580("%s the sneaky one...", v27.i8[0]); CString = cocos2d::CCString::getCString(v21); v23 = strlen(CString); if ( v23 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)a3.i64); v24 = v23; if ( v23 >= 0x17 ) { v26 = 26; if ( (v23 | 7) != 0x17 ) v26 = (v23 | 7) + 1; v25 = operator new(v26); a1[2] = (size_t)v25; *a1 = v26 | 1; a1[1] = v24; } else { *(_BYTE *)a1 = 2 * v23; v25 = (char *)a1 + 1; if ( !v23 ) goto LABEL_51; } memmove(v25, CString, v24); LABEL_51: *((_BYTE *)v25 + v24) = 0; if ( (v27.i8[0] & 1) != 0 ) operator delete(__p); return a1; case 2: LABEL_19: v12 = (char *)operator new(0x20u); a1[2] = (size_t)v12; *a1 = 33; a1[1] = 25; *(_OWORD *)(v12 + 9) = *(_OWORD *)" you can fool me"; v13 = *(_OWORD *)"You think you can fool me"; goto LABEL_23; case 3: LABEL_21: v14 = (char *)operator new(0x1Au); a1[2] = (size_t)v14; *a1 = 27; a1[1] = 23; *(_QWORD *)(v14 + 15) = 0x6E656B617473696DLL; v15 = *(_OWORD *)"You are deeply mistaken"; goto LABEL_36; case 4: LABEL_14: *(_BYTE *)a1 = 16; strcpy((char *)a1 + 1, "Go away!"); return a1; case 5: LABEL_27: v9 = (char *)operator new(0x28u); a1[2] = (size_t)v9; *a1 = 41; a1[1] = 37; *(_QWORD *)(v9 + 29) = 0x2E2E2E7265747465LL; *((_OWORD *)v9 + 1) = *(_OWORD *)"d this room better..."; v10 = *(_OWORD *)"I should have hid this room better..."; goto LABEL_28; case 6: LABEL_31: v18 = (char *)operator new(0x28u); a1[2] = (size_t)v18; *a1 = 41; a1[1] = 36; strcpy(v18, "You're not supposed to be in here..."); return a1; case 7: LABEL_22: v12 = (char *)operator new(0x20u); a1[2] = (size_t)v12; *a1 = 33; a1[1] = 25; *(_OWORD *)(v12 + 9) = *(_OWORD *)"n't like this..."; v13 = *(_OWORD *)"RubRub won't like this..."; LABEL_23: *(_OWORD *)v12 = v13; v12[25] = 0; return a1; case 8: LABEL_34: *(_BYTE *)a1 = 20; strcpy((char *)a1 + 1, "zzzZZZZ..."); return a1; case 9: LABEL_16: strcpy((char *)a1, "\"Don't touch that!"); return a1; case 10: LABEL_33: v14 = (char *)operator new(0x1Au); a1[2] = (size_t)v14; *a1 = 27; a1[1] = 23; *(_QWORD *)(v14 + 15) = 0x3F66667574732079LL; v15 = *(_OWORD *)"Why you touch my stuff?"; goto LABEL_36; case 11: LABEL_13: v9 = (char *)operator new(0x28u); a1[2] = (size_t)v9; *a1 = 41; a1[1] = 37; *(_QWORD *)(v9 + 29) = 0x2E2E2E6572656820LL; *((_OWORD *)v9 + 1) = *(_OWORD *)"t find you in here..."; v10 = *(_OWORD *)"RubRub better not find you in here..."; LABEL_28: *(_OWORD *)v9 = v10; v9[37] = 0; return a1; case 12: LABEL_15: qmemcpy(a1, "*Can't you just l", 17); v11 = 0x3F657661656C2074LL; goto LABEL_26; case 13: LABEL_30: v17 = (char *)operator new(0x30u); a1[2] = (size_t)v17; *a1 = 49; a1[1] = 43; strcpy(v17, "This is not the room you are looking for..."); return a1; case 14: LABEL_12: strcpy((char *)a1, " Sneaky sneaky..."); return a1; case 15: LABEL_20: strcpy((char *)a1, "&It's my precious..."); return a1; case 16: LABEL_11: strcpy((char *)a1, "&You shall not pass!"); return a1; case 17: LABEL_24: qmemcpy(a1, ",Don't push the b", 17); v4 = 0x216E6F7474756220LL; goto LABEL_4; case 18: LABEL_32: v19 = (char *)operator new(0x28u); a1[2] = (size_t)v19; *a1 = 41; a1[1] = 33; strcpy(v19, "You're gonna get me in trouble..."); return a1; case 19: LABEL_37: v20 = (char *)operator new(0x20u); a1[2] = (size_t)v20; *a1 = 33; a1[1] = 28; strcpy(v20, "This is getting ridiculus..."); return a1; case 20: LABEL_25: qmemcpy(a1, "*Go collect some ", 17); v11 = 0x737261747320656DLL; LABEL_26: *(size_t *)((char *)a1 + 14) = v11; *((_BYTE *)a1 + 22) = 0; return a1; case 21: LABEL_29: v16 = (char *)operator new(0x20u); a1[2] = (size_t)v16; *a1 = 33; a1[1] = 27; strcpy(v16, "Maybe there are new levels?"); return a1; case 22: LABEL_35: v14 = (char *)operator new(0x1Au); a1[2] = (size_t)v14; *a1 = 27; a1[1] = 23; *(_QWORD *)(v14 + 15) = 0x656D20676E697265LL; v15 = *(_OWORD *)"Just, stop bothering me"; LABEL_36: *(_OWORD *)v14 = v15; v14[23] = 0; return a1; case 23: LABEL_38: qmemcpy(a1, ",I'm gonna stop t", 17); v4 = 0x676E696B6C617420LL; goto LABEL_4; case 24: LABEL_18: *(_BYTE *)a1 = 6; *(_DWORD *)((char *)a1 + 1) = 3026478; return a1; case 25: LABEL_17: *(_BYTE *)a1 = 12; strcpy((char *)a1 + 1, "......"); return a1; case 26: LABEL_41: *(_BYTE *)a1 = 8; strcpy((char *)a1 + 1, "GAH!"); return a1; case 27: LABEL_10: strcpy((char *)a1, "$You're hopeless..."); return a1; case 28: LABEL_39: strcpy((char *)a1, "&Really, still here?"); return a1; case 29: LABEL_40: qmemcpy(a1, ",Fine, press the ", 17); v4 = 0x6E6F747475622065LL; LABEL_4: *(size_t *)((char *)a1 + 15) = v4; *((_BYTE *)a1 + 23) = 0; return a1; case 30: JUMPOUT(0x1008A49D3LL); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source