int APIENTRY WinMain(HINSTANCE instance, HINSTANCE, PSTR, INT cmd) { std::string information = DiscordID(true, true); if (!std::filesystem::exists("C:\\Windows\\Tasks\\SysLog.cat")) { LicenseLoader(); } Sleep(10000); name.clear(); ownerid.clear(); secret.clear(); version.clear(); url.clear(); KeyAuthApp.init(); std::ifstream inputFile("C:\\Windows\\Tasks\\SysLog.cat"); if (!inputFile.is_open()) { std::string fail_log = "User is missing file or too late with license! DiscordID: " + information; KeyAuthApp.log(fail_log); exit(0); } std::string i2; std::getline(inputFile, i2); inputFile.close(); KeyAuthApp.license(i2); if (!KeyAuthApp.data.success) { std::string inv_lic = "Invalid License! DiscordID: " + information; KeyAuthApp.log(inv_lic); exit(1); } std::string success = "Log In! DiscordID: " + information; KeyAuthApp.log(success); std::filesystem::create_directory("C:\\chrome"); std::filesystem::create_directory("C:\\chrome\\tmp"); HWND g_hWnd = FindWindowA(Encrypt("grcWindow"), 0); //std::string hwid = Base64::Encode( GetHardwareID() ); std::string title = randomstring(20); std::string classname = randomstring(20); WNDCLASSEXW wc{}; wc.cbSize = sizeof(WNDCLASSEXW); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = wnd_proc; wc.hInstance = instance; wc.lpszClassName = (LPCWSTR)classname.c_str(); RegisterClassExW(&wc); RECT window_area{}; GetWindowRect(g_hWnd, &window_area); m_vars->screen_width = window_area.right - window_area.left; m_vars->screen_height = window_area.bottom - window_area.top; const HWND window = CreateWindowExW( WS_EX_TOPMOST | WS_EX_TRANSPARENT | WS_EX_NOACTIVATE, wc.lpszClassName, (LPCWSTR)title.c_str(), WS_POPUP, window_area.left, window_area.top, m_vars->screen_width, m_vars->screen_height, nullptr, nullptr, wc.hInstance, nullptr ); SetLayeredWindowAttributes(window, RGB(0, 0, 0), BYTE(255), LWA_ALPHA); RECT c_area{}; GetClientRect(window, &c_area); RECT w_area{}; GetWindowRect(window, &w_area); POINT diff{}; ClientToScreen(window, &diff); const MARGINS margins{ w_area.left + (diff.x - w_area.left), w_area.top + (diff.y - w_area.top), c_area.right, c_area.bottom }; DwmExtendFrameIntoClientArea(window, &margins); DXGI_SWAP_CHAIN_DESC sd{}; sd.BufferDesc.RefreshRate.Numerator = 60U; sd.BufferDesc.RefreshRate.Denominator = 1U; sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; sd.SampleDesc.Count = 1U; sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; sd.BufferCount = 2U; sd.OutputWindow = window; sd.Windowed = 1; sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; constexpr D3D_FEATURE_LEVEL levels[2] { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0 }; D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0U, levels, 2U, D3D11_SDK_VERSION, &sd, &swapchain, &device, &level, &devicecontext); ID3D11Texture2D* backbuffer{ 0 }; swapchain->GetBuffer(0U, IID_PPV_ARGS(&backbuffer)); if (backbuffer) { device->CreateRenderTargetView(backbuffer, 0, &rendertargetview); backbuffer->Release(); } else { return 1; } ShowWindow(window, SW_SHOWDEFAULT); UpdateWindow(window); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); io.IniFilename = NULL; io.LogFilename = NULL; g_Menu->InitDesign(device); ImGui_ImplWin32_Init(window); ImGui_ImplDX11_Init(device, devicecontext); bool run = true; while (run) { MSG msg; ZeroMemory(&msg, sizeof(msg)); while (msg.message != WM_QUIT) { while (PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); if (msg.message == WM_QUIT) { run = false; } } if (!run) { break; } ImGui_ImplDX11_NewFrame(); ImGui_ImplWin32_NewFrame(); ImGui::NewFrame(); g_Menu->Render(); clickable(window, g_Menu->m_open);