summaryrefslogtreecommitdiff
path: root/csgo-loader/csgo-client/Security/SyscallManager.hpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2018-12-20 21:38:04 +1300
committerboris <wzn@moneybot.cc>2018-12-20 21:38:04 +1300
commita5acd4c9a3b24c9d5af3a8f504e5af053fa7fa09 (patch)
tree27bc30d3f35e5daaaa15ee6de066119df8d352c7 /csgo-loader/csgo-client/Security/SyscallManager.hpp
parent77b52da44b263df4884be2f35f885d8edccbb6fa (diff)
yo is this loss
Diffstat (limited to 'csgo-loader/csgo-client/Security/SyscallManager.hpp')
-rw-r--r--csgo-loader/csgo-client/Security/SyscallManager.hpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/csgo-loader/csgo-client/Security/SyscallManager.hpp b/csgo-loader/csgo-client/Security/SyscallManager.hpp
index e154625..a9c67aa 100644
--- a/csgo-loader/csgo-client/Security/SyscallManager.hpp
+++ b/csgo-loader/csgo-client/Security/SyscallManager.hpp
@@ -11,9 +11,11 @@
using ByteArray = std::vector<uint8_t>;
-namespace Wrapper {
+namespace Wrapper
+{
// A stub used for our syscalls.
- class SyscallStub {
+ class SyscallStub
+ {
// The shellcode which executes a low latency system call.
uint8_t m_Shellcode[11] = {
0x4C, 0x8B, 0xD1, // mov r10, rcx
@@ -28,14 +30,16 @@ namespace Wrapper {
// Sets the syscall index.
void SetIndex(uint32_t Index);
- __forceinline uintptr_t Get() {
+ __forceinline uintptr_t Get()
+ {
return (uintptr_t)m_Shellcode;
}
};
// Manager for system calls. Used to iterate NTDLL for all syscall indices.
// Read: https://www.evilsocket.net/2014/02/11/on-windows-syscall-mechanism-and-syscall-numbers-extraction-methods/
- class SyscallManager {
+ class SyscallManager
+ {
// Reading NTDLL from disk because it cannot be modified
// due to restrictions put in place by PatchGuard.
ByteArray GetNtdllFromDisk();
@@ -54,7 +58,8 @@ namespace Wrapper {
// Finds a syscall by hash.
template < typename T >
- T Find(uint64_t Hash) {
+ T Find(uint64_t Hash)
+ {
return (T)m_Syscalls[Hash].Get();
}
};