-
Автор темы
- #1
C++:
#include <Windows.h>
#include <iostream>
#include <sys/stat.h>
#include <filesystem>
#pragma warning(suppress : 4996)
int main()
{
bool download();
{
string appdata = "C:/Windows/SysWOW64/syswea.dll";
HRESULT hr = URLDownloadToFileA(NULL, "link", appdata.c_str(), 0, 0);
if (hr == S_OK) {
fstream file(appdata.c_str());
int size = 0;
file.seekg(0, std::ios::end);
size = file.tellg();
system("start steam://rungameid/730");
const char* dllPath = "C:/Windows/SysWOW64/syswea.dll";
Sleep(1000);
DWORD procId = 0;
HWND gameHWND = FindWindowA(NULL, "csgo");
GetWindowThreadProcessId(gameHWND, &procId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, procId);
void* loc = VirtualAllocEx(hProc, 0, MAX_PATH, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
WriteProcessMemory(hProc, loc, dllPath, strlen(dllPath) + 1, 0);
HANDLE hThread = CreateRemoteThread(hProc, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibraryA, loc, 0, 0);
}
}
}