diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj b/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj new file mode 100644 index 0000000..a2dc3cc --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {5e484f81-b601-4dba-b6b0-bdba962269a1} + DevourUnlockerDirectX11 + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;DEVOURUNLOCKERDIRECTX11_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;DEVOURUNLOCKERDIRECTX11_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;DEVOURUNLOCKERDIRECTX11_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + _CRT_SECURE_NO_WARNINGS;NDEBUG;DEVOURUNLOCKERDIRECTX11_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + stdcpp20 + MaxSpeed + + + Windows + true + true + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj.filters b/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj.filters new file mode 100644 index 0000000..7f85192 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj.filters @@ -0,0 +1,84 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj.user b/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj.user new file mode 100644 index 0000000..429333d --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/DevourUnlockerDirectX11.vcxproj.user @@ -0,0 +1,6 @@ + + + + true + + \ No newline at end of file diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/Includes.hpp b/DirectX11 Edition/DevourUnlockerDirectX11/Includes.hpp new file mode 100644 index 0000000..8533971 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/Includes.hpp @@ -0,0 +1,20 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include "ImGui/imconfig.h" +#include "ImGui/imgui_impl_dx11.h" +#include "ImGui/imgui.h" +#include "ImGui/imgui_internal.h" +#include "ImGui/imstb_rectpack.h" +#include "ImGui/imstb_textedit.h" +#include "ImGui/imstb_truetype.h" +#include "kiero/kiero.h" +#pragma comment (lib, "d3d11.lib") +typedef HRESULT(__stdcall* Present) (IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags); +typedef LRESULT(CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); +typedef uintptr_t PTR; +using namespace std; diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/dllmain.cpp b/DirectX11 Edition/DevourUnlockerDirectX11/dllmain.cpp new file mode 100644 index 0000000..be60bee --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/dllmain.cpp @@ -0,0 +1,134 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "Includes.hpp" // Targeted D11 Application Window Title. +#include "CheatDevour/Font_Memory.hpp" +#include "ImGui/imgui_impl_win32.h" +#include "CheatDevour/Devour_Soft.hpp" +#pragma warning (disable : 6387) //Disabling This Warning +Present oPresent; +HWND window = NULL; +WNDPROC oWndProc; +ID3D11Device* pDevice = NULL; +ID3D11DeviceContext* pContext = NULL; +ID3D11RenderTargetView* mainRenderTargetView; +extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); //ImGui Window Process Handler +void CreateConsole() { + AllocConsole(); + SetConsoleTitleA("DevourUnlocker by RaizyDaizy"); + FILE* fp; + freopen_s(&fp, "CONOUT$", "w", stdout); + cout << "[DevourUnlocker] Welcome to My New Cheat By RaizyDaizy" << endl; +} +void InitImGui() +{ + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); + io.ConfigFlags = ImGuiConfigFlags_NoMouseCursorChange; + io.Fonts->AddFontFromMemoryTTF(nimbussans, sizeof(nimbussans), 18.F); + ImGui::StyleColorsDark(); + ImGui_ImplWin32_Init(window); + ImGui_ImplDX11_Init(pDevice, pContext); +} + +LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { + + if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam)) + return true; + + return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam); +} + +bool init = false; +HRESULT __stdcall hkPresent(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags) +{ + if (!init) + { + if (SUCCEEDED(pSwapChain->GetDevice(__uuidof(ID3D11Device), (void**)&pDevice))) + { + pDevice->GetImmediateContext(&pContext); + DXGI_SWAP_CHAIN_DESC sd; + pSwapChain->GetDesc(&sd); + window = sd.OutputWindow; + ID3D11Texture2D* pBackBuffer {0}; + pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer); + pDevice->CreateRenderTargetView(pBackBuffer, NULL, &mainRenderTargetView); //False Positive Warning DirectX 11 SDK(Idk Why) + pBackBuffer->Release(); + oWndProc = (WNDPROC)SetWindowLongPtr(window, GWLP_WNDPROC, (LONG_PTR)WndProc); + InitImGui(); + init = true; + cout << "[DevourUnlocker] Successfully Getting D3D11 Device" << endl; + } + + else + return oPresent(pSwapChain, SyncInterval, Flags); + } + ImGuiWindowFlags fl = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar; + ImGui_ImplDX11_NewFrame(); + ImGui_ImplWin32_NewFrame(); + ImGui::NewFrame(); + ImGui::Begin("DevourUnlocker by RaizyDaizy", 0, fl); + ImGui::SetNextWindowSize(ImVec2(500, 500)); + ImGui::TextColored(ImVec4(145, 0, 0, 255), "Welcome to My Unlocker"); + if (ImGui::Button("Detach Console", ImVec2(162, 78))) + { + ShowWindow(GetConsoleWindow(), SW_HIDE); + } + if (ImGui::Button("UNLOCK ALL ROBES", ImVec2(180, 125))) + { + InitUnlockedRobes(); + } + if (ImGui::Button("UNLOCK ALL CHARACTERS", ImVec2(225, 125))) + { + InitUnlockedCharacters(); + } + ImGui::End(); + ImGui::Render(); + pContext->OMSetRenderTargets(1, &mainRenderTargetView, NULL); + ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData()); + return oPresent(pSwapChain, SyncInterval, Flags); +} + +DWORD WINAPI MainThread(HMODULE hMod) +{ + bool init_hook = false; + CreateConsole(); + do + { + if (kiero::init(kiero::RenderType::D3D11) == kiero::Status::Success) + { + kiero::bind(8, (void**)&oPresent, hkPresent); + init_hook = true; + cout << "[DevourUnlocker] Kiero Has Been Successfully Initializated" << endl; + } + else { + cout << "[DevourUnlocker] Kiero is not Initializated" << endl; + Sleep(4500); + exit(122); + } + if (GetAsyncKeyState(VK_F5)) + { + kiero::shutdown(); + FreeLibraryAndExitThread(hMod, 950); + } + } while (!init_hook); + return TRUE; +} + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainThread, 0, 0, 0); + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + DisableThreadLibraryCalls(hModule); + kiero::shutdown(); + break; + } + return TRUE; +} + diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/kiero/kiero.cpp b/DirectX11 Edition/DevourUnlockerDirectX11/kiero/kiero.cpp new file mode 100644 index 0000000..b4d0e35 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/kiero/kiero.cpp @@ -0,0 +1,720 @@ +#include "kiero.h" +#include +#include + +#if KIERO_INCLUDE_D3D9 +# include +#endif + +#if KIERO_INCLUDE_D3D10 +# include +# include +# include +#endif + +#if KIERO_INCLUDE_D3D11 +# include +# include +#endif + +#if KIERO_INCLUDE_D3D12 +# include +# include +#endif + +#if KIERO_INCLUDE_OPENGL +# include +#endif + +#if KIERO_INCLUDE_VULKAN +# include +#endif + +#if KIERO_USE_MINHOOK +# include +#endif + +#ifdef _UNICODE +# define KIERO_TEXT(text) L##text +#else +# define KIERO_TEXT(text) text +#endif + +#define KIERO_ARRAY_SIZE(arr) ((size_t)(sizeof(arr)/sizeof(arr[0]))) + +static kiero::RenderType::Enum g_renderType = kiero::RenderType::None; +static uint150_t* g_methodsTable = NULL; + +kiero::Status::Enum kiero::init(RenderType::Enum _renderType) +{ + if (g_renderType != RenderType::None) + { + return Status::AlreadyInitializedError; + } + + if (_renderType != RenderType::None) + { + if (_renderType >= RenderType::D3D9 && _renderType <= RenderType::D3D12) + { + WNDCLASSEX windowClass; + windowClass.cbSize = sizeof(WNDCLASSEX); + windowClass.style = CS_HREDRAW | CS_VREDRAW; + windowClass.lpfnWndProc = DefWindowProc; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hInstance = GetModuleHandle(NULL); + windowClass.hIcon = NULL; + windowClass.hCursor = NULL; + windowClass.hbrBackground = NULL; + windowClass.lpszMenuName = NULL; + windowClass.lpszClassName = KIERO_TEXT("Kiero"); + windowClass.hIconSm = NULL; + + ::RegisterClassEx(&windowClass); + + HWND window = ::CreateWindow(windowClass.lpszClassName, KIERO_TEXT("Kiero DirectX Window"), WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, NULL, NULL, windowClass.hInstance, NULL); + + if (_renderType == RenderType::D3D9) + { +#if KIERO_INCLUDE_D3D9 + HMODULE libD3D9; + if ((libD3D9 = ::GetModuleHandle(KIERO_TEXT("d3d9.dll"))) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::ModuleNotFoundError; + } + + void* Direct3DCreate9; + if ((Direct3DCreate9 = ::GetProcAddress(libD3D9, "Direct3DCreate9")) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + LPDIRECT3D9 direct3D9; + if ((direct3D9 = ((LPDIRECT3D9(__stdcall*)(uint32_t))(Direct3DCreate9))(D3D_SDK_VERSION)) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + D3DDISPLAYMODE displayMode; + if (direct3D9->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &displayMode) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + D3DPRESENT_PARAMETERS params; + params.BackBufferWidth = 0; + params.BackBufferHeight = 0; + params.BackBufferFormat = displayMode.Format; + params.BackBufferCount = 0; + params.MultiSampleType = D3DMULTISAMPLE_NONE; + params.MultiSampleQuality = NULL; + params.SwapEffect = D3DSWAPEFFECT_DISCARD; + params.hDeviceWindow = window; + params.Windowed = 1; + params.EnableAutoDepthStencil = 0; + params.AutoDepthStencilFormat = D3DFMT_UNKNOWN; + params.Flags = NULL; + params.FullScreen_RefreshRateInHz = 0; + params.PresentationInterval = 0; + + LPDIRECT3DDEVICE9 device; + if (direct3D9->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window, D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_DISABLE_DRIVER_MANAGEMENT, ¶ms, &device) < 0) + { + direct3D9->Release(); + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + g_methodsTable = (uint150_t*)::calloc(119, sizeof(uint150_t)); + ::memcpy(g_methodsTable, *(uint150_t**)device, 119 * sizeof(uint150_t)); + +#if KIERO_USE_MINHOOK + MH_Initialize(); +#endif + + direct3D9->Release(); + direct3D9 = NULL; + + device->Release(); + device = NULL; + + g_renderType = RenderType::D3D9; + + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + + return Status::Success; +#endif + } + else if (_renderType == RenderType::D3D10) + { +#if KIERO_INCLUDE_D3D10 + HMODULE libDXGI; + HMODULE libD3D10; + if ((libDXGI = ::GetModuleHandle(KIERO_TEXT("dxgi.dll"))) == NULL || (libD3D10 = ::GetModuleHandle(KIERO_TEXT("d3d10.dll"))) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::ModuleNotFoundError; + } + + void* CreateDXGIFactory; + if ((CreateDXGIFactory = ::GetProcAddress(libDXGI, "CreateDXGIFactory")) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + IDXGIFactory* factory; + if (((long(__stdcall*)(const IID&, void**))(CreateDXGIFactory))(__uuidof(IDXGIFactory), (void**)&factory) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + IDXGIAdapter* adapter; + if (factory->EnumAdapters(0, &adapter) == DXGI_ERROR_NOT_FOUND) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + void* D3D10CreateDeviceAndSwapChain; + if ((D3D10CreateDeviceAndSwapChain = ::GetProcAddress(libD3D10, "D3D10CreateDeviceAndSwapChain")) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + DXGI_RATIONAL refreshRate; + refreshRate.Numerator = 60; + refreshRate.Denominator = 1; + + DXGI_MODE_DESC bufferDesc; + bufferDesc.Width = 100; + bufferDesc.Height = 100; + bufferDesc.RefreshRate = refreshRate; + bufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + bufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; + bufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; + + DXGI_SAMPLE_DESC sampleDesc; + sampleDesc.Count = 1; + sampleDesc.Quality = 0; + + DXGI_SWAP_CHAIN_DESC swapChainDesc; + swapChainDesc.BufferDesc = bufferDesc; + swapChainDesc.SampleDesc = sampleDesc; + swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + swapChainDesc.BufferCount = 1; + swapChainDesc.OutputWindow = window; + swapChainDesc.Windowed = 1; + swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + + IDXGISwapChain* swapChain; + ID3D10Device* device; + + if (((long(__stdcall*)( + IDXGIAdapter*, + D3D10_DRIVER_TYPE, + HMODULE, + UINT, + UINT, + DXGI_SWAP_CHAIN_DESC*, + IDXGISwapChain**, + ID3D10Device**))(D3D10CreateDeviceAndSwapChain))(adapter, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &swapChainDesc, &swapChain, &device) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + g_methodsTable = (uint150_t*)::calloc(116, sizeof(uint150_t)); + ::memcpy(g_methodsTable, *(uint150_t**)swapChain, 18 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 18, *(uint150_t**)device, 98 * sizeof(uint150_t)); + +#if KIERO_USE_MINHOOK + MH_Initialize(); +#endif + + swapChain->Release(); + swapChain = NULL; + + device->Release(); + device = NULL; + + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + + g_renderType = RenderType::D3D10; + + return Status::Success; +#endif + } + else if (_renderType == RenderType::D3D11) + { +#if KIERO_INCLUDE_D3D11 + HMODULE libD3D11; + if ((libD3D11 = ::GetModuleHandle(KIERO_TEXT("d3d11.dll"))) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::ModuleNotFoundError; + } + + void* D3D11CreateDeviceAndSwapChain; + if ((D3D11CreateDeviceAndSwapChain = ::GetProcAddress(libD3D11, "D3D11CreateDeviceAndSwapChain")) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + D3D_FEATURE_LEVEL featureLevel; + const D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_11_0 }; + + DXGI_RATIONAL refreshRate; + refreshRate.Numerator = 60; + refreshRate.Denominator = 1; + + DXGI_MODE_DESC bufferDesc; + bufferDesc.Width = 100; + bufferDesc.Height = 100; + bufferDesc.RefreshRate = refreshRate; + bufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + bufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; + bufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; + + DXGI_SAMPLE_DESC sampleDesc; + sampleDesc.Count = 1; + sampleDesc.Quality = 0; + + DXGI_SWAP_CHAIN_DESC swapChainDesc; + swapChainDesc.BufferDesc = bufferDesc; + swapChainDesc.SampleDesc = sampleDesc; + swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + swapChainDesc.BufferCount = 1; + swapChainDesc.OutputWindow = window; + swapChainDesc.Windowed = 1; + swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + + IDXGISwapChain* swapChain; + ID3D11Device* device; + ID3D11DeviceContext* context; + + if (((long(__stdcall*)( + IDXGIAdapter*, + D3D_DRIVER_TYPE, + HMODULE, + UINT, + const D3D_FEATURE_LEVEL*, + UINT, + UINT, + const DXGI_SWAP_CHAIN_DESC*, + IDXGISwapChain**, + ID3D11Device**, + D3D_FEATURE_LEVEL*, + ID3D11DeviceContext**))(D3D11CreateDeviceAndSwapChain))(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, featureLevels, 1, D3D11_SDK_VERSION, &swapChainDesc, &swapChain, &device, &featureLevel, &context) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + g_methodsTable = (uint150_t*)::calloc(205, sizeof(uint150_t)); + ::memcpy(g_methodsTable, *(uint150_t**)swapChain, 18 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 18, *(uint150_t**)device, 43 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 18 + 43, *(uint150_t**)context, 144 * sizeof(uint150_t)); + +#if KIERO_USE_MINHOOK + MH_Initialize(); +#endif + + swapChain->Release(); + swapChain = NULL; + + device->Release(); + device = NULL; + + context->Release(); + context = NULL; + + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + + g_renderType = RenderType::D3D11; + + return Status::Success; +#endif + } + else if (_renderType == RenderType::D3D12) + { +#if KIERO_INCLUDE_D3D12 + HMODULE libDXGI; + HMODULE libD3D12; + if ((libDXGI = ::GetModuleHandle(KIERO_TEXT("dxgi.dll"))) == NULL || (libD3D12 = ::GetModuleHandle(KIERO_TEXT("d3d12.dll"))) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::ModuleNotFoundError; + } + + void* CreateDXGIFactory; + if ((CreateDXGIFactory = ::GetProcAddress(libDXGI, "CreateDXGIFactory")) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + IDXGIFactory* factory; + if (((long(__stdcall*)(const IID&, void**))(CreateDXGIFactory))(__uuidof(IDXGIFactory), (void**)&factory) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + IDXGIAdapter* adapter; + if (factory->EnumAdapters(0, &adapter) == DXGI_ERROR_NOT_FOUND) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + void* D3D12CreateDevice; + if ((D3D12CreateDevice = ::GetProcAddress(libD3D12, "D3D12CreateDevice")) == NULL) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + ID3D12Device* device; + if (((long(__stdcall*)(IUnknown*, D3D_FEATURE_LEVEL, const IID&, void**))(D3D12CreateDevice))(adapter, D3D_FEATURE_LEVEL_11_0, __uuidof(ID3D12Device), (void**)&device) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + D3D12_COMMAND_QUEUE_DESC queueDesc; + queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; + queueDesc.Priority = 0; + queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; + queueDesc.NodeMask = 0; + + ID3D12CommandQueue* commandQueue; + if (device->CreateCommandQueue(&queueDesc, __uuidof(ID3D12CommandQueue), (void**)&commandQueue) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + ID3D12CommandAllocator* commandAllocator; + if (device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(ID3D12CommandAllocator), (void**)&commandAllocator) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + ID3D12GraphicsCommandList* commandList; + if (device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, commandAllocator, NULL, __uuidof(ID3D12GraphicsCommandList), (void**)&commandList) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + DXGI_RATIONAL refreshRate; + refreshRate.Numerator = 60; + refreshRate.Denominator = 1; + + DXGI_MODE_DESC bufferDesc; + bufferDesc.Width = 100; + bufferDesc.Height = 100; + bufferDesc.RefreshRate = refreshRate; + bufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + bufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; + bufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; + + DXGI_SAMPLE_DESC sampleDesc; + sampleDesc.Count = 1; + sampleDesc.Quality = 0; + + DXGI_SWAP_CHAIN_DESC swapChainDesc = {}; + swapChainDesc.BufferDesc = bufferDesc; + swapChainDesc.SampleDesc = sampleDesc; + swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + swapChainDesc.BufferCount = 2; + swapChainDesc.OutputWindow = window; + swapChainDesc.Windowed = 1; + swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; + swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + + IDXGISwapChain* swapChain; + if (factory->CreateSwapChain(commandQueue, &swapChainDesc, &swapChain) < 0) + { + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + return Status::UnknownError; + } + + g_methodsTable = (uint150_t*)::calloc(150, sizeof(uint150_t)); + ::memcpy(g_methodsTable, *(uint150_t**)device, 44 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 44, *(uint150_t**)commandQueue, 19 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 44 + 19, *(uint150_t**)commandAllocator, 9 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 44 + 19 + 9, *(uint150_t**)commandList, 60 * sizeof(uint150_t)); + ::memcpy(g_methodsTable + 44 + 19 + 9 + 60, *(uint150_t**)swapChain, 18 * sizeof(uint150_t)); + +#if KIERO_USE_MINHOOK + MH_Initialize(); +#endif + + device->Release(); + device = NULL; + + commandQueue->Release(); + commandQueue = NULL; + + commandAllocator->Release(); + commandAllocator = NULL; + + commandList->Release(); + commandList = NULL; + + swapChain->Release(); + swapChain = NULL; + + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + + g_renderType = RenderType::D3D12; + + return Status::Success; +#endif + } + + ::DestroyWindow(window); + ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance); + + return Status::NotSupportedError; + } + else if (_renderType == RenderType::OpenGL) + { +#if KIERO_INCLUDE_OPENGL + HMODULE libOpenGL32; + if ((libOpenGL32 = ::GetModuleHandle(KIERO_TEXT("opengl32.dll"))) == NULL) + { + return Status::ModuleNotFoundError; + } + + const char* const methodsNames[] = { + "glAccum", "glAlphaFunc", "glAreTexturesResident", "glArrayElement", "glBegin", "glBindTexture", "glBitmap", "glBlendFunc", "glCallList", "glCallLists", "glClear", "glClearAccum", + "glClearColor", "glClearDepth", "glClearIndex", "glClearStencil", "glClipPlane", "glColor3b", "glColor3bv", "glColor3d", "glColor3dv", "glColor3f", "glColor3fv", "glColor3i", "glColor3iv", + "glColor3s", "glColor3sv", "glColor3ub", "glColor3ubv", "glColor3ui", "glColor3uiv", "glColor3us", "glColor3usv", "glColor4b", "glColor4bv", "glColor4d", "glColor4dv", "glColor4f", + "glColor4fv", "glColor4i", "glColor4iv", "glColor4s", "glColor4sv", "glColor4ub", "glColor4ubv", "glColor4ui", "glColor4uiv", "glColor4us", "glColor4usv", "glColorMask", "glColorMaterial", + "glColorPointer", "glCopyPixels", "glCopyTexImage1D", "glCopyTexImage2D", "glCopyTexSubImage1D", "glCopyTexSubImage2D", "glCullFaceglCullFace", "glDeleteLists", "glDeleteTextures", + "glDepthFunc", "glDepthMask", "glDepthRange", "glDisable", "glDisableClientState", "glDrawArrays", "glDrawBuffer", "glDrawElements", "glDrawPixels", "glEdgeFlag", "glEdgeFlagPointer", + "glEdgeFlagv", "glEnable", "glEnableClientState", "glEnd", "glEndList", "glEvalCoord1d", "glEvalCoord1dv", "glEvalCoord1f", "glEvalCoord1fv", "glEvalCoord2d", "glEvalCoord2dv", + "glEvalCoord2f", "glEvalCoord2fv", "glEvalMesh1", "glEvalMesh2", "glEvalPoint1", "glEvalPoint2", "glFeedbackBuffer", "glFinish", "glFlush", "glFogf", "glFogfv", "glFogi", "glFogiv", + "glFrontFace", "glFrustum", "glGenLists", "glGenTextures", "glGetBooleanv", "glGetClipPlane", "glGetDoublev", "glGetError", "glGetFloatv", "glGetIntegerv", "glGetLightfv", "glGetLightiv", + "glGetMapdv", "glGetMapfv", "glGetMapiv", "glGetMaterialfv", "glGetMaterialiv", "glGetPixelMapfv", "glGetPixelMapuiv", "glGetPixelMapusv", "glGetPointerv", "glGetPolygonStipple", + "glGetString", "glGetTexEnvfv", "glGetTexEnviv", "glGetTexGendv", "glGetTexGenfv", "glGetTexGeniv", "glGetTexImage", "glGetTexLevelParameterfv", "glGetTexLevelParameteriv", + "glGetTexParameterfv", "glGetTexParameteriv", "glHint", "glIndexMask", "glIndexPointer", "glIndexd", "glIndexdv", "glIndexf", "glIndexfv", "glIndexi", "glIndexiv", "glIndexs", "glIndexsv", + "glIndexub", "glIndexubv", "glInitNames", "glInterleavedArrays", "glIsEnabled", "glIsList", "glIsTexture", "glLightModelf", "glLightModelfv", "glLightModeli", "glLightModeliv", "glLightf", + "glLightfv", "glLighti", "glLightiv", "glLineStipple", "glLineWidth", "glListBase", "glLoadIdentity", "glLoadMatrixd", "glLoadMatrixf", "glLoadName", "glLogicOp", "glMap1d", "glMap1f", + "glMap2d", "glMap2f", "glMapGrid1d", "glMapGrid1f", "glMapGrid2d", "glMapGrid2f", "glMaterialf", "glMaterialfv", "glMateriali", "glMaterialiv", "glMatrixMode", "glMultMatrixd", + "glMultMatrixf", "glNewList", "glNormal3b", "glNormal3bv", "glNormal3d", "glNormal3dv", "glNormal3f", "glNormal3fv", "glNormal3i", "glNormal3iv", "glNormal3s", "glNormal3sv", + "glNormalPointer", "glOrtho", "glPassThrough", "glPixelMapfv", "glPixelMapuiv", "glPixelMapusv", "glPixelStoref", "glPixelStorei", "glPixelTransferf", "glPixelTransferi", "glPixelZoom", + "glPointSize", "glPolygonMode", "glPolygonOffset", "glPolygonStipple", "glPopAttrib", "glPopClientAttrib", "glPopMatrix", "glPopName", "glPrioritizeTextures", "glPushAttrib", + "glPushClientAttrib", "glPushMatrix", "glPushName", "glRasterPos2d", "glRasterPos2dv", "glRasterPos2f", "glRasterPos2fv", "glRasterPos2i", "glRasterPos2iv", "glRasterPos2s", + "glRasterPos2sv", "glRasterPos3d", "glRasterPos3dv", "glRasterPos3f", "glRasterPos3fv", "glRasterPos3i", "glRasterPos3iv", "glRasterPos3s", "glRasterPos3sv", "glRasterPos4d", + "glRasterPos4dv", "glRasterPos4f", "glRasterPos4fv", "glRasterPos4i", "glRasterPos4iv", "glRasterPos4s", "glRasterPos4sv", "glReadBuffer", "glReadPixels", "glRectd", "glRectdv", "glRectf", + "glRectfv", "glRecti", "glRectiv", "glRects", "glRectsv", "glRenderMode", "glRotated", "glRotatef", "glScaled", "glScalef", "glScissor", "glSelectBuffer", "glShadeModel", "glStencilFunc", + "glStencilMask", "glStencilOp", "glTexCoord1d", "glTexCoord1dv", "glTexCoord1f", "glTexCoord1fv", "glTexCoord1i", "glTexCoord1iv", "glTexCoord1s", "glTexCoord1sv", "glTexCoord2d", + "glTexCoord2dv", "glTexCoord2f", "glTexCoord2fv", "glTexCoord2i", "glTexCoord2iv", "glTexCoord2s", "glTexCoord2sv", "glTexCoord3d", "glTexCoord3dv", "glTexCoord3f", "glTexCoord3fv", + "glTexCoord3i", "glTexCoord3iv", "glTexCoord3s", "glTexCoord3sv", "glTexCoord4d", "glTexCoord4dv", "glTexCoord4f", "glTexCoord4fv", "glTexCoord4i", "glTexCoord4iv", "glTexCoord4s", + "glTexCoord4sv", "glTexCoordPointer", "glTexEnvf", "glTexEnvfv", "glTexEnvi", "glTexEnviv", "glTexGend", "glTexGendv", "glTexGenf", "glTexGenfv", "glTexGeni", "glTexGeniv", "glTexImage1D", + "glTexImage2D", "glTexParameterf", "glTexParameterfv", "glTexParameteri", "glTexParameteriv", "glTexSubImage1D", "glTexSubImage2D", "glTranslated", "glTranslatef", "glVertex2d", + "glVertex2dv", "glVertex2f", "glVertex2fv", "glVertex2i", "glVertex2iv", "glVertex2s", "glVertex2sv", "glVertex3d", "glVertex3dv", "glVertex3f", "glVertex3fv", "glVertex3i", "glVertex3iv", + "glVertex3s", "glVertex3sv", "glVertex4d", "glVertex4dv", "glVertex4f", "glVertex4fv", "glVertex4i", "glVertex4iv", "glVertex4s", "glVertex4sv", "glVertexPointer", "glViewport" + }; + + size_t size = KIERO_ARRAY_SIZE(methodsNames); + + g_methodsTable = (uint150_t*)::calloc(size, sizeof(uint150_t)); + + for (int i = 0; i < size; i++) + { + g_methodsTable[i] = (uint150_t)::GetProcAddress(libOpenGL32, methodsNames[i]); + } + +#if KIERO_USE_MINHOOK + MH_Initialize(); +#endif + + g_renderType = RenderType::OpenGL; + + return Status::Success; +#endif + } + else if (_renderType == RenderType::Vulkan) + { +#if KIERO_INCLUDE_VULKAN + HMODULE libVulkan; + if ((libVulkan = GetModuleHandle(KIERO_TEXT("vulcan-1.dll"))) == NULL) + { + return Status::ModuleNotFoundError; + } + + const char* const methodsNames[] = { + "vkCreateInstance", "vkDestroyInstance", "vkEnumeratePhysicalDevices", "vkGetPhysicalDeviceFeatures", "vkGetPhysicalDeviceFormatProperties", "vkGetPhysicalDeviceImageFormatProperties", + "vkGetPhysicalDeviceProperties", "vkGetPhysicalDeviceQueueFamilyProperties", "vkGetPhysicalDeviceMemoryProperties", "vkGetInstanceProcAddr", "vkGetDeviceProcAddr", "vkCreateDevice", + "vkDestroyDevice", "vkEnumerateInstanceExtensionProperties", "vkEnumerateDeviceExtensionProperties", "vkEnumerateDeviceLayerProperties", "vkGetDeviceQueue", "vkQueueSubmit", "vkQueueWaitIdle", + "vkDeviceWaitIdle", "vkAllocateMemory", "vkFreeMemory", "vkMapMemory", "vkUnmapMemory", "vkFlushMappedMemoryRanges", "vkInvalidateMappedMemoryRanges", "vkGetDeviceMemoryCommitment", + "vkBindBufferMemory", "vkBindImageMemory", "vkGetBufferMemoryRequirements", "vkGetImageMemoryRequirements", "vkGetImageSparseMemoryRequirements", "vkGetPhysicalDeviceSparseImageFormatProperties", + "vkQueueBindSparse", "vkCreateFence", "vkDestroyFence", "vkResetFences", "vkGetFenceStatus", "vkWaitForFences", "vkCreateSemaphore", "vkDestroySemaphore", "vkCreateEvent", "vkDestroyEvent", + "vkGetEventStatus", "vkSetEvent", "vkResetEvent", "vkCreateQueryPool", "vkDestroyQueryPool", "vkGetQueryPoolResults", "vkCreateBuffer", "vkDestroyBuffer", "vkCreateBufferView", "vkDestroyBufferView", + "vkCreateImage", "vkDestroyImage", "vkGetImageSubresourceLayout", "vkCreateImageView", "vkDestroyImageView", "vkCreateShaderModule", "vkDestroyShaderModule", "vkCreatePipelineCache", + "vkDestroyPipelineCache", "vkGetPipelineCacheData", "vkMergePipelineCaches", "vkCreateGraphicsPipelines", "vkCreateComputePipelines", "vkDestroyPipeline", "vkCreatePipelineLayout", + "vkDestroyPipelineLayout", "vkCreateSampler", "vkDestroySampler", "vkCreateDescriptorSetLayout", "vkDestroyDescriptorSetLayout", "vkCreateDescriptorPool", "vkDestroyDescriptorPool", + "vkResetDescriptorPool", "vkAllocateDescriptorSets", "vkFreeDescriptorSets", "vkUpdateDescriptorSets", "vkCreateFramebuffer", "vkDestroyFramebuffer", "vkCreateRenderPass", "vkDestroyRenderPass", + "vkGetRenderAreaGranularity", "vkCreateCommandPool", "vkDestroyCommandPool", "vkResetCommandPool", "vkAllocateCommandBuffers", "vkFreeCommandBuffers", "vkBeginCommandBuffer", "vkEndCommandBuffer", + "vkResetCommandBuffer", "vkCmdBindPipeline", "vkCmdSetViewport", "vkCmdSetScissor", "vkCmdSetLineWidth", "vkCmdSetDepthBias", "vkCmdSetBlendConstants", "vkCmdSetDepthBounds", + "vkCmdSetStencilCompareMask", "vkCmdSetStencilWriteMask", "vkCmdSetStencilReference", "vkCmdBindDescriptorSets", "vkCmdBindIndexBuffer", "vkCmdBindVertexBuffers", "vkCmdDraw", "vkCmdDrawIndexed", + "vkCmdDrawIndirect", "vkCmdDrawIndexedIndirect", "vkCmdDispatch", "vkCmdDispatchIndirect", "vkCmdCopyBuffer", "vkCmdCopyImage", "vkCmdBlitImage", "vkCmdCopyBufferToImage", "vkCmdCopyImageToBuffer", + "vkCmdUpdateBuffer", "vkCmdFillBuffer", "vkCmdClearColorImage", "vkCmdClearDepthStencilImage", "vkCmdClearAttachments", "vkCmdResolveImage", "vkCmdSetEvent", "vkCmdResetEvent", "vkCmdWaitEvents", + "vkCmdPipelineBarrier", "vkCmdBeginQuery", "vkCmdEndQuery", "vkCmdResetQueryPool", "vkCmdWriteTimestamp", "vkCmdCopyQueryPoolResults", "vkCmdPushConstants", "vkCmdBeginRenderPass", "vkCmdNextSubpass", + "vkCmdEndRenderPass", "vkCmdExecuteCommands" + }; + + size_t size = KIERO_ARRAY_SIZE(methodsNames); + + g_methodsTable = (uint150_t*)::calloc(size, sizeof(uint150_t)); + + for (int i = 0; i < size; i++) + { + g_methodsTable[i] = (uint150_t)::GetProcAddress(libVulkan, methodsNames[i]); + } + +#if KIERO_USE_MINHOOK + MH_Initialize(); +#endif + + g_renderType = RenderType::Vulkan; + + return Status::Success; +#endif + } + else if (_renderType == RenderType::Auto) + { + RenderType::Enum type = RenderType::None; + + if (::GetModuleHandle(KIERO_TEXT("d3d9.dll")) != NULL) + { + type = RenderType::D3D9; + } + else if (::GetModuleHandle(KIERO_TEXT("d3d10.dll")) != NULL) + { + type = RenderType::D3D10; + } + else if (::GetModuleHandle(KIERO_TEXT("d3d11.dll")) != NULL) + { + type = RenderType::D3D11; + } + else if (::GetModuleHandle(KIERO_TEXT("d3d12.dll")) != NULL) + { + type = RenderType::D3D12; + } + else if (::GetModuleHandle(KIERO_TEXT("opengl32.dll")) != NULL) + { + type = RenderType::OpenGL; + } + else if (::GetModuleHandle(KIERO_TEXT("vulcan-1.dll")) != NULL) + { + type = RenderType::Vulkan; + } + + return init(type); + } + } + + return Status::Success; +} + +void kiero::shutdown() +{ + if (g_renderType != RenderType::None) + { +#if KIERO_USE_MINHOOK + MH_DisableHook(MH_ALL_HOOKS); +#endif + + ::free(g_methodsTable); + g_methodsTable = NULL; + g_renderType = RenderType::None; + } +} + +kiero::Status::Enum kiero::bind(uint16_t _index, void** _original, void* _function) +{ + // TODO: Need own detour function + + assert(_index >= 0 && _original != NULL && _function != NULL); + + if (g_renderType != RenderType::None) + { +#if KIERO_USE_MINHOOK + void* target = (void*)g_methodsTable[_index]; + if (MH_CreateHook(target, _function, _original) != MH_OK || MH_EnableHook(target) != MH_OK) + { + return Status::UnknownError; + } +#endif + + return Status::Success; + } + + return Status::NotInitializedError; +} + +void kiero::unbind(uint16_t _index) +{ + assert(_index >= 0); + + if (g_renderType != RenderType::None) + { +#if KIERO_USE_MINHOOK + MH_DisableHook((void*)g_methodsTable[_index]); +#endif + } +} + +kiero::RenderType::Enum kiero::getRenderType() +{ + return g_renderType; +} + +uint150_t* kiero::getMethodsTable() +{ + return g_methodsTable; +} \ No newline at end of file diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/kiero/kiero.h b/DirectX11 Edition/DevourUnlockerDirectX11/kiero/kiero.h new file mode 100644 index 0000000..f75f6a2 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/kiero/kiero.h @@ -0,0 +1,78 @@ +#ifndef __KIERO_H__ +#define __KIERO_H__ + +#include + +#define KIERO_VERSION "1.2.6" + +#define KIERO_INCLUDE_D3D9 0 // 1 if you need D3D9 hook +#define KIERO_INCLUDE_D3D10 0 // 1 if you need D3D10 hook +#define KIERO_INCLUDE_D3D11 1 // 1 if you need D3D11 hook +#define KIERO_INCLUDE_D3D12 0 // 1 if you need D3D12 hook +#define KIERO_INCLUDE_OPENGL 0 // 1 if you need OpenGL hook +#define KIERO_INCLUDE_VULKAN 0 // 1 if you need Vulkan hook +#define KIERO_USE_MINHOOK 1 // 1 if you will use kiero::bind function + +#define KIERO_ARCH_X64 0 +#define KIERO_ARCH_X86 0 + +#if defined(_M_X64) +# undef KIERO_ARCH_X64 +# define KIERO_ARCH_X64 1 +#else +# undef KIERO_ARCH_X86 +# define KIERO_ARCH_X86 1 +#endif + +#if KIERO_ARCH_X64 +typedef uint64_t uint150_t; +#else +typedef uint32_t uint150_t; +#endif + +namespace kiero +{ + struct Status + { + enum Enum + { + UnknownError = -1, + NotSupportedError = -2, + ModuleNotFoundError = -3, + + AlreadyInitializedError = -4, + NotInitializedError = -5, + + Success = 0, + }; + }; + + struct RenderType + { + enum Enum + { + None, + + D3D9, + D3D10, + D3D11, + D3D12, + + OpenGL, + Vulkan, + + Auto + }; + }; + + Status::Enum init(RenderType::Enum renderType); + void shutdown(); + + Status::Enum bind(uint16_t index, void** original, void* function); + void unbind(uint16_t index); + + RenderType::Enum getRenderType(); + uint150_t* getMethodsTable(); +} + +#endif // __KIERO_H__ \ No newline at end of file diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.command.1.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.command.1.tlog new file mode 100644 index 0000000..60f0178 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.command.1.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.read.1.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.read.1.tlog new file mode 100644 index 0000000..bc581a1 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.read.1.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.write.1.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.write.1.tlog new file mode 100644 index 0000000..7bc15d1 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/CL.write.1.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/DevourUnlockerDirectX11.lastbuildstate b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/DevourUnlockerDirectX11.lastbuildstate new file mode 100644 index 0000000..a56ad84 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/DevourUnlockerDirectX11.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows: +Release|x64|C:\Users\RyfiusLeeker\source\repos\DevourUnlockerDirectX11\| diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/DevourUnlockerDirectX11.write.1u.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/DevourUnlockerDirectX11.write.1u.tlog new file mode 100644 index 0000000..6d8d88e Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/DevourUnlockerDirectX11.write.1u.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.command.1.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.command.1.tlog new file mode 100644 index 0000000..ff38be0 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.command.1.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.read.1.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.read.1.tlog new file mode 100644 index 0000000..49009d0 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.read.1.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.write.1.tlog b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.write.1.tlog new file mode 100644 index 0000000..093b8b3 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUn.5e484f81.tlog/link.write.1.tlog differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.Build.CppClean.log b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.Build.CppClean.log new file mode 100644 index 0000000..928f029 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.Build.CppClean.log @@ -0,0 +1,22 @@ +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\vc143.pdb +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\kiero.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui_widgets.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui_tables.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui_impl_win32.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui_impl_dx11.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui_draw.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui_demo.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\imgui.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\dllmain.obj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\x64\release\minhook.x64.dll +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\x64\release\devourunlockerdirectx11.dll +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourunlockerdirectx11.ipdb +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\x64\release\devourunlockerdirectx11.pdb +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourunlockerdirectx11.iobj +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\cl.command.1.tlog +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\cl.read.1.tlog +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\cl.write.1.tlog +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\devourunlockerdirectx11.write.1u.tlog +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\link.command.1.tlog +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\link.read.1.tlog +c:\users\ryfiusleeker\source\repos\devourunlockerdirectx11\devourunlockerdirectx11\x64\release\devourun.5e484f81.tlog\link.write.1.tlog diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.dll.recipe b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.dll.recipe new file mode 100644 index 0000000..a2b1add --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.dll.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\RyfiusLeeker\source\repos\DevourUnlockerDirectX11\x64\Release\DevourUnlockerDirectX11.dll + + + + + + \ No newline at end of file diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.iobj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.iobj new file mode 100644 index 0000000..6efe7ba Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.iobj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.ipdb b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.ipdb new file mode 100644 index 0000000..9afed70 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.ipdb differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.log b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.log new file mode 100644 index 0000000..daa5303 --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.log @@ -0,0 +1,14 @@ + dllmain.cpp + imgui.cpp + imgui_demo.cpp + imgui_draw.cpp + imgui_impl_dx11.cpp + imgui_impl_win32.cpp + imgui_tables.cpp + imgui_widgets.cpp + kiero.cpp + Generating code + Previous IPDB not found, fall back to full compilation. + All 1532 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. + Finished generating code + DevourUnlockerDirectX11.vcxproj -> C:\Users\RyfiusLeeker\source\repos\DevourUnlockerDirectX11\x64\Release\DevourUnlockerDirectX11.dll diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.vcxproj.FileListAbsolute.txt b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..bf20ffb --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/DevourUnlockerDirectX11.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\RyfiusLeeker\source\repos\DevourUnlockerDirectX11\DevourUnlockerDirectX11\x64\Release\DevourUnlockerDirectX11.vcxproj.CopyComplete diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/_IsIncrementalBuild b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/_IsIncrementalBuild new file mode 100644 index 0000000..0e3fcce --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/_IsIncrementalBuild @@ -0,0 +1 @@ +x64\Release\\_IsIncrementalBuild diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/dllmain.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/dllmain.obj new file mode 100644 index 0000000..9ce8c42 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/dllmain.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui.obj new file mode 100644 index 0000000..1673430 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_demo.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_demo.obj new file mode 100644 index 0000000..49a67a7 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_demo.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_draw.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_draw.obj new file mode 100644 index 0000000..88f602c Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_draw.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_impl_dx11.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_impl_dx11.obj new file mode 100644 index 0000000..07d3bb7 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_impl_dx11.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_impl_win32.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_impl_win32.obj new file mode 100644 index 0000000..6b07105 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_impl_win32.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_tables.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_tables.obj new file mode 100644 index 0000000..08380e8 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_tables.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_widgets.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_widgets.obj new file mode 100644 index 0000000..539c052 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/imgui_widgets.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/kiero.obj b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/kiero.obj new file mode 100644 index 0000000..fac0f78 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/kiero.obj differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/vc143.pdb b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/vc143.pdb new file mode 100644 index 0000000..eabcd71 Binary files /dev/null and b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/vc143.pdb differ diff --git a/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/vcpkg.applocal.log b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/vcpkg.applocal.log new file mode 100644 index 0000000..b36c32f --- /dev/null +++ b/DirectX11 Edition/DevourUnlockerDirectX11/x64/Release/vcpkg.applocal.log @@ -0,0 +1,2 @@ + +C:\Users\RyfiusLeeker\source\repos\DevourUnlockerDirectX11\x64\Release\minhook.x64.dll