From 2e56f04e4752f2c3c14ef7df98c7fb76afbd3a97 Mon Sep 17 00:00:00 2001 From: b6675 <76813404+b6675@users.noreply.github.com> Date: Fri, 1 Jan 2021 06:51:36 +0300 Subject: [PATCH] no need --- .../SystemFunctionXRefRemover.h | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 ultimateteknotool.v2/SystemFunctionXRefRemover.h diff --git a/ultimateteknotool.v2/SystemFunctionXRefRemover.h b/ultimateteknotool.v2/SystemFunctionXRefRemover.h deleted file mode 100644 index 38665fb..0000000 --- a/ultimateteknotool.v2/SystemFunctionXRefRemover.h +++ /dev/null @@ -1,68 +0,0 @@ -#pragma once -#include -#include "debugconsole.h" - -template -struct XRefRemover_SysFunctionUI32 -{ - uint32_t _pointers[BFSZ]; - XRefRemover_SysFunctionUI32() - { - if (BFSZ < 4) { throw 1; } - _pointers[0] = 0x00; - for (size_t sz = 1; sz < BFSZ; sz++) - { - _pointers[sz] = _pointers[0]; - } - } - ~XRefRemover_SysFunctionUI32() = default; -#define XRefRemover_FAKEADR(index) index + fake_address - xfake_address -#pragma optimize("" ,off) - template - void AddNewFunction(void* addr, uint32_t xfake_address) - { - - _pointers[XRefRemover_FAKEADR(0)] = *reinterpret_cast(addr); - _pointers[XRefRemover_FAKEADR(1)] = reinterpret_cast(addr) ^ _pointers[0]; - _pointers[XRefRemover_FAKEADR(2)] = *(reinterpret_cast(addr) + 1); - } - template - void* GetFunction(uint32_t xfake_address) const - { - return reinterpret_cast(_pointers[XRefRemover_FAKEADR(1)] ^ _pointers[XRefRemover_FAKEADR(0)]); - } - void VerifyFunction() const - { - uint32_t addr = 0x00; - if ( - *reinterpret_cast(_pointers[1] ^ _pointers[0]) != _pointers[0] - ) - { - addr = 0x7F340000; - __asm { - jmp [addr]; - } - } - else if (*(reinterpret_cast(_pointers[1] ^ _pointers[0]) + 1) != _pointers[2]) - { - addr = 0x0010AB00; - __asm { - jmp [addr]; - } - } - else - { - - } - } - template - void* GetVerifiedFunction(uint32_t xfake_address) const - { - this->VerifyFunction(); - return this->GetFunction(xfake_address); - } - - size_t Size() const noexcept { return BFSZ; } -#undef XRefRemover_FAKEADR -#pragma optimize("" ,on) -}; \ No newline at end of file