diff --git a/Resources/NetHook/DataDumper.cpp b/Resources/NetHook/DataDumper.cpp
deleted file mode 100644
index f9e91a7a..00000000
--- a/Resources/NetHook/DataDumper.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-#include "DataDumper.h"
-#include "logger.h"
-#include "utils.h"
-
-#include "zip.h"
-#include "bitbuf.h"
-
-#include "steam/clientmsgs.h"
-#include "steammessages_base.pb.h"
-
-CDataDumper::CDataDumper() :
- m_uiMsgNum(0)
-{
- time_t tCurrentTime;
- time(&tCurrentTime);
-
- sprintf_s(m_szSessionDir, sizeof( m_szSessionDir ), "%d\\", tCurrentTime);
-
- g_Logger->CreateDir(m_szSessionDir);
-}
-
-void CDataDumper::DataEncrypted(const uint8* pubPlaintextData, uint32 cubPlaintextData)
-{
- this->HandleNetMsg(k_eNetOutgoing, (EMsg) *(short *) pubPlaintextData, pubPlaintextData, cubPlaintextData);
-}
-
-void CDataDumper::DataDecrypted(const uint8* pubPlaintextData, uint32 cubPlaintextData)
-{
- this->HandleNetMsg(k_eNetIncoming, (EMsg) *(short *) pubPlaintextData, pubPlaintextData, cubPlaintextData);
-}
-
-bool CDataDumper::HandleNetMsg( ENetDirection eDirection, EMsg eMsg, const uint8 *pData, uint32 cubData )
-{
- eMsg = (EMsg)((int)eMsg & (~0x80000000));
-
- if ( eMsg == k_EMsgMulti )
- return this->MultiplexMsgMulti(eDirection, pData, cubData);
-
- const char* szFile = this->GetFileName(eDirection, eMsg);
- g_Logger->LogFileData(szFile, pData, cubData);
-
- g_Logger->LogConsole("Wrote %d bytes to %s\n", cubData, szFile);
-
- return true;
-}
-
-const char* CDataDumper::GetFileName(ENetDirection eDirection, EMsg eMsg)
-{
- static char szFileName[MAX_PATH];
-
- sprintf_s(szFileName, sizeof( szFileName ), "%s%d_%s_%d_%s.bin", m_szSessionDir,
- ++m_uiMsgNum, (eDirection == k_eNetIncoming ? "in" : "out"), eMsg,
- g_Crypto->GetMessage(eMsg));
-
- return szFileName;
-}
-
-const char* CDataDumper::GetFileName( const char* file )
-{
- static char szFileName[MAX_PATH];
-
- sprintf_s(szFileName, sizeof( szFileName ), "%s%s", m_szSessionDir,
- file);
-
- return szFileName;
-}
-
-bool CDataDumper::MultiplexMsgMulti( ENetDirection eDirection, const uint8 *pData, uint32 cubData )
-{
- struct ProtoHdr
- {
- EMsg msg;
- int headerLength;
- };
-
-
- ProtoHdr *pProtoHdr = (ProtoHdr*) pData;
-
- g_Logger->LogConsole("Multi: msg %d length %d\n", (pProtoHdr->msg & (~0x80000000)), pProtoHdr->headerLength );
-
- CMsgProtoBufHeader protoheader;
- protoheader.ParseFromArray( pData + 8, pProtoHdr->headerLength );
-
- g_Logger->LogConsole("MultiProto\n");
-
- CMsgMulti multi;
- multi.ParseFromArray( pData + 8 + pProtoHdr->headerLength, cubData - 8 - pProtoHdr->headerLength );
-
- g_Logger->LogConsole("MultiMsg: %d %d\n", multi.size_unzipped(), multi.message_body().length() );
-
- uint8 *pMsgData = NULL;
- uint32 cubMsgData = 0;
- bool bDecomp = false;
-
- if ( multi.has_size_unzipped() && multi.size_unzipped() != 0 )
- {
- // decompress our data
-
- uint8 *pDecompressed = new uint8[ multi.size_unzipped() ];
- uint8 *pCompressed = (uint8 *)( multi.message_body().c_str() );
- uint32 cubCompressed = multi.message_body().length();
-
- g_Logger->LogConsole("decomp: %x comp: %x cubcomp: %d unzipped: %d\n", pDecompressed, pCompressed, cubCompressed, multi.size_unzipped());
-
- bool bZip = CZip::Inflate( pCompressed, cubCompressed, pDecompressed, multi.size_unzipped() );
-
- if ( !bZip )
- {
- delete [] pDecompressed;
-
- g_Logger->LogConsole("Unable to decompress buffer\n");
-
- return true;
- }
-
- pMsgData = pDecompressed;
- cubMsgData = multi.size_unzipped();
- bDecomp = bZip;
- }
- else
- {
- pMsgData = (uint8 *)( multi.message_body().c_str() );
- cubMsgData = multi.message_body().length();
- }
-
- bf_read reader( pMsgData, cubMsgData );
-
- while ( reader.GetNumBytesLeft() > 0 )
- {
- uint32 cubPayload = (uint32)reader.ReadLong();
- int off = reader.GetNumBitsRead() >> 3;
-
- uint8 *pPayload = (uint8 *)( pMsgData + off );
- EMsg *pEMsg = (EMsg *)pPayload;
-
- reader.SeekRelative( cubPayload << 3 );
-
- this->HandleNetMsg( eDirection, *pEMsg, pPayload, cubPayload );
- }
-
- if ( bDecomp )
- delete [] pMsgData;
-
- return true;
-}
\ No newline at end of file
diff --git a/Resources/NetHook/DataDumper.h b/Resources/NetHook/DataDumper.h
deleted file mode 100644
index 85dace47..00000000
--- a/Resources/NetHook/DataDumper.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef DATADUMPER_H_
-#define DATADUMPER_H_
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "time.h"
-
-#include "crypto.h"
-#include "steam/emsg.h"
-
-enum ENetDirection
-{
- k_eNetIncoming,
- k_eNetOutgoing,
-};
-
-class CDataDumper : public ICryptoCallback
-{
-public:
- CDataDumper();
-
- void DataEncrypted(const uint8* pubPlaintextData, uint32 cubPlaintextData);
- void DataDecrypted(const uint8* pubPlaintextData, uint32 cubPlaintextData);
-
- const char* GetFileName( const char* file );
-
-private:
- bool HandleNetMsg( ENetDirection eDirection, EMsg eMsg, const uint8 *pData, uint32 cubData );
- bool MultiplexMsgMulti( ENetDirection eDirection, const uint8 *pData, uint32 cubData );
-
- const char* GetFileName( ENetDirection eDirection, EMsg eMsg );
-
- char m_szSessionDir[MAX_PATH];
- uint32 m_uiMsgNum;
-};
-
-extern CDataDumper* g_Dumper;
-
-#endif // !DATADUMPER_H_
\ No newline at end of file
diff --git a/Resources/NetHook/NetHook.sln b/Resources/NetHook/NetHook.sln
deleted file mode 100644
index 33b2d704..00000000
--- a/Resources/NetHook/NetHook.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHook", "NetHook.vcxproj", "{04A24EE0-87D6-4CFB-BE63-7A9BC777B1A8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {04A24EE0-87D6-4CFB-BE63-7A9BC777B1A8}.Debug|Win32.ActiveCfg = Debug|Win32
- {04A24EE0-87D6-4CFB-BE63-7A9BC777B1A8}.Debug|Win32.Build.0 = Debug|Win32
- {04A24EE0-87D6-4CFB-BE63-7A9BC777B1A8}.Release|Win32.ActiveCfg = Release|Win32
- {04A24EE0-87D6-4CFB-BE63-7A9BC777B1A8}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Resources/NetHook/NetHook.vcproj b/Resources/NetHook/NetHook.vcproj
deleted file mode 100644
index 7dcccd99..00000000
--- a/Resources/NetHook/NetHook.vcproj
+++ /dev/null
@@ -1,863 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Resources/NetHook/NetHook.vcxproj b/Resources/NetHook/NetHook.vcxproj
deleted file mode 100644
index af6d9c06..00000000
--- a/Resources/NetHook/NetHook.vcxproj
+++ /dev/null
@@ -1,268 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
-
- {04A24EE0-87D6-4CFB-BE63-7A9BC777B1A8}
- NetHook
- Win32Proj
-
-
-
- DynamicLibrary
- NotSet
- true
-
-
- DynamicLibrary
- NotSet
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>10.0.30319.1
- $(SolutionDir)$(Configuration)\
- $(Configuration)\
- true
- $(SolutionDir)$(Configuration)\
- $(Configuration)\
- false
- AllRules.ruleset
-
-
- AllRules.ruleset
-
-
-
-
-
- Disabled
- tier0;tier1;public;.;G:\dev\C++\Open Steamworks\Open Steamworks;C:\Users\ryan\Documents\development\Open Steamworks\Open Steamworks;%(AdditionalIncludeDirectories)
- WIN32;_WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- EditAndContinue
-
-
- Ws2_32.lib;steam.lib;%(AdditionalDependencies)
- G:\dev\C++\Open Steamworks;C:\Users\ryan\Documents\development\Open Steamworks;%(AdditionalLibraryDirectories)
- %(IgnoreSpecificDefaultLibraries)
- true
- Console
- MachineX86
-
-
-
-
- MaxSpeed
- true
- tier0;tier1;public;.;C:\opensteamworks\Open Steamworks;%(AdditionalIncludeDirectories)
- WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- MultiThreadedDLL
- true
-
-
- Level3
- ProgramDatabase
-
-
- Ws2_32.lib;%(AdditionalDependencies)
- true
- Windows
- true
- true
- MachineX86
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Resources/NetHook/NetHook.vcxproj.filters b/Resources/NetHook/NetHook.vcxproj.filters
deleted file mode 100644
index 9336e021..00000000
--- a/Resources/NetHook/NetHook.vcxproj.filters
+++ /dev/null
@@ -1,526 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93ff0feb-41ba-4a2c-9515-743871565253}
-
-
- {ed4f167c-f6fc-4a3f-b5c7-5c0d4571646f}
-
-
- {fa004520-6c3d-4c8b-9247-46be82bbb9f6}
-
-
- {7674315e-74a1-451d-a9f1-1a33fb9f8a3a}
-
-
- {cefb79e7-d12e-4d17-ab50-23b2365add3d}
-
-
- {b948904a-73d7-445e-bfa7-146fcdf8dffa}
-
-
- {f03368a7-6e2f-45f0-aabc-6aa1fcdee7f9}
-
-
- {9b6b88a4-c98c-4a87-b335-1fc72128660a}
-
-
- {ce62386e-1161-49e4-9f21-f912acbb45e2}
-
-
- {f9881518-2823-4cab-ae08-0a00f32a3207}
-
-
- {66a163d1-a739-4f18-8b60-d2b5790462c3}
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- tier1\Source
-
-
- tier1\Source
-
-
- tier1\Source
-
-
- tier1\Source
-
-
- tier1\Source
-
-
- Helpers
-
-
- Helpers
-
-
- Helpers
-
-
- Source Files
-
-
-
-
- Headers
-
-
- Headers
-
-
- Headers
-
-
- Headers
-
-
- Headers
-
-
- Headers
-
-
- Steam Headers
-
-
- Steam Headers
-
-
- Steam Headers
-
-
- Steam Headers
-
-
- Steam Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier1\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- tier0\Headers
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- mathlib
-
-
- Helpers
-
-
- Helpers
-
-
- Helpers
-
-
- Helpers
-
-
- public
-
-
- public
-
-
- public
-
-
- zlib
-
-
- zlib
-
-
- Headers
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Resources/NetHook/clientapp.cpp b/Resources/NetHook/clientapp.cpp
deleted file mode 100644
index ca7ad35f..00000000
--- a/Resources/NetHook/clientapp.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include
-#include
-
-#include "clientapp.h"
-
-#include "utils.h"
-#include "logger.h"
-#include "crypto.h"
-#include "DataDumper.h"
-
-#include "interface.h"
-
-#define STEAMTYPES_H
-#include "usercommon.h"
-#include "ESteamError.h"
-#include "isteamclient009.h"
-#include "isteamgameserver010.h"
-#include "steammessages_base.pb.h"
-
-CDataDumper* g_Dumper;
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
- if ( fdwReason == DLL_PROCESS_ATTACH )
- {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- AllocConsole();
- LoadLibrary("steamclient.dll");
-
- g_Logger = new CLogger(".\\");
- g_Dumper = new CDataDumper();
- g_Crypto = new CCrypto(g_Dumper);
- }
- else if ( fdwReason == DLL_PROCESS_DETACH )
- {
- delete g_Crypto;
- delete g_Dumper;
- delete g_Logger;
- }
-
- return TRUE;
-}
diff --git a/Resources/NetHook/clientapp.h b/Resources/NetHook/clientapp.h
deleted file mode 100644
index ef929a52..00000000
--- a/Resources/NetHook/clientapp.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#ifndef CLIENTAPP_H_
-#define CLIENTAPP_H_
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-#define STEAM_API_EXPORTS
-
-#include "steam/steamtypes.h"
-
-typedef int ( STEAM_CALL *SteamExeFrameFn )( int, int );
-typedef int ( STEAM_CALL *SteamDllMainFn )( int , char ** );
-
-
-#define CLIENTAPP( entry ) \
- SteamExeFrameFn g_SteamExeFrame = NULL; \
- int entry( int argc, char **argv ); \
- S_API int STEAM_CALL SteamDllMain( int argc, char **argv ) \
- { \
- return entry( argc, argv ); \
- } \
- S_API int STEAM_CALL SteamDllMainEx( int argc, char **argv, SteamExeFrameFn frameFn ) \
- { \
- g_SteamExeFrame = frameFn; \
- return entry( argc, argv ); \
- }
-
-
-#endif // !CLIENTAPP_H_
diff --git a/Resources/NetHook/crypto.cpp b/Resources/NetHook/crypto.cpp
deleted file mode 100644
index c6cf40e3..00000000
--- a/Resources/NetHook/crypto.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-#include "crypto.h"
-
-#include "DataDumper.h"
-#include "logger.h"
-#include "utils.h"
-
-#include "csimplescan.h"
-#include "csimpledetour.h"
-
-#include "steam/steamtypes.h"
-
-#include "tier0/dbg.h"
-#undef GetMessage
-
-CCrypto* g_Crypto = NULL;
-
-bool (__cdecl *Encrypt_Orig)(const uint8*, uint32, uint8*, uint32*, uint32);
-bool (__cdecl *Decrypt_Orig)(const uint8*, uint32, uint8*, uint32*, const uint8*, uint32);
-bool (__cdecl *GetMessageFn)( int * );
-
-CCrypto::CCrypto(ICryptoCallback* callback) :
- m_Callback(callback)
-{
- CSimpleScan steamClientScan( "steamclient.dll" );
-
- bool bRet = steamClientScan.FindFunction(
- "\x55\x8B\xEC\x6A\xFF\x68\x01\x47\x32\x38\x64\xA1\x00\x00\x00\x00\x50\x64\x89\x25\x00\x00\x00\x00\x81\xEC\x04\x09\x00\x00",
- "xxxxxx????xxxxxxxxxxxxxxxxxxxx",
- (void **)& Encrypt_Orig
- );
-
- g_Logger->LogConsole( "CCrypto::SymmetricEncrypt = 0x%x \n", Encrypt_Orig );
-
-
- bRet = steamClientScan.FindFunction(
- "\x55\x8B\xEC\x6A\xFF\x68\x21\x74\x28\x38\x64\xA1\x00\x00\x00\x00\x50\x64\x89\x25\x00\x00\x00\x00\x81\xEC\xE8\x04\x00\x00",
- "xxxxxx????xxxxxxxxxxxxxxxxxxx",
- (void **)& Decrypt_Orig
- );
-
- g_Logger->LogConsole( "CCrypto::SymmetricDecrypt = 0x%x\n", Decrypt_Orig );
-
- /*
- "51 A1 FC 24 33 38 | 8B 08 85 C9 75 05 89 0C 24 EB 28 E8 DA 09 E7 FF 8D 14 24 52 6A 04 6A 00 68 BC"
- "\x51\xA1\xFF\xFF\xFF\xFF\x8B\x08\x85\xC9\x75\x05\x89\x0C\x24\xEB\x28\xE8"
- "xx????"
-
- "\x51\xA1\x00\x95\x32\x38\x8B\x08\x85\xC9\x75\x05\x89\x0C\x24\xEB\x28\xE8\xA1\xBF\xE5\xFF\x8D\x14\x24\x52"
- "\x6A\x04\x6A\x00\x68\x9C\x35\x36\x38\x6A\x00\x68\xF8\xEF\x38\x38\x8B\xC8\x89\x44\x24\x18",
- "xx????xxxxx?xxxx?x????xxxx"
- "xxxxxxxxxxxxxxxxxxxxxx",
- */
-
- bRet = steamClientScan.FindFunction(
- "\x51\xA1\x00\x95\x32\x38\x8B\x08\x85\xC9\x75\x05\x89\x0C\x24\xEB\x28\xE8",
- "xx????xxxxxxxxxxxx",
- (void **) &GetMessageFn
- );
-
- g_Logger->LogConsole( "CMessageList::GetMessage = 0x%x\n", GetMessageFn );
-
- for ( int x = 0; x < 7003; ++x )
- {
- //g_Logger->AppendFile( g_Dumper->GetFileName( "emsg_list.txt" ), "\t%s = %d,\r\n", this->GetMessage( (EMsg)x ), x );
- }
-
-
- static bool (__cdecl *encrypt)(const uint8*, uint32, uint8*, uint32*, uint32) = &CCrypto::SymmetricEncrypt;
- static bool (__cdecl *decrypt)(const uint8*, uint32, uint8*, uint32*, const uint8*, uint32) = &CCrypto::SymmetricDecrypt;
-
- Encrypt_Detour = new CSimpleDetour((void **) &Encrypt_Orig, *(void**) &encrypt);
- Decrypt_Detour = new CSimpleDetour((void **) &Decrypt_Orig, *(void**) &decrypt);
-
- Encrypt_Detour->Attach();
- Decrypt_Detour->Attach();
-}
-
-CCrypto::~CCrypto()
-{
- Encrypt_Detour->Detach();
- Decrypt_Detour->Detach();
-
- delete Encrypt_Detour;
- delete Decrypt_Detour;
-}
-
-// This call got strangely optimized. Don't clobber ECX.
-__declspec(naked) bool __cdecl CCrypto::SymmetricEncrypt( const uint8 *pubPlaintextData, uint32 cubPlaintextData, uint8 *pubEncryptedData, uint32 *pcubEncryptedData, uint32 cubKey )
-{
- __asm {
- // prologue
- push ebp;
- mov ebp, esp;
- sub esp, __LOCAL_SIZE;
-
- // this needs to be saved (aes key)
- push ecx;
- }
-
- if ( g_Crypto )
- g_Crypto->m_Callback->DataEncrypted(pubPlaintextData, cubPlaintextData);
-
- __asm {
- // call it manually here, prevent
- // it from 'helpfully' using ECX
-
- // prep aes key in register
- pop ecx;
-
- // push args
- push cubKey;
- push pcubEncryptedData;
- push pubEncryptedData;
- push cubPlaintextData;
- push pubPlaintextData;
-
- // call!
- call Encrypt_Orig;
-
- // cleanup
- add esp, 0x14;
-
- // epilogue
- mov esp, ebp;
- pop ebp;
- ret;
- }
-}
-
-// This function is considerably less retarded
-bool __cdecl CCrypto::SymmetricDecrypt( const uint8 *pubEncryptedData, uint32 cubEncryptedData, uint8 *pubPlaintextData, uint32 *pcubPlaintextData, const uint8 *pubKey, uint32 cubKey )
-{
- bool ret = (*Decrypt_Orig)(pubEncryptedData, cubEncryptedData, pubPlaintextData, pcubPlaintextData, pubKey, cubKey);
-
- if ( g_Crypto )
- g_Crypto->m_Callback->DataDecrypted(pubPlaintextData, *pcubPlaintextData);
-
- return ret;
-}
-
-const char* CCrypto::GetMessage( EMsg eMsg )
-{
- static char *szMsg = new char[ 200 ];
-
- int ieMsg = (int)eMsg;
-
- bool bRet = false;
-
- __asm
- {
- pushad
-
- lea esi, [ szMsg ]
- mov ecx, 200
- mov edi, ieMsg
-
- push 0xFF
-
- call GetMessageFn
- mov bRet, al
-
- popad
- }
-
- if ( bRet )
- {
- return szMsg;
- }
- else
- {
- return "INVALID";
- }
-}
\ No newline at end of file
diff --git a/Resources/NetHook/crypto.h b/Resources/NetHook/crypto.h
deleted file mode 100644
index 4e879c16..00000000
--- a/Resources/NetHook/crypto.h
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#ifndef CRYPTO_H_
-#define CRYPTO_H_
-#ifdef _WIN32
-#pragma once
-#endif
-
-#define _WINSOCKAPI_ // god damn winsock headers
-
-#include "logger.h"
-#include "csimpledetour.h"
-#include "steam/steamtypes.h"
-#include "steam/emsg.h"
-#undef GetMessage
-
-class ICryptoCallback
-{
-public:
- virtual void DataEncrypted(const uint8* pubPlaintextData, uint32 cubPlaintextData) = 0;
- virtual void DataDecrypted(const uint8* pubPlaintextData, uint32 cubPlaintextData) = 0;
-};
-
-class CCrypto
-{
-public:
- CCrypto(ICryptoCallback* callback);
- ~CCrypto();
-
- const char* GetMessage( EMsg eMsg );
-
-private:
- ICryptoCallback* m_Callback;
-
- CSimpleDetour* Encrypt_Detour;
- CSimpleDetour* Decrypt_Detour;
-
- static bool __cdecl SymmetricEncrypt( const uint8 *pubPlaintextData, uint32 cubPlaintextData, uint8 *pubEncryptedData, uint32 *pcubEncryptedData, uint32 cubKey );
- static bool __cdecl SymmetricDecrypt( const uint8 *pubEncryptedData, uint32 cubEncryptedData, uint8 *pubPlaintextData, uint32 *pcubPlaintextData, const uint8 *pubKey, uint32 cubKey );
-};
-
-extern CCrypto* g_Crypto;
-
-#endif // !CRYPTO_H_
diff --git a/Resources/NetHook/csimpledetour.cpp b/Resources/NetHook/csimpledetour.cpp
deleted file mode 100644
index f3024065..00000000
--- a/Resources/NetHook/csimpledetour.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include "csimpledetour.h"
-
-
-CSimpleDetour::CSimpleDetour(void **old, void *replacement)
-{
- m_fnOld = old;
- m_fnReplacement = replacement;
-}
-
-void CSimpleDetour::Attach()
-{
- DetourTransactionBegin();
- DetourUpdateThread(GetCurrentThread());
-
- DetourAttach(m_fnOld, m_fnReplacement);
-
- DetourTransactionCommit();
-
- m_bAttached = true;
-}
-
-void CSimpleDetour::Detach()
-{
- if (!m_bAttached)
- return;
-
- DetourTransactionBegin();
- DetourUpdateThread(GetCurrentThread());
-
- DetourDetach(m_fnOld, m_fnReplacement);
-
- DetourTransactionCommit();
-}
\ No newline at end of file
diff --git a/Resources/NetHook/csimpledetour.h b/Resources/NetHook/csimpledetour.h
deleted file mode 100644
index b1f9470f..00000000
--- a/Resources/NetHook/csimpledetour.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-#ifndef CSIMPLEDETOUR_H_
-#define CSIMPLEDETOUR_H_
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-#include "detours.h"
-
-
-class CSimpleDetour
-{
-
-public:
- CSimpleDetour( void **old, void *replacement );
-
- void Attach();
- void Detach();
-
-private:
- void **m_fnOld;
- void *m_fnReplacement;
-
- bool m_bAttached;
-
-};
-
-
-#define SETUP_SIMPLE_DETOUR(name, old, replacement) \
- CSimpleDetour name(&(void * &)old, (void *)(&(void * &)replacement))
-
-
-#define SETUP_DETOUR_FUNCTION( ret, conv, name, params ) \
- ret conv name##_H params; \
- ret ( conv *name##_T ) params = name; \
- CSimpleDetour *Detour_##name = new CSimpleDetour( &(void * &)name##_T, (void *)(&(void * &)name##_H) ); \
- ret conv name##_H params
-
-#define SETUP_DETOUR_FUNCTION_LATE( ret, conv, name, params ) \
- ret conv name##_H params; \
- ret ( conv *name##_T ) params = NULL; \
- CSimpleDetour *Detour_##name = NULL; \
- ret conv name##_H params
-
-#define SETUP_DETOUR_LATE( name ) \
- Detour_##name = new CSimpleDetour( &(void * &)name##_T, (void *)(&(void * &)name##_H) )
-
-#define SETUP_DETOUR_EXTERN( ret, conv, name, params ) \
- extern ret ( conv *name##_T ) params; \
- extern CSimpleDetour *Detour_##name
-
-#define SETUP_DETOUR_TRAMP( ret, conv, name, params ) \
- ret ( conv *name##_T ) params = NULL; \
-
-#endif // !CSIMPLEDETOUR_H_
diff --git a/Resources/NetHook/csimplescan.cpp b/Resources/NetHook/csimplescan.cpp
deleted file mode 100644
index 3f6b0d93..00000000
--- a/Resources/NetHook/csimplescan.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-#include "csimplescan.h"
-
-
-CSimpleScan::CSimpleScan()
-{
- m_bInterfaceSet = false;
-}
-
-CSimpleScan::CSimpleScan( const char *filename )
-{
- SetDLL( filename );
-}
-
-bool CSimpleScan::SetDLL( const char *filename )
-{
- m_Interface = Sys_GetFactory( filename );
-
- CSigScan::sigscan_dllfunc = m_Interface;
-
- if ( !CSigScan::GetDllMemInfo() )
- return m_bInterfaceSet = false;
-
- m_bInterfaceSet = ( m_Interface != NULL );
-
- return m_bInterfaceSet;
-}
-
-bool CSimpleScan::FindFunction( const char *sig, const char *mask, void **func )
-{
- if ( !m_bInterfaceSet )
- return false;
-
-
- m_Signature.Init( ( unsigned char * )sig, ( char * )mask, strlen( mask ) );
-
- if ( !m_Signature.is_set )
- return false;
-
- *func = m_Signature.sig_addr;
-
- return true;
-}
\ No newline at end of file
diff --git a/Resources/NetHook/csimplescan.h b/Resources/NetHook/csimplescan.h
deleted file mode 100644
index e6f1b662..00000000
--- a/Resources/NetHook/csimplescan.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef CSIMPLESCAN_H
-#define CSIMPLESCAN_H
-
-#include "sigscan.h"
-
-class CSimpleScan
-{
-
-public:
- CSimpleScan();
- CSimpleScan( const char *filename );
-
- bool SetDLL( const char *filename );
- bool FindFunction( const char *sig, const char *mask, void **func );
-
-private:
- bool m_bInterfaceSet;
- bool m_bDllInfo;
-
- CreateInterfaceFn m_Interface;
- CSigScan m_Signature;
-
-};
-
-#endif //CSIMPLESCAN_H
\ No newline at end of file
diff --git a/Resources/NetHook/detours.h b/Resources/NetHook/detours.h
deleted file mode 100644
index 33b3a328..00000000
--- a/Resources/NetHook/detours.h
+++ /dev/null
@@ -1,532 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// Core Detours Functionality (detours.h of detours.lib)
-//
-// Microsoft Research Detours Package, Version 2.1.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//
-
-#pragma once
-#ifndef _DETOURS_H_
-#define _DETOURS_H_
-
-#include
-
-#define DETOURS_VERSION 20100 // 2.1.0
-
-//////////////////////////////////////////////////////////////////////////////
-//
-
-#if (_MSC_VER < 1299)
-typedef LONG LONG_PTR;
-typedef ULONG ULONG_PTR;
-#endif
-
-#ifndef __in_z
-#define __in_z
-#endif
-
-//////////////////////////////////////////////////////////////////////////////
-//
-#ifndef GUID_DEFINED
-#define GUID_DEFINED
-typedef struct _GUID
-{
- DWORD Data1;
- WORD Data2;
- WORD Data3;
- BYTE Data4[ 8 ];
-} GUID;
-
-#ifdef INITGUID
-#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- const GUID name \
- = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
-#else
-#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- const GUID name
-#endif // INITGUID
-#endif // !GUID_DEFINED
-
-#if defined(__cplusplus)
-#ifndef _REFGUID_DEFINED
-#define _REFGUID_DEFINED
-#define REFGUID const GUID &
-#endif // !_REFGUID_DEFINED
-#else // !__cplusplus
-#ifndef _REFGUID_DEFINED
-#define _REFGUID_DEFINED
-#define REFGUID const GUID * const
-#endif // !_REFGUID_DEFINED
-#endif // !__cplusplus
-
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
- /////////////////////////////////////////////////// Instruction Target Macros.
- //
-#define DETOUR_INSTRUCTION_TARGET_NONE ((PVOID)0)
-#define DETOUR_INSTRUCTION_TARGET_DYNAMIC ((PVOID)(LONG_PTR)-1)
-#define DETOUR_SECTION_HEADER_SIGNATURE 0x00727444 // "Dtr\0"
-
- extern const GUID DETOUR_EXE_RESTORE_GUID;
-
-#define DETOUR_TRAMPOLINE_SIGNATURE 0x21727444 // Dtr!
- typedef struct _DETOUR_TRAMPOLINE DETOUR_TRAMPOLINE, *PDETOUR_TRAMPOLINE;
-
- /////////////////////////////////////////////////////////// Binary Structures.
- //
-#pragma pack(push, 8)
- typedef struct _DETOUR_SECTION_HEADER
- {
- DWORD cbHeaderSize;
- DWORD nSignature;
- DWORD nDataOffset;
- DWORD cbDataSize;
-
- DWORD nOriginalImportVirtualAddress;
- DWORD nOriginalImportSize;
- DWORD nOriginalBoundImportVirtualAddress;
- DWORD nOriginalBoundImportSize;
-
- DWORD nOriginalIatVirtualAddress;
- DWORD nOriginalIatSize;
- DWORD nOriginalSizeOfImage;
- DWORD cbPrePE;
-
- DWORD nOriginalClrFlags;
- DWORD reserved1;
- DWORD reserved2;
- DWORD reserved3;
-
- // Followed by cbPrePE bytes of data.
- } DETOUR_SECTION_HEADER, *PDETOUR_SECTION_HEADER;
-
- typedef struct _DETOUR_SECTION_RECORD
- {
- DWORD cbBytes;
- DWORD nReserved;
- GUID guid;
- } DETOUR_SECTION_RECORD, *PDETOUR_SECTION_RECORD;
-
- typedef struct _DETOUR_CLR_HEADER
- {
- // Header versioning
- ULONG cb;
- USHORT MajorRuntimeVersion;
- USHORT MinorRuntimeVersion;
-
- // Symbol table and startup information
- IMAGE_DATA_DIRECTORY MetaData;
- ULONG Flags;
-
- // Followed by the rest of the header.
- } DETOUR_CLR_HEADER, *PDETOUR_CLR_HEADER;
-
- typedef struct _DETOUR_EXE_RESTORE
- {
- ULONG cb;
-
- PIMAGE_DOS_HEADER pidh;
- PIMAGE_NT_HEADERS pinh;
- PULONG pclrFlags;
- DWORD impDirProt;
-
- IMAGE_DOS_HEADER idh;
- IMAGE_NT_HEADERS inh;
- ULONG clrFlags;
- } DETOUR_EXE_RESTORE, *PDETOUR_EXE_RESTORE;
-
-#pragma pack(pop)
-
-#define DETOUR_SECTION_HEADER_DECLARE(cbSectionSize) \
- { \
- sizeof(DETOUR_SECTION_HEADER),\
- DETOUR_SECTION_HEADER_SIGNATURE,\
- sizeof(DETOUR_SECTION_HEADER),\
- (cbSectionSize),\
- \
- 0,\
- 0,\
- 0,\
- 0,\
- \
- 0,\
- 0,\
- 0,\
- 0,\
- }
-
- ///////////////////////////////////////////////////////////// Binary Typedefs.
- //
- typedef BOOL (CALLBACK *PF_DETOUR_BINARY_BYWAY_CALLBACK)(PVOID pContext,
- PCHAR pszFile,
- PCHAR *ppszOutFile);
-
- typedef BOOL (CALLBACK *PF_DETOUR_BINARY_FILE_CALLBACK)(PVOID pContext,
- PCHAR pszOrigFile,
- PCHAR pszFile,
- PCHAR *ppszOutFile);
-
- typedef BOOL (CALLBACK *PF_DETOUR_BINARY_SYMBOL_CALLBACK)(PVOID pContext,
- ULONG nOrigOrdinal,
- ULONG nOrdinal,
- ULONG *pnOutOrdinal,
- PCHAR pszOrigSymbol,
- PCHAR pszSymbol,
- PCHAR *ppszOutSymbol);
-
- typedef BOOL (CALLBACK *PF_DETOUR_BINARY_COMMIT_CALLBACK)(PVOID pContext);
-
- typedef BOOL (CALLBACK *PF_DETOUR_ENUMERATE_EXPORT_CALLBACK)(PVOID pContext,
- ULONG nOrdinal,
- PCHAR pszName,
- PVOID pCode);
-
- typedef VOID * PDETOUR_BINARY;
- typedef VOID * PDETOUR_LOADED_BINARY;
-
- //////////////////////////////////////////////////////////// Detours 2.1 APIs.
- //
-
- LONG WINAPI DetourTransactionBegin();
- LONG WINAPI DetourTransactionAbort();
- LONG WINAPI DetourTransactionCommit();
- LONG WINAPI DetourTransactionCommitEx(PVOID **pppFailedPointer);
-
- LONG WINAPI DetourUpdateThread(HANDLE hThread);
-
- LONG WINAPI DetourAttach(PVOID *ppPointer,
- PVOID pDetour);
-
- LONG WINAPI DetourAttachEx(PVOID *ppPointer,
- PVOID pDetour,
- PDETOUR_TRAMPOLINE *ppRealTrampoline,
- PVOID *ppRealTarget,
- PVOID *ppRealDetour);
-
- LONG WINAPI DetourDetach(PVOID *ppPointer,
- PVOID pDetour);
-
- VOID WINAPI DetourSetIgnoreTooSmall(BOOL fIgnore);
-
- ////////////////////////////////////////////////////////////// Code Functions.
- //
- PVOID WINAPI DetourFindFunction(PCSTR pszModule, PCSTR pszFunction);
- PVOID WINAPI DetourCodeFromPointer(PVOID pPointer, PVOID *ppGlobals);
-
- PVOID WINAPI DetourCopyInstruction(PVOID pDst, PVOID pSrc, PVOID *ppTarget);
- PVOID WINAPI DetourCopyInstructionEx(PVOID pDst,
- PVOID pSrc,
- PVOID *ppTarget,
- LONG *plExtra);
-
- ///////////////////////////////////////////////////// Loaded Binary Functions.
- //
- HMODULE WINAPI DetourEnumerateModules(HMODULE hModuleLast);
- PVOID WINAPI DetourGetEntryPoint(HMODULE hModule);
- ULONG WINAPI DetourGetModuleSize(HMODULE hModule);
- BOOL WINAPI DetourEnumerateExports(HMODULE hModule,
- PVOID pContext,
- PF_DETOUR_ENUMERATE_EXPORT_CALLBACK pfExport);
-
- PVOID WINAPI DetourFindPayload(HMODULE hModule, REFGUID rguid, DWORD *pcbData);
- DWORD WINAPI DetourGetSizeOfPayloads(HMODULE hModule);
-
- ///////////////////////////////////////////////// Persistent Binary Functions.
- //
-
- PDETOUR_BINARY WINAPI DetourBinaryOpen(HANDLE hFile);
- PVOID WINAPI DetourBinaryEnumeratePayloads(PDETOUR_BINARY pBinary,
- GUID *pGuid,
- DWORD *pcbData,
- DWORD *pnIterator);
- PVOID WINAPI DetourBinaryFindPayload(PDETOUR_BINARY pBinary,
- REFGUID rguid,
- DWORD *pcbData);
- PVOID WINAPI DetourBinarySetPayload(PDETOUR_BINARY pBinary,
- REFGUID rguid,
- PVOID pData,
- DWORD cbData);
- BOOL WINAPI DetourBinaryDeletePayload(PDETOUR_BINARY pBinary, REFGUID rguid);
- BOOL WINAPI DetourBinaryPurgePayloads(PDETOUR_BINARY pBinary);
- BOOL WINAPI DetourBinaryResetImports(PDETOUR_BINARY pBinary);
- BOOL WINAPI DetourBinaryEditImports(PDETOUR_BINARY pBinary,
- PVOID pContext,
- PF_DETOUR_BINARY_BYWAY_CALLBACK pfByway,
- PF_DETOUR_BINARY_FILE_CALLBACK pfFile,
- PF_DETOUR_BINARY_SYMBOL_CALLBACK pfSymbol,
- PF_DETOUR_BINARY_COMMIT_CALLBACK pfCommit);
- BOOL WINAPI DetourBinaryWrite(PDETOUR_BINARY pBinary, HANDLE hFile);
- BOOL WINAPI DetourBinaryClose(PDETOUR_BINARY pBinary);
-
- /////////////////////////////////////////////////// Create Process & Load Dll.
- //
- typedef BOOL (WINAPI *PDETOUR_CREATE_PROCESS_ROUTINEA)
- (LPCSTR lpApplicationName,
- LPSTR lpCommandLine,
- LPSECURITY_ATTRIBUTES lpProcessAttributes,
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- BOOL bInheritHandles,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCSTR lpCurrentDirectory,
- LPSTARTUPINFOA lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation);
-
- typedef BOOL (WINAPI *PDETOUR_CREATE_PROCESS_ROUTINEW)
- (LPCWSTR lpApplicationName,
- LPWSTR lpCommandLine,
- LPSECURITY_ATTRIBUTES lpProcessAttributes,
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- BOOL bInheritHandles,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCWSTR lpCurrentDirectory,
- LPSTARTUPINFOW lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation);
-
- BOOL WINAPI DetourCreateProcessWithDllA(LPCSTR lpApplicationName,
- __in_z LPSTR lpCommandLine,
- LPSECURITY_ATTRIBUTES lpProcessAttributes,
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- BOOL bInheritHandles,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCSTR lpCurrentDirectory,
- LPSTARTUPINFOA lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation,
- LPCSTR lpDetouredDllFullName,
- LPCSTR lpDllName,
- PDETOUR_CREATE_PROCESS_ROUTINEA
- pfCreateProcessA);
-
- BOOL WINAPI DetourCreateProcessWithDllW(LPCWSTR lpApplicationName,
- __in_z LPWSTR lpCommandLine,
- LPSECURITY_ATTRIBUTES lpProcessAttributes,
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- BOOL bInheritHandles,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCWSTR lpCurrentDirectory,
- LPSTARTUPINFOW lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation,
- LPCSTR lpDetouredDllFullName,
- LPCSTR lpDllName,
- PDETOUR_CREATE_PROCESS_ROUTINEW
- pfCreateProcessW);
-
-#ifdef UNICODE
-#define DetourCreateProcessWithDll DetourCreateProcessWithDllW
-#define PDETOUR_CREATE_PROCESS_ROUTINE PDETOUR_CREATE_PROCESS_ROUTINEW
-#else
-#define DetourCreateProcessWithDll DetourCreateProcessWithDllA
-#define PDETOUR_CREATE_PROCESS_ROUTINE PDETOUR_CREATE_PROCESS_ROUTINEA
-#endif // !UNICODE
-
- BOOL WINAPI DetourCopyPayloadToProcess(HANDLE hProcess,
- REFGUID rguid,
- PVOID pvData,
- DWORD cbData);
- BOOL WINAPI DetourRestoreAfterWith();
- BOOL WINAPI DetourRestoreAfterWithEx(PVOID pvData, DWORD cbData);
-
- HMODULE WINAPI DetourGetDetouredMarker();
-
- //
- //////////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-//////////////////////////////////////////////// Detours Internal Definitions.
-//
-#ifdef __cplusplus
-#ifdef DETOURS_INTERNAL
-
-#ifndef __deref_out
-#define __deref_out
-#endif
-
-#ifndef __deref
-#define __deref
-#endif
-
-//////////////////////////////////////////////////////////////////////////////
-//
-#if (_MSC_VER < 1299)
-#include
-typedef IMAGEHLP_MODULE IMAGEHLP_MODULE64;
-typedef PIMAGEHLP_MODULE PIMAGEHLP_MODULE64;
-typedef IMAGEHLP_SYMBOL SYMBOL_INFO;
-typedef PIMAGEHLP_SYMBOL PSYMBOL_INFO;
-
-static inline
-LONG InterlockedCompareExchange(LONG *ptr, LONG nval, LONG oval)
-{
- return (LONG)::InterlockedCompareExchange((PVOID*)ptr, (PVOID)nval, (PVOID)oval);
-}
-#else
-#include
-#endif
-
-#ifdef IMAGEAPI // defined by DBGHELP.H
-typedef LPAPI_VERSION (NTAPI *PF_ImagehlpApiVersionEx)(LPAPI_VERSION AppVersion);
-
-typedef BOOL (NTAPI *PF_SymInitialize)(IN HANDLE hProcess,
- IN LPCSTR UserSearchPath,
- IN BOOL fInvadeProcess);
-typedef DWORD (NTAPI *PF_SymSetOptions)(IN DWORD SymOptions);
-typedef DWORD (NTAPI *PF_SymGetOptions)(VOID);
-typedef DWORD64 (NTAPI *PF_SymLoadModule64)(IN HANDLE hProcess,
- IN HANDLE hFile,
- IN PSTR ImageName,
- IN PSTR ModuleName,
- IN DWORD64 BaseOfDll,
- IN DWORD SizeOfDll);
-typedef BOOL (NTAPI *PF_SymGetModuleInfo64)(IN HANDLE hProcess,
- IN DWORD64 qwAddr,
- OUT PIMAGEHLP_MODULE64 ModuleInfo);
-typedef BOOL (NTAPI *PF_SymFromName)(IN HANDLE hProcess,
- IN LPSTR Name,
- OUT PSYMBOL_INFO Symbol);
-
-typedef struct _DETOUR_SYM_INFO
-{
- HANDLE hProcess;
- HMODULE hDbgHelp;
- PF_ImagehlpApiVersionEx pfImagehlpApiVersionEx;
- PF_SymInitialize pfSymInitialize;
- PF_SymSetOptions pfSymSetOptions;
- PF_SymGetOptions pfSymGetOptions;
- PF_SymLoadModule64 pfSymLoadModule64;
- PF_SymGetModuleInfo64 pfSymGetModuleInfo64;
- PF_SymFromName pfSymFromName;
-} DETOUR_SYM_INFO, *PDETOUR_SYM_INFO;
-
-PDETOUR_SYM_INFO DetourLoadDbgHelp(VOID);
-
-#endif // IMAGEAPI
-
-#ifndef DETOUR_TRACE
-#if DETOUR_DEBUG
-#define DETOUR_TRACE(x) printf x
-#define DETOUR_BREAK() DebugBreak()
-#include
-#include
-#else
-#define DETOUR_TRACE(x)
-#define DETOUR_BREAK()
-#endif
-#endif
-
-#ifdef DETOURS_IA64
-__declspec(align(16)) struct DETOUR_IA64_BUNDLE
-{
-public:
- union
- {
- BYTE data[16];
- UINT64 wide[2];
- };
-
-public:
- struct DETOUR_IA64_METADATA;
-
- typedef BOOL (DETOUR_IA64_BUNDLE::* DETOUR_IA64_METACOPY)
- (const DETOUR_IA64_METADATA *pMeta, DETOUR_IA64_BUNDLE *pDst) const;
-
- enum {
- A_UNIT = 1u,
- I_UNIT = 2u,
- M_UNIT = 3u,
- B_UNIT = 4u,
- F_UNIT = 5u,
- L_UNIT = 6u,
- X_UNIT = 7u,
- UNIT_MASK = 7u,
- STOP = 8u
- };
- struct DETOUR_IA64_METADATA
- {
- ULONG nTemplate : 8; // Instruction template.
- ULONG nUnit0 : 4; // Unit for slot 0
- ULONG nUnit1 : 4; // Unit for slot 1
- ULONG nUnit2 : 4; // Unit for slot 2
- DETOUR_IA64_METACOPY pfCopy; // Function pointer.
- };
-
-protected:
- BOOL CopyBytes(const DETOUR_IA64_METADATA *pMeta, DETOUR_IA64_BUNDLE *pDst) const;
- BOOL CopyBytesMMB(const DETOUR_IA64_METADATA *pMeta, DETOUR_IA64_BUNDLE *pDst) const;
- BOOL CopyBytesMBB(const DETOUR_IA64_METADATA *pMeta, DETOUR_IA64_BUNDLE *pDst) const;
- BOOL CopyBytesBBB(const DETOUR_IA64_METADATA *pMeta, DETOUR_IA64_BUNDLE *pDst) const;
- BOOL CopyBytesMLX(const DETOUR_IA64_METADATA *pMeta, DETOUR_IA64_BUNDLE *pDst) const;
-
- static const DETOUR_IA64_METADATA s_rceCopyTable[33];
-
-public:
- // 120 112 104 96 88 80 72 64 56 48 40 32 24 16 8 0
- // f. e. d. c. b. a. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0.
-
- // 00
- // f.e. d.c. b.a. 9.8. 7.6. 5.4. 3.2. 1.0.
- // 0000 0000 0000 0000 0000 0000 0000 001f : Template [4..0]
- // 0000 0000 0000 0000 0000 03ff ffff ffe0 : Zero [ 41.. 5]
- // 0000 0000 0000 0000 0000 3c00 0000 0000 : Zero [ 45.. 42]
- // 0000 0000 0007 ffff ffff c000 0000 0000 : One [ 82.. 46]
- // 0000 0000 0078 0000 0000 0000 0000 0000 : One [ 86.. 83]
- // 0fff ffff ff80 0000 0000 0000 0000 0000 : Two [123.. 87]
- // f000 0000 0000 0000 0000 0000 0000 0000 : Two [127..124]
- BYTE GetTemplate() const;
- BYTE GetInst0() const;
- BYTE GetInst1() const;
- BYTE GetInst2() const;
- BYTE GetUnit0() const;
- BYTE GetUnit1() const;
- BYTE GetUnit2() const;
- UINT64 GetData0() const;
- UINT64 GetData1() const;
- UINT64 GetData2() const;
-
-public:
- BOOL IsBrl() const;
- VOID SetBrl();
- VOID SetBrl(UINT64 target);
- UINT64 GetBrlTarget() const;
- VOID SetBrlTarget(UINT64 target);
- VOID SetBrlImm(UINT64 imm);
- UINT64 GetBrlImm() const;
-
- BOOL IsMovlGp() const;
- UINT64 GetMovlGp() const;
- VOID SetMovlGp(UINT64 gp);
-
- VOID SetInst0(BYTE nInst);
- VOID SetInst1(BYTE nInst);
- VOID SetInst2(BYTE nInst);
- VOID SetData0(UINT64 nData);
- VOID SetData1(UINT64 nData);
- VOID SetData2(UINT64 nData);
- BOOL SetNop0();
- BOOL SetNop1();
- BOOL SetNop2();
- BOOL SetStop();
-
- BOOL Copy(DETOUR_IA64_BUNDLE *pDst) const;
-};
-#endif // DETOURS_IA64
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif // DETOURS_INTERNAL
-#endif // __cplusplus
-
-#endif // _DETOURS_H_
-//
-//////////////////////////////////////////////////////////////// End of File.
diff --git a/Resources/NetHook/detours.lib b/Resources/NetHook/detours.lib
deleted file mode 100644
index 3bdca075..00000000
Binary files a/Resources/NetHook/detours.lib and /dev/null differ
diff --git a/Resources/NetHook/google/protobuf/descriptor.cc b/Resources/NetHook/google/protobuf/descriptor.cc
deleted file mode 100644
index 81c4ac0f..00000000
--- a/Resources/NetHook/google/protobuf/descriptor.cc
+++ /dev/null
@@ -1,4401 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-
-#include
-#include