Anonymous275 8f53052356 - IPC Uses PID to identify the process
- Exception code now shows in hex capitals
- Fixed version checking and bumped the version support
- Added process blacklist for already injected game detection
- Used std::all_of instead of std::string::find for digit checks
2022-07-25 17:09:42 +03:00

29 lines
915 B
C++

///
/// Created by Anonymous275 on 1/21/22
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
///
#pragma once
#include "Memory/Hook.h"
#include "Memory/GELua.h"
#include "Memory/IPC.h"
#include <memory>
#include <string>
class BeamNG {
public:
static void EntryPoint();
static void SendIPC(const std::string& Data);
private:
static inline std::unique_ptr<Hook<def::GEUpdate>> TickCountDetour;
static inline std::unique_ptr<Hook<def::lua_open_jit>> OpenJITDetour;
static inline std::unique_ptr<IPC> IPCFromLauncher;
static inline std::unique_ptr<IPC> IPCToLauncher;
static inline uint64_t GameBaseAddr;
static inline uint64_t DllBaseAddr;
static int lua_open_jit_D(lua_State* State);
static void RegisterGEFunctions();
// static int GetTickCount_D(void* GEState, void* Param2, void* Param3, void* Param4);
static void IPCListener();
};