Skip to content

Commit

Permalink
Update offsets for version 1.04 (03/06/2016)
Browse files Browse the repository at this point in the history
  • Loading branch information
xforce committed Jun 20, 2016
1 parent 7dbba4f commit 01cfc55
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 16 deletions.
20 changes: 13 additions & 7 deletions JustFOV.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down
28 changes: 24 additions & 4 deletions JustFOV/JustFOV.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -24,10 +25,10 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand All @@ -53,7 +54,25 @@
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>JustFOV.pfx</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>meow.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>5E1CC13284AA860F4C8E2DA5CE1F8556B349C4F9</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>JustFOV_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -111,7 +130,8 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="JustFOV.pfx" />
<None Include="meow.pfx" />
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
29 changes: 27 additions & 2 deletions JustFOV/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions JustFOV/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("")]

Expand Down Expand Up @@ -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")]

0 comments on commit 01cfc55

Please sign in to comment.