diff options
| author | boris <wzn@moneybot.cc> | 2019-01-03 16:51:40 +1300 |
|---|---|---|
| committer | boris <wzn@moneybot.cc> | 2019-01-03 16:51:40 +1300 |
| commit | e1f048c8f922613aec1f63791c2191e55cbd5132 (patch) | |
| tree | 887f57c58673e775bff8c1df3f23943ef8ddd6cd /csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp | |
| parent | c0f1354a301ce2a2fc867a89fafdde4571c07c02 (diff) | |
ricardo milos :DDDD::D:D:D:
Diffstat (limited to 'csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp')
| -rw-r--r-- | csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp b/csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp index 6699a9e..2e5d216 100644 --- a/csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp +++ b/csgo-loader/csgo-client/RemoteCode/RemoteInjectionClient.hpp @@ -5,8 +5,65 @@ namespace RemoteCode
{
+ // Used for TransactionStart
+ using ImportedModule = char[64];
+ using ImportList = std::vector<ImportedModule>;
+
+ // Used for TransactionContinue
+ struct ExportedFunction
+ {
+ // I've never seen modules / functions with names
+ // that were larger than 64 characters.
+ char m_Module[64];
+ char m_Function[64];
+
+ // Address of exported module / function
+ uintptr_t m_ModuleAddress;
+ uintptr_t m_FunctionAddress;
+ };
+
+ using ExportList = std::vector<ExportedFunction>;
+
+ // Used for TransactionCommit
+ struct RemoteInjectionHeader
+ {
+ // Used to decrypt the cheat header (first 1000 bytes of image sent back).
+ uint8_t m_HeaderKey;
+
+ // Used to call entrypoint/TLS callbacks.
+ uintptr_t m_EntryPoint;
+ uintptr_t m_TlsDirectory;
+ };
+
+ struct RemoteInjectionCode
+ {
+ RemoteInjectionHeader m_Header;
+
+ // Actual injection code.
+ ByteArray m_Code;
+ };
+
+ // Implementation of client mapping code
class RemoteInjectionClient
{
+ RemoteInjectionHeader m_Header;
+ RemoteProcess m_Process;
+
+ public:
+ // Receive hash of selected cheat.
+ // Reply with size of image to allocate.
+ ByteArray Start(ByteArray &Response);
+
+ // Receive client header, send over list of imported functions
+ ByteArray TransactionStart(ByteArray &Response);
+
+ // Receive list of modules & export addresses
+ ByteArray TransactionContinue(ByteArray &Response);
+
+ // Write the file to the
+ void TransactionCommit(ByteArray &Response);
+ RemoteProcess GetProcess() { return m_Process; }
+ RemoteInjectionHeader GetHeader() { return m_Header; }
};
}
\ No newline at end of file |
