Renamed tp6.c to core.c

This commit is contained in:
mkrsym1 2023-07-28 01:51:04 +03:00
parent 4e614e1d82
commit 80c817cb6b
9 changed files with 28 additions and 28 deletions

2
.gitignore vendored
View File

@ -3,7 +3,7 @@
.directory .directory
# File withheld to make abuse more difficult # File withheld to make abuse more difficult
game_payload/src/tp6.c game_payload/src/core.c
build build
out out

View File

@ -45,7 +45,7 @@ This tool consists of three parts: the main injector (`injector/src/exe.c`), the
I am very bad at explaining, so just take a look at the source code. Maybe I'll write a detailed explanation in the future. I am very bad at explaining, so just take a look at the source code. Maybe I'll write a detailed explanation in the future.
A part of the source code is witheld (`game_payload/src/tp6.c`). This is a forced measure to make abuse more difficult. However, a precompiled blob is provided in the repo. `build.sh` will use it automatically. A part of the source code is witheld (`game_payload/src/core.c`). This is a forced measure to make abuse more difficult. However, a precompiled blob is provided in the repo. `build.sh` will use it automatically.
### Guildelines ### Guildelines
1. **Please don't share this project in public.** This might attract unnecessary attention from either the Game Company or the Anticheat Company 1. **Please don't share this project in public.** This might attract unnecessary attention from either the Game Company or the Anticheat Company

View File

@ -0,0 +1,7 @@
#pragma once
#include <windows.h>
#include <game.h>
void core_setup_patcher(struct game_data *game, HMODULE baseModule);

View File

@ -1,7 +0,0 @@
#pragma once
#include <windows.h>
#include <game.h>
void tp6_setup_patcher(struct game_data *game, HMODULE baseModule);

View File

@ -38,34 +38,34 @@ res_object = custom_target(
command: [ gen_res, '--object', meson.current_source_dir(), '@OUTPUT0@', '@INPUT@' ] command: [ gen_res, '--object', meson.current_source_dir(), '@OUTPUT0@', '@INPUT@' ]
) )
if fs.exists('src/tp6.c') if fs.exists('src/core.c')
# Compile the real file first (dirty hack) # Compile the real file first (dirty hack)
tp6c_fake_exe = executable( core_fake_exe = executable(
'tp6c.o', 'core.o',
'src/tp6.c', 'src/core.c',
res_header, res_header,
link_args: [ '-r' ], # Output an object file link_args: [ '-r' ], # Output an object file
include_directories: include_dir include_directories: include_dir
) )
# another dirty hack # another dirty hack
copy_tp6c = find_program('copy_tp6c.sh') copy_core = find_program('copy_core.sh')
tp6c_target = [custom_target( core_target = [custom_target(
'copy_tp6c', 'copy_core',
output: 'tp6c.o', output: 'core.o',
input: tp6c_fake_exe.extract_all_objects(recursive: false), input: core_fake_exe.extract_all_objects(recursive: false),
command: [ command: [
copy_tp6c, copy_core,
'@INPUT0@', '@INPUT0@',
'@OUTPUT0@', meson.current_source_dir() / 'blob/tp6c.o' '@OUTPUT0@', meson.current_source_dir() / 'blob/core.o'
] ]
)] )]
tp6c_blob = [] core_blob = []
else else
message('Using precompiled tp6c blob. Refer to the readme for more details') message('Using precompiled core blob. Refer to the readme for more details')
tp6c_target = [] core_target = []
tp6c_blob = [ 'blob/tp6c.o' ] core_blob = [ 'blob/core.o' ]
endif endif
shared_library( shared_library(
@ -73,8 +73,8 @@ shared_library(
sources, sources,
res_header, res_header,
res_object, res_object,
tp6c_target, core_target,
objects: tp6c_blob, objects: core_blob,
include_directories: include_dir, include_directories: include_dir,
name_prefix: '' name_prefix: ''
) )

View File

@ -3,7 +3,7 @@
#include <ntdll.h> #include <ntdll.h>
#include <ace.h> #include <ace.h>
#include <game.h> #include <game.h>
#include <tp6.h> #include <core.h>
#include <utils.h> #include <utils.h>
#include <main.h> #include <main.h>
@ -46,7 +46,7 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) {
ace_load_driver_module(); ace_load_driver_module();
// ...magic // ...magic
tp6_setup_patcher(&game, baseModule); core_setup_patcher(&game, baseModule);
// Load the UnityPlayer module and invoke the callback // Load the UnityPlayer module and invoke the callback
HMODULE unityModule = LoadLibraryA("UnityPlayer.dll"); HMODULE unityModule = LoadLibraryA("UnityPlayer.dll");