Untitled
unknown
plain_text
a year ago
3.5 kB
11
Indexable
#ifdef _M_IX86
#include <StdInc.h>
#include "Utility/InitFunction.h"
#include "Utility/ES3XLauncherHook.h"
#ifdef _DEBUG
static DWORD imageBase;
extern int* ffbOffset;
extern int* ffbOffset2;
extern int* ffbOffset3;
extern int* ffbOffset4;
extern int* ffbOffset5;
static const char* GameName = V("TeknoParrot - Transformers:Shadows Rising");
static HWND(WINAPI* CreateWindowExAOri)(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
static HWND WINAPI CreateWindowExAHook(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
lpWindowName = "TeknoParrot - Transformers:Shadows Rising";
int w = GetSystemMetrics(SM_CXSCREEN);
int h = GetSystemMetrics(SM_CYSCREEN);
dwStyle = SWP_FRAMECHANGED | SWP_SHOWWINDOW | WS_POPUP | SWP_NOSIZE;
return CreateWindowExAOri(dwExStyle, lpClassName, lpWindowName, dwStyle, 0, 0, 1280, 720, hWndParent, hMenu, hInstance, lpParam);
}
static HWND(WINAPI* CreateWindowExWOri)(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
static HWND WINAPI CreateWindowExWHook(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
lpWindowName = L"TeknoParrot - Transformers:Shadows Rising";
int w = GetSystemMetrics(SM_CXSCREEN);
int h = GetSystemMetrics(SM_CYSCREEN);
dwStyle = SWP_FRAMECHANGED | SWP_SHOWWINDOW | WS_POPUP | SWP_NOSIZE;
return CreateWindowExWOri(dwExStyle, lpClassName, lpWindowName, dwStyle, 0, 0, 1280, 720, hWndParent, hMenu, hInstance, lpParam);
}
static int ThreadLoop()
{
VM("TransformersShadowsRisingThreadLoop");
VE();
return 0;
}
static DWORD WINAPI RunningLoop(LPVOID lpParam)
{
while (true)
{
ThreadLoop();
Sleep(16);
}
}
static int ret0()
{
return 0;
}
static InitFunction TransformersShadowsRisingFunc([]()
{
VL("TransformersShadowsRisingFunc");
info("Transformers Shadows Rising Game Launched!!");
imageBase = (DWORD)GetModuleHandle(0);
MH_Initialize();
//if (ToBool(config[V("General")][V("Borderless Fullscreen")]))
{
MH_CreateHookApi(VW(L"user32.dll"), V("CreateWindowExW"), CreateWindowExWHook, (void**)&CreateWindowExWOri);
MH_CreateHookApi(VW(L"user32.dll"), V("CreateWindowExA"), CreateWindowExAHook, (void**)&CreateWindowExAOri);
}
MH_EnableHook(MH_ALL_HOOKS);
CreateThread(NULL, 0, RunningLoop, NULL, 0, NULL);
VE();
}, GameID::TransformersShadowsRising);
static InitFunction TransformersShadowsRisingShellFunc([]()
{
VL("TransformersShadowsRisingShellFunc");
info("Transformers Shadows Rising Shell Launched!!");
//injector::MakeJMP(imageBase + 0xBE20, ret0); // Stop Shell launching game
MH_Initialize();
//MH_CreateHookApi(L"kernel32.dll", "CreateProcessA", CreateProcessAHook, (void**)&g_origCreateProcessA);
//MH_CreateHookApi(L"kernel32.dll", "CreateProcessW", CreateProcessWHook, (void**)&g_origCreateProcessW);
MH_EnableHook(MH_ALL_HOOKS);
VE();
}, GameID::TransformersShadowsRisingShell);
#endif
#endifEditor is loading...
Leave a Comment