From 01cfc55b2d322894a523dc736ea336dcbca812cb Mon Sep 17 00:00:00 2001 From: Alexander Guettler Date: Mon, 20 Jun 2016 16:56:12 +0200 Subject: [PATCH] Update offsets for version 1.04 (03/06/2016) --- JustFOV.sln | 20 +++++++++++++------- JustFOV/JustFOV.csproj | 28 ++++++++++++++++++++++++---- JustFOV/Model.cs | 29 +++++++++++++++++++++++++++-- JustFOV/Properties/AssemblyInfo.cs | 6 +++--- 4 files changed, 67 insertions(+), 16 deletions(-) diff --git a/JustFOV.sln b/JustFOV.sln index a1b3d4f..42ee7b2 100644 --- a/JustFOV.sln +++ b/JustFOV.sln @@ -1,20 +1,26 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.25402.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JustFOV", "JustFOV\JustFOV.csproj", "{99C575E6-2753-4F55-8311-2FCF312BA5D4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Release|Any CPU.Build.0 = Release|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Debug|x64.ActiveCfg = Debug|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Debug|x64.Build.0 = Debug|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Debug|x86.ActiveCfg = Debug|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Debug|x86.Build.0 = Debug|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Release|x64.ActiveCfg = Release|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Release|x64.Build.0 = Release|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Release|x86.ActiveCfg = Release|Any CPU + {99C575E6-2753-4F55-8311-2FCF312BA5D4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/JustFOV/JustFOV.csproj b/JustFOV/JustFOV.csproj index 6510f17..cf658c8 100644 --- a/JustFOV/JustFOV.csproj +++ b/JustFOV/JustFOV.csproj @@ -14,6 +14,7 @@ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + false publish\ true Disk @@ -24,10 +25,10 @@ false false true - 0 + 1 1.0.0.%2a - false false + true true @@ -53,7 +54,25 @@ true - JustFOV.pfx + meow.pfx + + + 5E1CC13284AA860F4C8E2DA5CE1F8556B349C4F9 + + + JustFOV_TemporaryKey.pfx + + + true + + + LocalIntranet + + + Properties\app.manifest + + + false @@ -111,7 +130,8 @@ ResXFileCodeGenerator Resources.Designer.cs - + + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/JustFOV/Model.cs b/JustFOV/Model.cs index 583c3f0..20d2d55 100644 --- a/JustFOV/Model.cs +++ b/JustFOV/Model.cs @@ -125,13 +125,38 @@ private float GetFov() //private const int FovOffset2 = 0x584; // Patch 07/03/2016 - private readonly IntPtr _cameraManagerPtr = new IntPtr(0x142F0CB58); - private readonly IntPtr _setFovCall = new IntPtr(0x143B3BC2D); + //private readonly IntPtr _cameraManagerPtr = new IntPtr(0x142F0CB58); + //private readonly IntPtr _setFovCall = new IntPtr(0x143B3BC2D); + + //private const int CurrentCameraOffset = 0x5c0; + //private const int CameraFlagsOffset = 0x55e; + //private const int FovOffset1 = 0x580; + //private const int FovOffset2 = 0x584; + + // Patch version 1.04 (03/06/2016) + // NOTE(xforce): If I were to inject something in the process I could make this work independent of version + // But I don't think that was the intention of this program + // Or I write some memory search using ReadProcessMemory but that is slow + // So on the next update use this to find the address to CameraManager easily + // Or use a dump in IDA look for the ctor of CCameraManager + // 48 8B 05 ? ? ? ? F3 0F 10 05 ? ? ? ? 4D 89 C1 48 8B 90 ? ? ? ? 4C 8D 41 0C 31 C0 + // This is a IDA compatible pattern + + // This is the pattern for the SetFOV Call + // E8 ? ? ? ? 0F 28 BC 24 ? ? ? ? 0F 28 B4 24 ? ? ? ? 48 8B 9C 24 ? ? ? ? 48 81 C4 ? ? ? ? + // I however thing it's not required to patch it as this is only called + // when the camera manager gets created + // Or maybe I just have the wrong call + // But I was not able to acquire the versions used previously, so ye + + private readonly IntPtr _cameraManagerPtr = new IntPtr(0x142EBEBD0); + private readonly IntPtr _setFovCall = new IntPtr(0x143ADAD71); private const int CurrentCameraOffset = 0x5c0; private const int CameraFlagsOffset = 0x55e; private const int FovOffset1 = 0x580; private const int FovOffset2 = 0x584; + #endregion #region INotifyPropertyChanged diff --git a/JustFOV/Properties/AssemblyInfo.cs b/JustFOV/Properties/AssemblyInfo.cs index f19731a..3f9b96d 100644 --- a/JustFOV/Properties/AssemblyInfo.cs +++ b/JustFOV/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Just Cause 3 FOV Patcher")] -[assembly: AssemblyCopyright("Copyright © Trix 2015")] +[assembly: AssemblyCopyright("Copyright © Trix 2015, xforce 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")]