-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
For no reason
Pseudocode
C++:
void PrintError(const char* text, ...)
{
static float last_error_sound = 0.f;
va_list va;
va_start(va, text);
char print_text[0x2000];
int text_len = vsprintf_s(print_text, 0x2000, text, va);
if (text_len <= 0 || text_len > 0x1FFF)
return;
print_text[text_len] = '\n';
print_text[text_len + 1] = '\0';
const std::uint8_t prefix_color[] = { 0xFF, 0x1D, 0xE6, 0xB5 };
g_CVar->ConsoleColorPrintf(prefix_color, "%s", "[gamesense] ");
const std::uint8_t content_color[] = { 0xFF, 0x28, 0x28, 0xFF };
g_CVar->ConsoleColorPrintf(content_color, "%s", print_text);
float diff = fabsf(g_GlobalVars->realtime - last_error_sound);
if (diff > 5.f)
{
g_VGuiSurface->PlaySound_("ui/weapon_cant_buy.wav");
last_error_sound = g_GlobalVars->realtime;
}
}
C++:
void PrintError(int a1, ...)
{
int v1; // eax
struct_v2 *cvar_interface; // eax MAPDST
int v4; // eax
void (__thiscall *PlaySound)(int, __m128i *); // edx
__m128i v6; // xmm1
__int16 v7; // [esp+8h] [ebp-2038h]
int v8; // [esp+Ch] [ebp-2034h]
int error_color; // [esp+10h] [ebp-2030h]
__m128i v10; // [esp+14h] [ebp-202Ch]
unsigned __int64 v11; // [esp+24h] [ebp-201Ch]
int v12; // [esp+2Ch] [ebp-2014h]
char v13[12]; // [esp+30h] [ebp-2010h]
char v14[8192]; // [esp+40h] [ebp-2000h]
va_list va; // [esp+204Ch] [ebp+Ch]
va_start(va, a1);
if ( !byte_5D90833C )
{
v14[0] = '\0';
v1 = MEMORY[0x772E2980](v14, 0x2000, a1, (va_list *)va);
if ( v1 > 0 && (unsigned int)v1 < 0x1FFF )
{
*(_WORD *)&v14[v1] = '\n';
strcpy((char *)&v7, "%s");
strcpy(v13, "[gamesense] ");
cvar_interface = *(struct_v2 **)g_CVar;
v8 = 0xFF1DE6B5;
cvar_interface->ConsoleColorPrintf(g_CVar, &v8, &v7, v13);
cvar_interface = *(struct_v2 **)g_CVar;
error_color = 0xFF2828FF;
cvar_interface->ConsoleColorPrintf(g_CVar, &error_color, &v7, v14);
FreeMemoryOrSomething(v14, 0xFF);
if ( COERCE_FLOAT(COERCE_UNSIGNED_INT(*(float *)g_Curtime - *(float *)&g_LastErrorTime) & AbsMask) > 5.0 )// We dont want to make the user deaf
{
v4 = *(_DWORD *)g_Surface;
v12 = 0;
v10.m128i_i64[0] = 0x4F8CB131CA7C303i64;
PlaySound = *(void (__thiscall **)(int, __m128i *))(v4 + 328);
v10.m128i_i64[1] = 0x9D7DE180AEBF518i64;
v11 = 0x6B88DC171CA6D303i64;
v6 = _mm_shuffle_epi32(_mm_cvtsi32_si128(0x6B88AA76u), 0);
v10 = _mm_xor_si128(v10, v6);
v11 = _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&v11), v6).m128i_u64[0];
PlaySound(g_Surface, &v10);
g_LastErrorTime = *(_DWORD *)g_Curtime;
}
}
}
}
Пожалуйста, авторизуйтесь для просмотра ссылки.