first test
This commit is contained in:
BIN
cs2_chs/$(SolutionDir)$(Configuration)/cs2_chs.exe
Normal file
BIN
cs2_chs/$(SolutionDir)$(Configuration)/cs2_chs.exe
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
BIN
cs2_chs/$(SolutionDir)$(Configuration)/cs2_chs.pdb
Normal file
BIN
cs2_chs/$(SolutionDir)$(Configuration)/cs2_chs.pdb
Normal file
Binary file not shown.
6
cs2_chs/App.config
Normal file
6
cs2_chs/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
9
cs2_chs/App.xaml
Normal file
9
cs2_chs/App.xaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="cs2_chs.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:cs2_chs"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
17
cs2_chs/App.xaml.cs
Normal file
17
cs2_chs/App.xaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace cs2_chs
|
||||
{
|
||||
/// <summary>
|
||||
/// App.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
12
cs2_chs/MainWindow.xaml
Normal file
12
cs2_chs/MainWindow.xaml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Window x:Class="cs2_chs.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:cs2_chs"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="150" Width="450" ResizeMode="NoResize">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
29
cs2_chs/MainWindow.xaml.cs
Normal file
29
cs2_chs/MainWindow.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
namespace cs2_chs
|
||||
{
|
||||
/// <summary>
|
||||
/// MainWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
55
cs2_chs/Properties/AssemblyInfo.cs
Normal file
55
cs2_chs/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("cs2_chs")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("cs2_chs")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//若要开始生成可本地化的应用程序,请设置
|
||||
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
|
||||
//例如,如果您在源文件中使用的是美国英语,
|
||||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
|
||||
//对以下 NeutralResourceLanguage 特性的注释。 更新
|
||||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//或应用程序资源字典中找到时使用)
|
||||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//、应用程序或任何主题专用资源字典中找到时使用)
|
||||
)]
|
||||
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
cs2_chs/Properties/Resources.Designer.cs
generated
Normal file
71
cs2_chs/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace cs2_chs.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cs2_chs.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 覆盖当前线程的 CurrentUICulture 属性
|
||||
/// 使用此强类型的资源类的资源查找。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
cs2_chs/Properties/Resources.resx
Normal file
117
cs2_chs/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
30
cs2_chs/Properties/Settings.Designer.cs
generated
Normal file
30
cs2_chs/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace cs2_chs.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
cs2_chs/Properties/Settings.settings
Normal file
7
cs2_chs/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
BIN
cs2_chs/bin/Debug/cs2_chs.exe
Normal file
BIN
cs2_chs/bin/Debug/cs2_chs.exe
Normal file
Binary file not shown.
6
cs2_chs/bin/Debug/cs2_chs.exe.config
Normal file
6
cs2_chs/bin/Debug/cs2_chs.exe.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
BIN
cs2_chs/bin/Debug/cs2_chs.pdb
Normal file
BIN
cs2_chs/bin/Debug/cs2_chs.pdb
Normal file
Binary file not shown.
98
cs2_chs/cs2_chs.csproj
Normal file
98
cs2_chs/cs2_chs.csproj
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{460F93FF-C32C-455C-A2F6-BB81E86961AE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>cs2_chs</RootNamespace>
|
||||
<AssemblyName>cs2_chs</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
70
cs2_chs/obj/Debug/App.g.cs
Normal file
70
cs2_chs/obj/Debug/App.g.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "47A6ABC1F984D2628127870792B9669A74CD780D5065D75E37A3BA999C302E28"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using cs2_chs;
|
||||
|
||||
|
||||
namespace cs2_chs {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
cs2_chs.App app = new cs2_chs.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
70
cs2_chs/obj/Debug/App.g.i.cs
Normal file
70
cs2_chs/obj/Debug/App.g.i.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "47A6ABC1F984D2628127870792B9669A74CD780D5065D75E37A3BA999C302E28"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using cs2_chs;
|
||||
|
||||
|
||||
namespace cs2_chs {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
cs2_chs.App app = new cs2_chs.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
cs2_chs/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Normal file
BIN
cs2_chs/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Normal file
Binary file not shown.
BIN
cs2_chs/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Normal file
BIN
cs2_chs/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Normal file
Binary file not shown.
BIN
cs2_chs/obj/Debug/MainWindow.baml
Normal file
BIN
cs2_chs/obj/Debug/MainWindow.baml
Normal file
Binary file not shown.
75
cs2_chs/obj/Debug/MainWindow.g.cs
Normal file
75
cs2_chs/obj/Debug/MainWindow.g.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9CB247877E61DAF477756184D7D540C5D7031D102648953613C3BAD73D2C4F26"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using cs2_chs;
|
||||
|
||||
|
||||
namespace cs2_chs {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow
|
||||
/// </summary>
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/cs2_chs;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
75
cs2_chs/obj/Debug/MainWindow.g.i.cs
Normal file
75
cs2_chs/obj/Debug/MainWindow.g.i.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9CB247877E61DAF477756184D7D540C5D7031D102648953613C3BAD73D2C4F26"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using cs2_chs;
|
||||
|
||||
|
||||
namespace cs2_chs {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow
|
||||
/// </summary>
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/cs2_chs;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
cs2_chs/obj/Debug/cs2_chs.Properties.Resources.resources
Normal file
BIN
cs2_chs/obj/Debug/cs2_chs.Properties.Resources.resources
Normal file
Binary file not shown.
20
cs2_chs/obj/Debug/cs2_chs.csproj.FileListAbsolute.txt
Normal file
20
cs2_chs/obj/Debug/cs2_chs.csproj.FileListAbsolute.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\bin\Debug\cs2_chs.exe.config
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\bin\Debug\cs2_chs.exe
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\bin\Debug\cs2_chs.pdb
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs.csprojAssemblyReference.cache
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\MainWindow.g.cs
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\App.g.cs
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs_MarkupCompile.cache
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs_MarkupCompile.lref
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\MainWindow.baml
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs.g.resources
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs.Properties.Resources.resources
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs.csproj.GenerateResource.cache
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs.exe
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\cs2_chs.pdb
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\$(SolutionDir)$(Configuration)\cs2_chs.exe.config
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\$(SolutionDir)$(Configuration)\cs2_chs.exe
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\$(SolutionDir)$(Configuration)\cs2_chs.pdb
|
||||
D:\VSProject\cs2\cs2_united\Debug\cs2_chs.exe.config
|
||||
D:\VSProject\cs2\cs2_united\Debug\cs2_chs.exe
|
||||
D:\VSProject\cs2\cs2_united\Debug\cs2_chs.pdb
|
||||
BIN
cs2_chs/obj/Debug/cs2_chs.csproj.GenerateResource.cache
Normal file
BIN
cs2_chs/obj/Debug/cs2_chs.csproj.GenerateResource.cache
Normal file
Binary file not shown.
BIN
cs2_chs/obj/Debug/cs2_chs.csprojAssemblyReference.cache
Normal file
BIN
cs2_chs/obj/Debug/cs2_chs.csprojAssemblyReference.cache
Normal file
Binary file not shown.
BIN
cs2_chs/obj/Debug/cs2_chs.exe
Normal file
BIN
cs2_chs/obj/Debug/cs2_chs.exe
Normal file
Binary file not shown.
BIN
cs2_chs/obj/Debug/cs2_chs.g.resources
Normal file
BIN
cs2_chs/obj/Debug/cs2_chs.g.resources
Normal file
Binary file not shown.
BIN
cs2_chs/obj/Debug/cs2_chs.pdb
Normal file
BIN
cs2_chs/obj/Debug/cs2_chs.pdb
Normal file
Binary file not shown.
20
cs2_chs/obj/Debug/cs2_chs_MarkupCompile.cache
Normal file
20
cs2_chs/obj/Debug/cs2_chs_MarkupCompile.cache
Normal file
@@ -0,0 +1,20 @@
|
||||
cs2_chs
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\
|
||||
cs2_chs
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
|
||||
11151548125
|
||||
|
||||
5-2017746502
|
||||
13-1505183044
|
||||
MainWindow.xaml;
|
||||
|
||||
False
|
||||
|
||||
20
cs2_chs/obj/Debug/cs2_chs_MarkupCompile.i.cache
Normal file
20
cs2_chs/obj/Debug/cs2_chs_MarkupCompile.i.cache
Normal file
@@ -0,0 +1,20 @@
|
||||
cs2_chs
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Debug\
|
||||
cs2_chs
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
|
||||
11151548125
|
||||
|
||||
61167299106
|
||||
13-1505183044
|
||||
MainWindow.xaml;
|
||||
|
||||
False
|
||||
|
||||
4
cs2_chs/obj/Debug/cs2_chs_MarkupCompile.lref
Normal file
4
cs2_chs/obj/Debug/cs2_chs_MarkupCompile.lref
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
FD:\VSProject\cs2\cs2_united\cs2_chs\MainWindow.xaml;;
|
||||
|
||||
128
cs2_patch/BuildIn.cpp
Normal file
128
cs2_patch/BuildIn.cpp
Normal file
@@ -0,0 +1,128 @@
|
||||
#include "pch.h"
|
||||
#include "BuildIn.h"
|
||||
#include "Data.h"
|
||||
|
||||
extern MicroData Index;
|
||||
extern MicroBinary Data;
|
||||
|
||||
extern HMODULE hMod;
|
||||
extern "C" extern DLLAPI wchar_t ms_str[3096];
|
||||
extern "C" extern DLLAPI int nID;
|
||||
|
||||
|
||||
signed int (*sub_5FC1C0)() = (signed int(*)(void))0x5FC1C0;//real function point
|
||||
HMODULE SelfHandle = NULL;
|
||||
bool start_falg = false;
|
||||
|
||||
BOOL InjectDLL(HANDLE hProcess, LPCWSTR dllFilePathName)
|
||||
{
|
||||
if (!hProcess)
|
||||
return FALSE;
|
||||
int cch = 1 + lstrlenW(dllFilePathName);
|
||||
int cb = cch * sizeof(wchar_t);
|
||||
|
||||
LPWSTR PszLibFileRemote = (LPWSTR)VirtualAllocEx(hProcess, NULL, cb, MEM_COMMIT, PAGE_READWRITE);
|
||||
|
||||
if (!PszLibFileRemote)
|
||||
return FALSE;
|
||||
if (!WriteProcessMemory(hProcess, PszLibFileRemote, (LPVOID)dllFilePathName, cb, NULL))
|
||||
return FALSE;
|
||||
HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)
|
||||
LoadLibraryW, PszLibFileRemote, 0, NULL);
|
||||
if (!hThread) return FALSE;
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DLLAPI HANDLE InjectSelfTo(wchar_t inptr[])
|
||||
{
|
||||
|
||||
HANDLE currentThread = NULL;
|
||||
|
||||
LPPROCESS_INFORMATION info = new PROCESS_INFORMATION;
|
||||
STARTUPINFO si = { sizeof(si) };
|
||||
do {
|
||||
wchar_t m_CommandLine[] = L"";
|
||||
BOOL hF = CreateProcess(inptr, NULL,
|
||||
NULL, NULL, FALSE,
|
||||
CREATE_SUSPENDED, NULL, NULL, &si, info);
|
||||
if (!hF) {
|
||||
MessageBox(0, L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>", L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MB_ICONERROR);
|
||||
return 0;
|
||||
}
|
||||
// MessageBox(0, L"1", L"", 0);
|
||||
wchar_t m_Path[MAX_PATH];
|
||||
GetModuleFileName(hMod, m_Path, MAX_PATH);
|
||||
if (!InjectDLL(info->hProcess, m_Path)) {
|
||||
MessageBoxA(0, "", "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
currentThread = info->hThread;
|
||||
} while (0);
|
||||
|
||||
HANDLE hHookStart = CreateRemoteThread(info->hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)
|
||||
::GetProcAddress(hMod, "start"), 0, 0, NULL);
|
||||
|
||||
if (!hHookStart)
|
||||
{
|
||||
MessageBox(0, L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>(IAT HOOK)", L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MB_ICONERROR);
|
||||
return 0;
|
||||
}
|
||||
WaitForSingleObject(hHookStart, 0);
|
||||
ResumeThread(info->hThread);
|
||||
delete info;
|
||||
|
||||
lstrcpyW(ms_str, L" ");
|
||||
|
||||
Index.Load();
|
||||
Data.Load();
|
||||
return currentThread;
|
||||
}
|
||||
|
||||
signed int Fakesub_5FC1C0()
|
||||
{
|
||||
DWORD leax, lebx, lecx, ledx, lesi, ledi;
|
||||
__asm {
|
||||
mov dword ptr[leax], eax
|
||||
mov dword ptr[lebx], ebx
|
||||
mov dword ptr[lecx], ecx
|
||||
mov dword ptr[ledx], edx
|
||||
mov dword ptr[lesi], esi
|
||||
mov dword ptr[ledi], edi
|
||||
}
|
||||
// SetWindowTextW(m_hWnd, L"<22><><EFBFBD><EFBFBD>hook");
|
||||
((int(*)(DWORD))::GetProcAddress(SelfHandle, "TranSplete"))(lecx);
|
||||
// SetWindowTextW(m_hWnd, L"hook<6F><6B><EFBFBD><EFBFBD>");
|
||||
__asm {
|
||||
mov eax, dword ptr[leax]
|
||||
mov ebx, dword ptr[lebx]
|
||||
mov ecx, dword ptr[lecx]
|
||||
mov edx, dword ptr[ledx]
|
||||
mov esi, dword ptr[lesi]
|
||||
mov edi, dword ptr[ledi]
|
||||
}
|
||||
|
||||
return sub_5FC1C0();
|
||||
}
|
||||
|
||||
DLLAPI void start()
|
||||
{
|
||||
|
||||
DetourRestoreAfterWith();
|
||||
DetourTransactionBegin();
|
||||
DetourUpdateThread(GetCurrentThread());
|
||||
DetourAttach(&(PVOID&)sub_5FC1C0, Fakesub_5FC1C0);
|
||||
DetourTransactionCommit();
|
||||
|
||||
start_falg = TRUE;
|
||||
}
|
||||
|
||||
void end()
|
||||
{
|
||||
DetourTransactionBegin();
|
||||
DetourUpdateThread(GetCurrentThread());
|
||||
DetourDetach(&(PVOID&)sub_5FC1C0, Fakesub_5FC1C0);
|
||||
DetourTransactionCommit();
|
||||
}
|
||||
13
cs2_patch/BuildIn.h
Normal file
13
cs2_patch/BuildIn.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
|
||||
|
||||
BOOL InjectDLL(HANDLE hProcess, LPCWSTR dllFilePathName);//Inject dll to the signal process
|
||||
extern "C" DLLAPI HANDLE InjectSelfTo(wchar_t inptr[]);//Inject self
|
||||
|
||||
|
||||
signed int Fakesub_5FC1C0();//hooked function point
|
||||
|
||||
extern "C" DLLAPI void start();//start hook
|
||||
void end();//end hook
|
||||
190
cs2_patch/Data.cpp
Normal file
190
cs2_patch/Data.cpp
Normal file
@@ -0,0 +1,190 @@
|
||||
#include "pch.h"
|
||||
#include "Data.h"
|
||||
|
||||
MicroData Index(L"Index.ax", sizeof(IndexData));
|
||||
MicroBinary Data(L"Data.ax");
|
||||
|
||||
|
||||
extern HMODULE hMod;
|
||||
extern "C" extern DLLAPI wchar_t ms_str[3096];
|
||||
extern "C" extern DLLAPI int nID;
|
||||
|
||||
DLLAPI void CreateDataExport(WCHAR data[])
|
||||
{
|
||||
WCHAR sjp[3096];
|
||||
WCHAR scn[3096];
|
||||
|
||||
int lasger = GEtLargestID();
|
||||
|
||||
if (nID - lasger > 2) {
|
||||
MessageBox(0, L"ID<EFBFBD><EFBFBD>ֵ<EFBFBD>ƺ<EFBFBD><EFBFBD><EFBFBD>̫<EFBFBD>Ծ<EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD>", L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MB_ICONERROR);
|
||||
return;
|
||||
}
|
||||
if (!GetDataByID(nID - 1, sjp, scn)) {
|
||||
|
||||
CreateDataByID(nID - 1, ms_str, 2 * (lstrlenW(ms_str) + 1), data, 2 * (lstrlenW(data) + 1));
|
||||
WCHAR abv[16];
|
||||
_itow_s(nID - 1, abv, 10);
|
||||
wstring str;
|
||||
str += L"Ӧ<EFBFBD>ã<EFBFBD>ID:";
|
||||
str += abv;
|
||||
str += L"\n";
|
||||
str += ms_str;
|
||||
str += L"->";
|
||||
str += data;
|
||||
MessageBoxW(NULL, str.c_str(), L"<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><EFBFBD><EFBFBD>", MB_ICONINFORMATION);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
wstring nString = L"<EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>滻<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n(<28><><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD><D8B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>ܻ<EFBFBD>ռ<EFBFBD><D5BC>һЩʱ<D0A9><CAB1>)\n";
|
||||
WCHAR abv[16];
|
||||
_itow_s(nID - 1, abv, 10);
|
||||
nString += L"ID:";
|
||||
nString += abv;
|
||||
nString += L"\n";
|
||||
nString += sjp;
|
||||
int result = MessageBoxW(NULL, nString.c_str(), L"<EFBFBD><EFBFBD>Ϣ", MB_ICONINFORMATION | MB_OKCANCEL);
|
||||
|
||||
|
||||
if (result != IDOK)
|
||||
return;
|
||||
|
||||
|
||||
int p = 0;
|
||||
while (GetDataByID(p, sjp, scn)) {
|
||||
if (p == (nID - 1)) {
|
||||
CreateDataByIDEx(L"~Index.ax", L"~Data.ax", p, sjp, 2 * (lstrlenW(sjp) + 1), data, 2 * (lstrlenW(data) + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateDataByIDEx(L"~Index.ax", L"~Data.ax", p, sjp, 2 * (lstrlenW(sjp) + 1), scn, 2 * (lstrlenW(scn) + 1));
|
||||
}
|
||||
p++;
|
||||
}
|
||||
DeleteFile(L"Data.ax");
|
||||
DeleteFile(L"Index.ax");
|
||||
|
||||
rename("~Data.ax", "Data.ax");
|
||||
rename("~Index.ax", "Index.ax");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CreateDataByIDEx(LPCWSTR name, LPCWSTR name2, int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn)
|
||||
{
|
||||
MicroData _Index(name, sizeof(IndexData));
|
||||
MicroBinary _Data(name2);
|
||||
|
||||
_Index.Load();
|
||||
_Data.Load();
|
||||
|
||||
IndexData createData;
|
||||
createData.Id = ID;
|
||||
createData.JpLength = ljp;
|
||||
createData.CnLength = lcn;
|
||||
|
||||
createData.JpBass = Data.Size();
|
||||
_Data.Push(jpBuff, ljp);
|
||||
createData.CnBass = Data.Size();
|
||||
_Data.Push(cnBuffer, lcn);
|
||||
|
||||
_Index.Push(&createData);
|
||||
_Index.Save();
|
||||
_Data.Save();
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CreateDataByID(int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn)
|
||||
{
|
||||
IndexData createData;
|
||||
createData.Id = ID;
|
||||
createData.JpLength = ljp;
|
||||
createData.CnLength = lcn;
|
||||
|
||||
createData.JpBass = Data.Size();
|
||||
Data.Push(jpBuff, ljp);
|
||||
createData.CnBass = Data.Size();
|
||||
Data.Push(cnBuffer, lcn);
|
||||
|
||||
Index.Push(&createData);
|
||||
Index.Save();
|
||||
Data.Save();
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL GetDataByJP(int* ID, LPCWSTR jpBuff, LPWSTR cnBuffer)
|
||||
{
|
||||
IndexData index;
|
||||
|
||||
WCHAR njp[3096];
|
||||
WCHAR ncn[3096];
|
||||
Index = 0;
|
||||
do {
|
||||
Index.Get(&index);
|
||||
|
||||
Data = index.JpBass;
|
||||
Data.Sub(njp, index.JpLength);
|
||||
Data = index.CnBass;
|
||||
Data.Sub(ncn, index.CnLength);
|
||||
|
||||
if (lstrcmpW(jpBuff, njp) == 0) {
|
||||
*ID = index.Id;
|
||||
lstrcpyW(cnBuffer, ncn);
|
||||
Index = 0;
|
||||
Data = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (Index++)
|
||||
continue;
|
||||
else {
|
||||
Data = 0;
|
||||
Index = 0;
|
||||
return 0;
|
||||
}
|
||||
} while (1);
|
||||
}
|
||||
|
||||
BOOL GetDataByID(int ID, LPWSTR jpBuff, LPWSTR cnBuffer)
|
||||
{
|
||||
IndexData index;
|
||||
Index = ID;
|
||||
Index.Get(&index);
|
||||
if (index.Id != ID)
|
||||
{
|
||||
Index = 0;
|
||||
do {
|
||||
Index.Get(&index);
|
||||
if (index.Id == ID)
|
||||
break;
|
||||
if (Index++)
|
||||
continue;
|
||||
else {
|
||||
Index = 0;
|
||||
return 0;
|
||||
}
|
||||
} while (1);
|
||||
}
|
||||
|
||||
Data = index.JpBass;
|
||||
Data.Sub(jpBuff, index.JpLength);
|
||||
Data = index.CnBass;
|
||||
Data.Sub(cnBuffer, index.CnLength);
|
||||
Data = 0;
|
||||
Index = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int GEtLargestID()
|
||||
{
|
||||
IndexData index;
|
||||
int result = 0;
|
||||
do {
|
||||
Index.Get(&index);
|
||||
if (index.Id > result)
|
||||
result = index.Id;
|
||||
} while (Index++);
|
||||
|
||||
Index = 0;
|
||||
return result;
|
||||
}
|
||||
12
cs2_patch/Data.h
Normal file
12
cs2_patch/Data.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
|
||||
|
||||
|
||||
BOOL CreateDataByIDEx(LPCWSTR name, LPCWSTR name2, int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn);
|
||||
extern "C" DLLAPI void CreateDataExport(WCHAR data[]);
|
||||
BOOL CreateDataByID(int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn);
|
||||
BOOL GetDataByJP(int* ID, LPCWSTR jpBuff, LPWSTR cnBuffer);
|
||||
BOOL GetDataByID(int ID, LPWSTR jpBuff, LPWSTR cnBuffer);
|
||||
int GEtLargestID();
|
||||
BIN
cs2_patch/Debug/BuildIn.obj
Normal file
BIN
cs2_patch/Debug/BuildIn.obj
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/Data.obj
Normal file
BIN
cs2_patch/Debug/Data.obj
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/Replace.obj
Normal file
BIN
cs2_patch/Debug/Replace.obj
Normal file
Binary file not shown.
3
cs2_patch/Debug/cs2_patch.log
Normal file
3
cs2_patch/Debug/cs2_patch.log
Normal file
@@ -0,0 +1,3 @@
|
||||
Replace.cpp
|
||||
D:\VSProject\cs2\cs2_united\cs2_patch\Replace.cpp(56,23): warning C4018: “<”: 有符号/无符号不匹配
|
||||
cs2_patch.vcxproj -> D:\VSProject\cs2\cs2_united\Debug\cs2_patch.dll
|
||||
BIN
cs2_patch/Debug/cs2_patch.pch
Normal file
BIN
cs2_patch/Debug/cs2_patch.pch
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/CL.command.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/CL.command.1.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/CL.read.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/CL.write.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
2
cs2_patch/Debug/cs2_patch.tlog/cs2_patch.lastbuildstate
Normal file
2
cs2_patch/Debug/cs2_patch.tlog/cs2_patch.lastbuildstate
Normal file
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0
|
||||
Debug|Win32|D:\VSProject\cs2\cs2_united\|
|
||||
BIN
cs2_patch/Debug/cs2_patch.tlog/cs2_patch.write.1u.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/cs2_patch.write.1u.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/link.command.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/link.delete.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/link.delete.1.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/link.read.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/link.read.1.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/cs2_patch.tlog/link.write.1.tlog
Normal file
BIN
cs2_patch/Debug/cs2_patch.tlog/link.write.1.tlog
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/dllmain.obj
Normal file
BIN
cs2_patch/Debug/dllmain.obj
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/pch.obj
Normal file
BIN
cs2_patch/Debug/pch.obj
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/vc142.idb
Normal file
BIN
cs2_patch/Debug/vc142.idb
Normal file
Binary file not shown.
BIN
cs2_patch/Debug/vc142.pdb
Normal file
BIN
cs2_patch/Debug/vc142.pdb
Normal file
Binary file not shown.
BIN
cs2_patch/MicroFile.dll
Normal file
BIN
cs2_patch/MicroFile.dll
Normal file
Binary file not shown.
157
cs2_patch/MicroFile.h
Normal file
157
cs2_patch/MicroFile.h
Normal file
@@ -0,0 +1,157 @@
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
|
||||
#ifndef ALGORITHM_EXPORTS
|
||||
#define ALGORITHM_CLASS __declspec(dllimport)
|
||||
#define ALGORITHM_TEMPLATE
|
||||
#else //EXPORT
|
||||
#define ALGORITHM_CLASS __declspec(dllexport)
|
||||
#define ALGORITHM_TEMPLATE __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
|
||||
#define ENCODE_BYTE 1
|
||||
#define ENCODE_WORD 2
|
||||
#define ENCODE_DWORD 4
|
||||
|
||||
class DLLAPI MicroFile
|
||||
{
|
||||
public:
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD>4G<34><47><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
MicroFile(LPCWSTR filename);
|
||||
//<2F>ر<EFBFBD><D8B1>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>
|
||||
~MicroFile();
|
||||
//<2F><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ڴ<EFBFBD>
|
||||
virtual BOOL Load();
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
void Clear();
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual BOOL Save();
|
||||
//<2F><>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С
|
||||
DWORD Size();
|
||||
///<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ĩβ
|
||||
void Push(LPCVOID sour, ULONG size);
|
||||
///<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><DDB4>ļ<EFBFBD>ĩβ<C4A9><CEB2><EFBFBD><EFBFBD>
|
||||
void Pop(LPVOID sour, ULONG size);
|
||||
//<2F>ӵ<EFBFBD>ǰ<EFBFBD><C7B0>ȡλ<C8A1>ý<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
void Sub(LPVOID tart,int size);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
BOOL Gate(LPVOID tart);
|
||||
|
||||
virtual BOOL Get(LPBYTE tart) = 0;
|
||||
virtual BOOL Set(BYTE sour) = 0;
|
||||
|
||||
MicroFile& operator=(int sour);
|
||||
|
||||
BYTE &operator*();
|
||||
BOOL operator++(int);
|
||||
BOOL operator--(int);
|
||||
BOOL operator-=(DWORD count);
|
||||
BOOL operator+=(DWORD count);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
HANDLE m_file = NULL;
|
||||
BYTE* fileData = NULL;
|
||||
DWORD size;
|
||||
wstring* name = new wstring;
|
||||
BYTE* nPoint = NULL;
|
||||
};
|
||||
|
||||
class DLLAPI MicroBinary :public MicroFile
|
||||
{
|
||||
public:
|
||||
MicroBinary(LPCWSTR filename);
|
||||
~MicroBinary();
|
||||
|
||||
|
||||
BOOL Get(LPWORD tart);
|
||||
BOOL Get(LPDWORD tart);
|
||||
BOOL Get(LPBYTE tart);
|
||||
BOOL Set(BYTE sour);
|
||||
BOOL Set(WORD sour);
|
||||
BOOL Set(DWORD sour);
|
||||
|
||||
MicroBinary& operator=(int sour);
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
class DLLAPI MicroText:public MicroFile
|
||||
{
|
||||
public:
|
||||
MicroText(LPCWSTR filename,UINT code);
|
||||
~MicroText();
|
||||
|
||||
|
||||
BOOL Get(LPWSTR tart);
|
||||
BOOL Get(LPSTR tart);
|
||||
|
||||
BOOL Get(LPBYTE tart);
|
||||
BOOL Set(BYTE sour);
|
||||
|
||||
BOOL Set(LPCWSTR tart);
|
||||
BOOL Set(LPCSTR tart);
|
||||
|
||||
BOOL Save();
|
||||
BOOL Load();
|
||||
//MicroText& operator=(int sour);
|
||||
void Push(LPCWSTR sour);
|
||||
void Push(LPCSTR sour);
|
||||
|
||||
|
||||
void Pop(LPWSTR tart,int snbize);
|
||||
void Pop(LPSTR tart, int snbize);
|
||||
void Clear();
|
||||
|
||||
DWORD Size();
|
||||
|
||||
MicroText& operator=(int sour);
|
||||
|
||||
char& operator*();
|
||||
WCHAR& operator&();
|
||||
|
||||
BOOL operator++(int);
|
||||
BOOL operator--(int);
|
||||
|
||||
//void Sub(LPBYTE tart, int size);
|
||||
private:
|
||||
int m_code;
|
||||
wstring* wData = new wstring;
|
||||
string* Data = new string;
|
||||
};
|
||||
|
||||
|
||||
class DLLAPI MicroData :public MicroFile
|
||||
{
|
||||
public:
|
||||
MicroData(LPCWSTR filename, DWORD nsize);
|
||||
~MicroData();
|
||||
|
||||
|
||||
void operator=(int sour);
|
||||
|
||||
BOOL operator++(int);
|
||||
BOOL operator--(int);
|
||||
BOOL operator-=(DWORD count);
|
||||
BOOL operator+=(DWORD count);
|
||||
void Push(LPCVOID sour);
|
||||
///<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><DDB4>ļ<EFBFBD>ĩβ<C4A9><CEB2><EFBFBD><EFBFBD>
|
||||
void Pop(LPVOID tart);
|
||||
DWORD Size();
|
||||
BOOL Get(LPBYTE tart);
|
||||
BOOL Set(BYTE sour);
|
||||
|
||||
BOOL Get(LPVOID tart);
|
||||
BOOL Set(LPCVOID sour);
|
||||
private:
|
||||
int structure;
|
||||
};
|
||||
BIN
cs2_patch/MicroFile.lib
Normal file
BIN
cs2_patch/MicroFile.lib
Normal file
Binary file not shown.
175
cs2_patch/Replace.cpp
Normal file
175
cs2_patch/Replace.cpp
Normal file
@@ -0,0 +1,175 @@
|
||||
#include "pch.h"
|
||||
#include "Replace.h"
|
||||
|
||||
int npID = 0;
|
||||
extern HMODULE hModL;
|
||||
extern "C" extern DLLAPI wchar_t ms_str[3096];
|
||||
extern "C" extern DLLAPI int nID;
|
||||
|
||||
void BuildCV(TESTDATA* pcv, TESTDATA flt, DWORD posinCross, DWORD posInLine, DWORD m_count, WCHAR nchar)
|
||||
{
|
||||
pcv->ForCast = flt.ForCast;
|
||||
pcv->nLine = posinCross;
|
||||
pcv->nChar = nchar;
|
||||
pcv->nCross = posInLine;
|
||||
pcv->Flag1 = flt.Flag1;
|
||||
pcv->Flag2 = flt.Flag2;
|
||||
pcv->Flag3 = flt.Flag3;
|
||||
pcv->Flag4 = flt.Flag4;
|
||||
pcv->Flagn4 = flt.Flagn4;
|
||||
pcv->Flag5 = flt.Flag5;
|
||||
pcv->Flag6 = flt.Flag6;
|
||||
pcv->count = m_count;
|
||||
pcv->Flag7 = posInLine;
|
||||
pcv->Flag8 = flt.Flag8;
|
||||
pcv->Flagn8 = flt.Flagn8;
|
||||
|
||||
pcv->FlagnW = flt.FlagnW;
|
||||
pcv->FlagnQ = flt.FlagnQ;
|
||||
pcv->nWQ = flt.nWQ;
|
||||
pcv->ntime = flt.ntime;
|
||||
pcv->ntime2 = flt.ntime2;
|
||||
|
||||
pcv->Over1 = flt.Over1;
|
||||
pcv->Over2 = flt.Over2;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ApplyStringToCV(LPCWSTR ws, DWORD pDf, int id)
|
||||
{
|
||||
|
||||
|
||||
wstring localString = ws;
|
||||
if (!pDf)return;
|
||||
if (!ws)return;
|
||||
DWORD Df = *(DWORD*)pDf;//Df <20><><EFBFBD>ݵ<EFBFBD>ָ<EFBFBD><D6B8>
|
||||
if (!Df)return;//Ϊ<><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
||||
TESTDATA* nCView = (TESTDATA*)Df;//ʹһ<CAB9><D2BB>TESTDATA*ָ<><D6B8>Df
|
||||
DWORD pOld;
|
||||
VirtualProtect(nCView, 10 + (localString.length() * 2), PAGE_READWRITE, &pOld);
|
||||
TESTDATA loadFirst = *nCView;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int posInLine = 0;//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
int posinCross = 0xD;//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
|
||||
// SetWindowTextW(m_hWnd, L"<22><><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>");
|
||||
for (int i = 0; i < localString.length(); i++)
|
||||
{
|
||||
if (localString[i] == L'\n')
|
||||
{
|
||||
BuildCV(nCView, loadFirst, posinCross, posInLine, i * 2, 0);
|
||||
nCView++;
|
||||
BuildCV(nCView, loadFirst, posinCross, posInLine, i * 2, 0XFFFF);
|
||||
nCView++;
|
||||
posinCross += 0x28;
|
||||
posInLine = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
BuildCV(nCView, loadFirst, posinCross, posInLine, i * 2, localString[i]);
|
||||
nCView++;
|
||||
posInLine += 0X1A;
|
||||
}
|
||||
}
|
||||
// SetWindowTextW(m_hWnd, L"<22><><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>");
|
||||
*(DWORD*)(pDf + 4) = (DWORD)nCView;
|
||||
|
||||
VirtualProtect(nCView, 10 + (localString.length() * 2), pOld, NULL);
|
||||
}
|
||||
|
||||
DLLAPI int TranSplete(DWORD lp)
|
||||
{
|
||||
if (!lp)return -1;
|
||||
DWORD ppDf = *(DWORD*)(lp + 0x2B0);
|
||||
if (!ppDf)return -1;
|
||||
DWORD pDf = *(DWORD*)(ppDf + 8);
|
||||
if (!pDf)return -1;
|
||||
DWORD Df = *(DWORD*)pDf;
|
||||
if (!Df)return -1;
|
||||
DWORD pEnd = *(DWORD*)(pDf + 4);
|
||||
if (!pEnd)return -1;
|
||||
|
||||
WCHAR sjp[1024];
|
||||
WCHAR scn[1024];
|
||||
|
||||
DWORD Num = (pEnd - Df) / 96;
|
||||
|
||||
wstring nStr;
|
||||
TESTDATA* nCView = (TESTDATA*)Df;
|
||||
|
||||
for (DWORD i = 0; i < Num; i++) {
|
||||
if (nCView->nChar == 0xFFFF) {
|
||||
|
||||
}
|
||||
else if (nCView->nChar == 0) {
|
||||
nStr += L'\n';
|
||||
}
|
||||
else {
|
||||
nStr += nCView->nChar;
|
||||
}
|
||||
|
||||
nCView++;
|
||||
}
|
||||
npID++;
|
||||
// MessageBoxW(0,L"0",L"",0);
|
||||
WCHAR csjp[1024];
|
||||
WCHAR cscn[1024];
|
||||
int ppId = 0;
|
||||
if (!GetDataByID(nID - 1, csjp, cscn)) {
|
||||
if (nID != 0)
|
||||
if (!GetDataByJP(&ppId, nStr.c_str(), cscn))
|
||||
return -1;
|
||||
}
|
||||
|
||||
// MessageBoxW(0, L"1", L"", 0);
|
||||
if (lstrcmpW(nStr.c_str(), cscn) == 0) {
|
||||
|
||||
// MessageBoxW(0, nStr.c_str(), L"", 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// MessageBoxW(0, L"2", L"", 0);
|
||||
if (wcsstr(nStr.c_str(), L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")) {
|
||||
|
||||
return -1;
|
||||
}
|
||||
if (wcsstr(nStr.c_str(), L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"))
|
||||
return -1;
|
||||
|
||||
if (wcsstr(nStr.c_str(), L"<EFBFBD>դդդ<EFBFBD>"))
|
||||
return -1;
|
||||
|
||||
// MessageBoxW(0, L"3", L"", 0);
|
||||
|
||||
lstrcpyW(ms_str, nStr.c_str());
|
||||
|
||||
// MessageBoxW(0, L"4", L"", 0);
|
||||
|
||||
if (!GetDataByID(nID, sjp, scn)) {
|
||||
int pID = 0;
|
||||
if (GetDataByJP(&pID, nStr.c_str(), scn)) {
|
||||
nID = pID + 1;
|
||||
ApplyStringToCV(scn, pDf, pID);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lstrcmpW(sjp, nStr.c_str()) == 0) {
|
||||
ApplyStringToCV(scn, pDf, nID);
|
||||
}
|
||||
else
|
||||
{
|
||||
int pID = 0;
|
||||
if (GetDataByJP(&pID, nStr.c_str(), scn)) {
|
||||
nID = pID + 1;
|
||||
ApplyStringToCV(scn, pDf, pID);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
nID = pID;
|
||||
}
|
||||
}
|
||||
nID++;
|
||||
return 0;
|
||||
}
|
||||
43
cs2_patch/Replace.h
Normal file
43
cs2_patch/Replace.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#include "Data.h"
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
|
||||
typedef unsigned long long QWORD;
|
||||
struct TESTDATA {
|
||||
DWORD ForCast;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<EFBFBD><CDBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
wchar_t nChar;
|
||||
|
||||
WORD Flag1;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<EFBFBD><CDBE><EFBFBD><EFBFBD>ΪBAAD
|
||||
DWORD Flag2;//FFC8C8C8
|
||||
DWORD Flag3;//FF352519
|
||||
|
||||
DWORD nCross;
|
||||
DWORD nLine;
|
||||
|
||||
DWORD Flag4; //0000001A
|
||||
DWORD Flagn4;//0000001A
|
||||
QWORD Flag5; //0
|
||||
|
||||
DWORD Flag6; //FFFFFFFF
|
||||
DWORD count; //mayba it shows the position of string
|
||||
|
||||
DWORD Flag7;
|
||||
|
||||
DWORD Flag8; //0000000100000001
|
||||
DWORD Flagn8;
|
||||
|
||||
DWORD FlagnW;//1
|
||||
QWORD FlagnQ;//0
|
||||
DWORD ntime;//1E
|
||||
DWORD ntime2;//1E
|
||||
DWORD nWQ;//0
|
||||
|
||||
DWORD Over1;
|
||||
QWORD Over2;
|
||||
};
|
||||
|
||||
void BuildCV(TESTDATA* pcv, TESTDATA flt, DWORD posinCross, DWORD posInLine, DWORD m_count, WCHAR nchar);
|
||||
void ApplyStringToCV(LPCWSTR ws, DWORD pDf, int id);
|
||||
extern "C" DLLAPI int TranSplete(DWORD lp);
|
||||
181
cs2_patch/cs2_patch.vcxproj
Normal file
181
cs2_patch/cs2_patch.vcxproj
Normal file
@@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<ProjectGuid>{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>cs2patch</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;CS2PATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<HeapCommitSize>
|
||||
</HeapCommitSize>
|
||||
<StackReserveSize>1073741824</StackReserveSize>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;CS2PATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;CS2PATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;CS2PATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="BuildIn.h" />
|
||||
<ClInclude Include="Data.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="Replace.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BuildIn.cpp" />
|
||||
<ClCompile Include="Data.cpp" />
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Replace.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="MicroFile.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
54
cs2_patch/cs2_patch.vcxproj.filters
Normal file
54
cs2_patch/cs2_patch.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Data.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BuildIn.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Replace.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Data.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BuildIn.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Replace.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="MicroFile.dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
cs2_patch/cs2_patch.vcxproj.user
Normal file
4
cs2_patch/cs2_patch.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
BIN
cs2_patch/detours.lib
Normal file
BIN
cs2_patch/detours.lib
Normal file
Binary file not shown.
BIN
cs2_patch/detours.pdb
Normal file
BIN
cs2_patch/detours.pdb
Normal file
Binary file not shown.
40
cs2_patch/dllmain.cpp
Normal file
40
cs2_patch/dllmain.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
// dllmain.cpp : 定义 DLL 应用程序的入口点。
|
||||
#include "pch.h"
|
||||
#include "Data.h"
|
||||
#include "BuildIn.h"
|
||||
|
||||
#pragma data_seg("PublicData") // 声明共享数据段,并命名该数据段
|
||||
|
||||
HMODULE hMod = NULL;
|
||||
extern "C" DLLAPI wchar_t ms_str[3096] = { 0 };
|
||||
extern "C" DLLAPI int nID = 0;
|
||||
|
||||
#pragma data_seg()
|
||||
#pragma comment(linker, "/section:PublicData,rws")
|
||||
|
||||
|
||||
extern HMODULE SelfHandle ;
|
||||
extern bool start_falg ;
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
SelfHandle = hModule;
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (start_falg)
|
||||
end();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
34
cs2_patch/framework.h
Normal file
34
cs2_patch/framework.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
|
||||
// Windows 头文件
|
||||
#include <windows.h>
|
||||
|
||||
#include "MicroFile.h"
|
||||
#pragma comment(lib,"MicroFile.lib")
|
||||
|
||||
#include "include/detours.h"
|
||||
#pragma comment (lib,"detours.lib")
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
|
||||
struct IndexData {
|
||||
int Id;
|
||||
DWORD JpBass;
|
||||
DWORD JpLength;
|
||||
DWORD CnBass;
|
||||
DWORD CnLength;
|
||||
};
|
||||
|
||||
|
||||
|
||||
char IpfData[16];
|
||||
#define PutInt(a) _itoa_s(a,IpfData,10);MessageBoxA(0,IpfData,"num",0);
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
cs2_patch/include/.DS_Store
vendored
Normal file
BIN
cs2_patch/include/.DS_Store
vendored
Normal file
Binary file not shown.
1078
cs2_patch/include/detours.h
Normal file
1078
cs2_patch/include/detours.h
Normal file
File diff suppressed because it is too large
Load Diff
27
cs2_patch/include/detver.h
Normal file
27
cs2_patch/include/detver.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Common version parameters.
|
||||
//
|
||||
// Microsoft Research Detours Package, Version 4.0.1
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#define _USING_V110_SDK71_ 1
|
||||
#include "winver.h"
|
||||
#if 0
|
||||
#include <windows.h>
|
||||
#include <detours.h>
|
||||
#else
|
||||
#ifndef DETOURS_STRINGIFY
|
||||
#define DETOURS_STRINGIFY(x) DETOURS_STRINGIFY_(x)
|
||||
#define DETOURS_STRINGIFY_(x) #x
|
||||
#endif
|
||||
|
||||
#define VER_FILEFLAGSMASK 0x3fL
|
||||
#define VER_FILEFLAGS 0x0L
|
||||
#define VER_FILEOS 0x00040004L
|
||||
#define VER_FILETYPE 0x00000002L
|
||||
#define VER_FILESUBTYPE 0x00000000L
|
||||
#endif
|
||||
#define VER_DETOURS_BITS DETOUR_STRINGIFY(DETOURS_BITS)
|
||||
5
cs2_patch/pch.cpp
Normal file
5
cs2_patch/pch.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
// pch.cpp: 与预编译标头对应的源文件
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
|
||||
13
cs2_patch/pch.h
Normal file
13
cs2_patch/pch.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// pch.h: 这是预编译标头文件。
|
||||
// 下方列出的文件仅编译一次,提高了将来生成的生成性能。
|
||||
// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。
|
||||
// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。
|
||||
// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。
|
||||
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
// 添加要在此处预编译的标头
|
||||
#include "framework.h"
|
||||
|
||||
#endif //PCH_H
|
||||
49
cs2_united.sln
Normal file
49
cs2_united.sln
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29806.167
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cs2_chs", "cs2_chs\cs2_chs.csproj", "{460F93FF-C32C-455C-A2F6-BB81E86961AE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cs2_patch", "cs2_patch\cs2_patch.vcxproj", "{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{460F93FF-C32C-455C-A2F6-BB81E86961AE}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Debug|x64.Build.0 = Debug|x64
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Debug|x86.Build.0 = Debug|Win32
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Release|x64.ActiveCfg = Release|x64
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Release|x64.Build.0 = Release|x64
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Release|x86.ActiveCfg = Release|Win32
|
||||
{DB403E75-A69B-4B8E-AD02-9CF48E7C93A7}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FF5271CA-BF61-4BFC-9D04-7079CF76FC9D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user