public void InitHooks() { Utility.Utility.LoadLibrary("blue.dll"); Utility.Utility.LoadLibrary("python27.dll"); Utility.Utility.LoadLibrary("WS2_32.dll"); Utility.Utility.LoadLibrary("kernel32.dll"); Utility.Utility.LoadLibrary("advapi32.dll"); Utility.Utility.LoadLibrary("Iphlpapi.dll"); Utility.Utility.LoadLibrary("dbghelp.dll"); Utility.Utility.LoadLibrary("_ctypes.pyd"); //Utility.Utility.LoadLibrary("d3d11.dll"); Utility.Utility.LoadLibrary("d3d9.dll"); //[DllImport("d3d9.dll")] if (UseAdaptEve) // adapteve { EnvVars.SetEnvironment(HWSettings); string[] proxyIpPort = HWSettings.ProxyIP.Split(':'); AddController(new WinSockConnectController(LocalHook.GetProcAddress("WS2_32.dll", "connect"), proxyIpPort[0], proxyIpPort[1], HWSettings.ProxyUsername, HWSettings.ProxyPassword)); AddController(new RegQueryValueExAController(LocalHook.GetProcAddress("advapi32.dll", "RegQueryValueExA"), HWSettings.WindowsKey)); AddController(new GlobalMemoryStatusController(LocalHook.GetProcAddress("kernel32.dll", "GlobalMemoryStatusEx"), HWSettings.TotalPhysRam)); AddController(new GetAdaptersInfoController(LocalHook.GetProcAddress("Iphlpapi.dll", "GetAdaptersInfo"), HWSettings.NetworkAdapterGuid, HWSettings.MacAddress, HWSettings.NetworkAddress)); AddController(new DX9Controller(HWSettings)); } //AddController(new Win32Hooks.CryptHashDataController(LocalHook.GetProcAddress("advapi32.dll", "CryptHashData"))); AddController(new Win32Hooks.IsDebuggerPresentController()); AddController(new Win32Hooks.LoadLibraryAController()); AddController(new Win32Hooks.LoadLibraryWController()); AddController(new Win32Hooks.GetModuleHandleWController()); AddController(new Win32Hooks.GetModuleHandleAController()); AddController(new Win32Hooks.EnumProcessesController()); AddController(new Win32Hooks.MiniWriteDumpController()); AddController(new Win32Hooks.CreateFileWController()); AddController(new Win32Hooks.CreateFileAController()); if (!EverythingHooked()) { MessageBox.Show("Hook error"); Environment.Exit(0); Environment.FailFast("exit"); } Win32Hooks.HookManager.Log("-----------Hooks initialized-----------"); }
public void InitHooks() { Utility.Util.LoadLibrary("blue.dll"); Utility.Util.LoadLibrary("python27.dll"); Utility.Util.LoadLibrary("WS2_32.dll"); Utility.Util.LoadLibrary("kernel32.dll"); Utility.Util.LoadLibrary("advapi32.dll"); Utility.Util.LoadLibrary("Iphlpapi.dll"); Utility.Util.LoadLibrary("dbghelp.dll"); Utility.Util.LoadLibrary("_ctypes.pyd"); if (this.EveAccount.DX11) { Utility.Util.LoadLibrary("d3d11.dll"); } else { Utility.Util.LoadLibrary("d3d9.dll"); } Utility.Util.CheckCreateDirectorys(EveAccount.HWSettings.WindowsUserLogin); _controllerList.Add(new SHGetFolderPathAController(this.EveAccount.GetPersonalFolder(), this.EveAccount.GetAppDataFolder())); _controllerList.Add(new SHGetFolderPathWController(this.EveAccount.GetPersonalFolder(), this.EveAccount.GetAppDataFolder())); if (EveAccount.UseAdaptEve) // adapteve { EnvVars.SetEnvironment(EveAccount.HWSettings); //ip:port if (!string.IsNullOrEmpty(EveAccount.HWSettings.ProxyIP) && !EveAccount.HWSettings.ProxyIP.Equals("ip:port")) { string[] proxyIpPort = EveAccount.HWSettings.ProxyIP.Split(':'); AddController(new WinSockConnectController(LocalHook.GetProcAddress("WS2_32.dll", "connect"), proxyIpPort[0], proxyIpPort[1], EveAccount.HWSettings.ProxyUsername, EveAccount.HWSettings.ProxyPassword)); } AddController(new RegQueryValueExAController(LocalHook.GetProcAddress("advapi32.dll", "RegQueryValueExA"), EveAccount.HWSettings.WindowsKey)); AddController(new GlobalMemoryStatusController(LocalHook.GetProcAddress("kernel32.dll", "GlobalMemoryStatusEx"), EveAccount.HWSettings.TotalPhysRam)); AddController(new GetAdaptersInfoController(LocalHook.GetProcAddress("Iphlpapi.dll", "GetAdaptersInfo"), EveAccount.HWSettings.NetworkAdapterGuid, EveAccount.HWSettings.MacAddress, EveAccount.HWSettings.NetworkAddress)); if (this.EveAccount.DX11) { } else { AddController(new DX9Controller(EveAccount.HWSettings)); } AddController(new Win32Hooks.InternetConnectAController()); AddController(new Win32Hooks.InternetConnectWController()); } AddController(new Win32Hooks.IsDebuggerPresentController()); AddController(new Win32Hooks.LoadLibraryAController()); AddController(new Win32Hooks.LoadLibraryWController()); AddController(new Win32Hooks.GetModuleHandleWController()); AddController(new Win32Hooks.GetModuleHandleAController()); AddController(new Win32Hooks.EnumProcessesController()); AddController(new Win32Hooks.MiniWriteDumpController()); AddController(new Win32Hooks.CreateFileWController()); AddController(new Win32Hooks.CreateFileAController()); if (!EverythingHooked()) { MessageBox.Show("Hook error"); Environment.Exit(0); Environment.FailFast("exit"); } string hooksInit = "Charname: " + this.CharName + " -----------Hooks initialized-----------"; Win32Hooks.HookManager.Log(hooksInit); WCFClient.Instance.GetPipeProxy.SendToInjectorLog(hooksInit); }