This commit is contained in:
世元 李
2020-03-11 23:16:48 +08:00
parent 12a37bfb12
commit 019dbd45e6
92 changed files with 1166 additions and 128 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
</configuration>

View File

@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:cs2_chs"
mc:Ignorable="d"
Title="MainWindow" Height="150" Width="450" ResizeMode="NoResize">
<Grid>
<Grid Loaded="Grid_Loaded">
</Grid>
</Window>

View File

@@ -19,11 +19,74 @@ namespace cs2_chs
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
///
public static class StrMop
{
public static char CharAt(this string str, int index)
{
if (index > str.Length)
return ' ';
string res = str.Substring(index, 1);
return Convert.ToChar(res);
}
}
public partial class MainWindow : Window
{
public static string UTF8To16(string str)
{
string res;
int i, len, c;
int char2, char3;
res = "";
len = str.Length;
i = 0;
while (i < len)
{
c = Convert.ToByte(str[i++]);
switch (c >> 4)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
// 0xxxxxxx
res += str.CharAt(i - 1);
break;
case 12:
case 13:
// 110x xxxx 10xx xxxx
char2 = Convert.ToByte(str[i++]);
res += Convert.ToChar(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2 = Convert.ToByte(str[i++]);
char3 = Convert.ToByte(str[i++]);
res += Convert.ToChar(((c & 0x0F) << 12) |
((char2 & 0x3F) << 6) |
((char3 & 0x3F) << 0));
break;
}
}
return res;
}
[DllImport("cs2_patch.dll", EntryPoint = "InjectSelfTo")]
public static extern int pStart(string path);
public MainWindow()
{
InitializeComponent();
}
private void Grid_Loaded(object sender, RoutedEventArgs e)
{
// char[] a = { '1', '2', '3' };
pStart("cs2.exe");
}
}
}

View File

@@ -1,69 +1,61 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// 对此文件的更改可能导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace cs2_chs.Properties
{
namespace cs2_chs.Properties {
using System;
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// 一个强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
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()
{
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(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 属性
/// 使用此强类型的资源类的资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

View File

@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// 此代码由工具生成。
// 运行时版本: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
{
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
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.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
{
public static Settings Default {
get {
return defaultInstance;
}
}

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

Binary file not shown.

View File

@@ -8,12 +8,13 @@
<OutputType>WinExe</OutputType>
<RootNamespace>cs2_chs</RootNamespace>
<AssemblyName>cs2_chs</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</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>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -34,6 +35,28 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />

Binary file not shown.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9CB247877E61DAF477756184D7D540C5D7031D102648953613C3BAD73D2C4F26"
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
@@ -68,6 +68,17 @@ namespace cs2_chs {
[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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9CB247877E61DAF477756184D7D540C5D7031D102648953613C3BAD73D2C4F26"
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
@@ -68,6 +68,17 @@ namespace cs2_chs {
[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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -13,7 +13,7 @@ D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
11151548125
5-2017746502
13-1505183044
13152784993
MainWindow.xaml;
False

View File

@@ -12,8 +12,8 @@ DEBUG;TRACE
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
11151548125
61167299106
13-1505183044
6-1262306213
13152784993
MainWindow.xaml;
False

View 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();
}
}
}

View 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();
}
}
}

View File

@@ -0,0 +1,86 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,86 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,20 @@
cs2_chs
winexe
C#
.cs
D:\VSProject\cs2\cs2_united\cs2_chs\obj\Release\
cs2_chs
none
false
TRACE
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
11151548125
6-1262306213
13152784993
MainWindow.xaml;
True

View File

@@ -0,0 +1,4 @@

FD:\VSProject\cs2\cs2_united\cs2_chs\MainWindow.xaml;;

View 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();
}
}
}

View File

@@ -0,0 +1,86 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,20 @@
cs2_chs
winexe
C#
.cs
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Debug\
cs2_chs
none
false
DEBUG;TRACE
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
11151548125
6-1262306213
13152784993
MainWindow.xaml;
True

View File

@@ -0,0 +1,4 @@

FD:\VSProject\cs2\cs2_united\cs2_chs\MainWindow.xaml;;

View 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();
}
}
}

View 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();
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,86 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,86 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F057702BFD72AA7AA90C434C7677C42026F3D87C5998DD20BC1D7D0294BF503E"
//------------------------------------------------------------------------------
// <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) {
switch (connectionId)
{
case 1:
#line 9 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,17 @@
D:\VSProject\cs2\cs2_united\cs2_chs\bin\x86\Release\cs2_chs.exe.config
D:\VSProject\cs2\cs2_united\cs2_chs\bin\x86\Release\cs2_chs.exe
D:\VSProject\cs2\cs2_united\cs2_chs\bin\x86\Release\cs2_chs.pdb
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\MainWindow.g.cs
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\App.g.cs
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs_MarkupCompile.cache
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs_MarkupCompile.lref
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\MainWindow.baml
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs.g.resources
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs.Properties.Resources.resources
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs.csproj.GenerateResource.cache
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs.exe
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs.pdb
D:\VSProject\cs2\cs2_united\Release\cs2_chs.exe.config
D:\VSProject\cs2\cs2_united\Release\cs2_chs.exe
D:\VSProject\cs2\cs2_united\Release\cs2_chs.pdb
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\cs2_chs.csprojAssemblyReference.cache

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,20 @@
cs2_chs
winexe
C#
.cs
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\
cs2_chs
none
false
TRACE
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
11151548125
5-2017746502
13152784993
MainWindow.xaml;
False

View File

@@ -0,0 +1,20 @@
cs2_chs
winexe
C#
.cs
D:\VSProject\cs2\cs2_united\cs2_chs\obj\x86\Release\
cs2_chs
none
false
TRACE
D:\VSProject\cs2\cs2_united\cs2_chs\App.xaml
11151548125
6-1262306213
13152784993
MainWindow.xaml;
False

View File

@@ -0,0 +1,4 @@

FD:\VSProject\cs2\cs2_united\cs2_chs\MainWindow.xaml;;

View File

@@ -2,14 +2,14 @@
#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;
MicroData* Index = NULL;
MicroBinary* Data = NULL;
signed int (*sub_5FC1C0)() = (signed int(*)(void))0x5FC1C0;//real function point
HMODULE SelfHandle = NULL;
bool start_falg = false;
@@ -35,25 +35,28 @@ BOOL InjectDLL(HANDLE hProcess, LPCWSTR dllFilePathName)
return TRUE;
}
DLLAPI HANDLE InjectSelfTo(wchar_t inptr[])
HANDLE InjectSelfTo(LPCSTR inptr)
{
// MessageBoxA(0, inptr,"",0);
HANDLE currentThread = NULL;
LPPROCESS_INFORMATION info = new PROCESS_INFORMATION;
STARTUPINFO si = { sizeof(si) };
STARTUPINFOA si = { sizeof(si) };
do {
wchar_t m_CommandLine[] = L"";
BOOL hF = CreateProcess(inptr, NULL,
BOOL hF = CreateProcessA(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);
MessageBoxA(0, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>", inptr, 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;
@@ -76,8 +79,6 @@ DLLAPI HANDLE InjectSelfTo(wchar_t inptr[])
lstrcpyW(ms_str, L" ");
Index.Load();
Data.Load();
return currentThread;
}
@@ -106,8 +107,16 @@ signed int Fakesub_5FC1C0()
return sub_5FC1C0();
}
DLLAPI void start()
DWORD WINAPI Th(LPVOID lp) {
char a[16];
while (1) {
_itoa_s(nID, a, 10);
SetWindowTextA(GetForegroundWindow(), a);
Sleep(100);
}
return 0;
}
void start()
{
DetourRestoreAfterWith();
@@ -116,7 +125,14 @@ DLLAPI void start()
DetourAttach(&(PVOID&)sub_5FC1C0, Fakesub_5FC1C0);
DetourTransactionCommit();
Index = new MicroData(L"Index.ax", sizeof(IndexData));
Data = new MicroBinary(L"Data.ax");
Index->Load();
Data->Load();
start_falg = TRUE;
// CreateThread(0,0,Th,0,0,0);
}
void end()

View File

@@ -4,7 +4,7 @@
BOOL InjectDLL(HANDLE hProcess, LPCWSTR dllFilePathName);//Inject dll to the signal process
extern "C" DLLAPI HANDLE InjectSelfTo(wchar_t inptr[]);//Inject self
extern "C" DLLAPI HANDLE InjectSelfTo(LPCSTR inptr);//Inject self
signed int Fakesub_5FC1C0();//hooked function point

View File

@@ -1,15 +1,15 @@
#include "pch.h"
#include "Data.h"
MicroData Index(L"Index.ax", sizeof(IndexData));
MicroBinary Data(L"Data.ax");
extern MicroData* Index;
extern MicroBinary* Data;
extern HMODULE hMod;
extern "C" extern DLLAPI wchar_t ms_str[3096];
extern "C" extern DLLAPI int nID;
DLLAPI void CreateDataExport(WCHAR data[])
void CreateDataExport(WCHAR data[])
{
WCHAR sjp[3096];
WCHAR scn[3096];
@@ -83,9 +83,9 @@ BOOL CreateDataByIDEx(LPCWSTR name, LPCWSTR name2, int ID, LPCWSTR jpBuff, int l
createData.JpLength = ljp;
createData.CnLength = lcn;
createData.JpBass = Data.Size();
createData.JpBass = Data->Size();
_Data.Push(jpBuff, ljp);
createData.CnBass = Data.Size();
createData.CnBass = Data->Size();
_Data.Push(cnBuffer, lcn);
_Index.Push(&createData);
@@ -101,14 +101,14 @@ BOOL CreateDataByID(int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn)
createData.JpLength = ljp;
createData.CnLength = lcn;
createData.JpBass = Data.Size();
Data.Push(jpBuff, ljp);
createData.CnBass = Data.Size();
Data.Push(cnBuffer, lcn);
createData.JpBass = Data->Size();
Data->Push(jpBuff, ljp);
createData.CnBass = Data->Size();
Data->Push(cnBuffer, lcn);
Index.Push(&createData);
Index.Save();
Data.Save();
Index->Push(&createData);
Index->Save();
Data->Save();
return 0;
}
@@ -118,28 +118,28 @@ BOOL GetDataByJP(int* ID, LPCWSTR jpBuff, LPWSTR cnBuffer)
WCHAR njp[3096];
WCHAR ncn[3096];
Index = 0;
(*Index) = 0;
do {
Index.Get(&index);
Index->Get(&index);
Data = index.JpBass;
Data.Sub(njp, index.JpLength);
Data = index.CnBass;
Data.Sub(ncn, index.CnLength);
( *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;
(*Index) = 0;
(*Data) = 0;
return 1;
}
if (Index++)
if ((*Index)++)
continue;
else {
Data = 0;
Index = 0;
(*Data) = 0;
(*Index) = 0;
return 0;
}
} while (1);
@@ -147,31 +147,37 @@ BOOL GetDataByJP(int* ID, LPCWSTR jpBuff, LPWSTR cnBuffer)
BOOL GetDataByID(int ID, LPWSTR jpBuff, LPWSTR cnBuffer)
{
//
if (ID < 0)return 0;
IndexData index;
Index = ID;
Index.Get(&index);
(*Index) = ID;
Index->Get(&index);
if (index.Id != ID)
{
Index = 0;
(*Index) = 0;
do {
Index.Get(&index);
Index->Get(&index);
if (index.Id == ID)
break;
if (Index++)
if ((*Index)++)
continue;
else {
Index = 0;
(*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;
(*Data) = index.JpBass;
Data->Sub(jpBuff, index.JpLength);
(*Data) = index.CnBass;
Data->Sub(cnBuffer, index.CnLength);
(*Data) = 0;
(*Index) = 0;
return 1;
}
@@ -180,11 +186,11 @@ int GEtLargestID()
IndexData index;
int result = 0;
do {
Index.Get(&index);
Index->Get(&index);
if (index.Id > result)
result = index.Id;
} while (Index++);
} while ((*Index)++);
Index = 0;
(*Index) = 0;
return result;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
d:\vsproject\cs2\cs2_united\cs2_patch\debug\vc142.pdb
d:\vsproject\cs2\cs2_united\cs2_patch\debug\vc142.idb
d:\vsproject\cs2\cs2_united\cs2_patch\debug\dllmain.obj
d:\vsproject\cs2\cs2_united\cs2_patch\debug\buildin.obj
d:\vsproject\cs2\cs2_united\cs2_patch\debug\replace.obj
d:\vsproject\cs2\cs2_united\cs2_patch\debug\data.obj
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.pch
d:\vsproject\cs2\cs2_united\cs2_patch\debug\pch.obj
d:\vsproject\cs2\cs2_united\debug\cs2_patch.lib
d:\vsproject\cs2\cs2_united\debug\cs2_patch.exp
d:\vsproject\cs2\cs2_united\debug\cs2_patch.dll
d:\vsproject\cs2\cs2_united\debug\cs2_patch.ilk
d:\vsproject\cs2\cs2_united\debug\cs2_patch.pdb
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\cl.command.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\cl.read.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\cl.write.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\cs2_patch.write.1u.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\link.16636.delete.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\link.command.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\link.delete.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\link.read.1.tlog
d:\vsproject\cs2\cs2_united\cs2_patch\debug\cs2_patch.tlog\link.write.1.tlog

View File

@@ -1,3 +1 @@
 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


Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
cs2_patch/Release/Data.obj Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
 BuildIn.cpp
正在创建库 D:\VSProject\cs2\cs2_united\Release\cs2_patch.lib 和对象 D:\VSProject\cs2\cs2_united\Release\cs2_patch.exp
正在生成代码
1 of 110 functions ( 0.9%) were compiled, the rest were copied from previous compilation.
0 functions were new in current compilation
0 functions had inline decision re-evaluated but remain unchanged
已完成代码的生成
cs2_patch.vcxproj -> D:\VSProject\cs2\cs2_united\Release\cs2_patch.dll

Binary file not shown.

View File

@@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0
Debug|Win32|D:\VSProject\cs2\cs2_united\|
Release|Win32|D:\VSProject\cs2\cs2_united\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
cs2_patch/Release/pch.obj Normal file

Binary file not shown.

BIN
cs2_patch/Release/vc142.pdb Normal file

Binary file not shown.

View File

@@ -77,8 +77,9 @@ void ApplyStringToCV(LPCWSTR ws, DWORD pDf, int id)
VirtualProtect(nCView, 10 + (localString.length() * 2), pOld, NULL);
}
DLLAPI int TranSplete(DWORD lp)
int TranSplete(DWORD lp)
{
// MessageBox(0,L"Transplete start",L"",0);
if (!lp)return -1;
DWORD ppDf = *(DWORD*)(lp + 0x2B0);
if (!ppDf)return -1;
@@ -120,7 +121,6 @@ DLLAPI int TranSplete(DWORD lp)
if (!GetDataByJP(&ppId, nStr.c_str(), cscn))
return -1;
}
// MessageBoxW(0, L"1", L"", 0);
if (lstrcmpW(nStr.c_str(), cscn) == 0) {
@@ -139,12 +139,8 @@ DLLAPI int TranSplete(DWORD lp)
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)) {

View File

@@ -13,9 +13,15 @@ extern "C" DLLAPI int nID = 0;
#pragma comment(linker, "/section:PublicData,rws")
char IpfData[16];
#define PutInt(a) _itoa_s(a,IpfData,10);MessageBoxA(0,IpfData,"num",0);
extern HMODULE SelfHandle ;
extern bool start_falg ;
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
@@ -25,6 +31,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,
{
case DLL_PROCESS_ATTACH:
SelfHandle = hModule;
hMod = hModule;
break;
case DLL_THREAD_ATTACH:
break;

View File

@@ -26,9 +26,3 @@ struct IndexData {
char IpfData[16];
#define PutInt(a) _itoa_s(a,IpfData,10);MessageBoxA(0,IpfData,"num",0);