├── .gitattributes ├── .gitignore ├── .gitmodules ├── AutoGunfireReborn.sln ├── GunfireRebornDumper ├── App.config ├── GunfireRebornDumper.csproj ├── Minifier.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── lib │ └── mscorlib.dll └── packages.config ├── GunfireRebornMods ├── Common │ ├── ModBase.cs │ └── ModManager.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── GunfireRebornMods.csproj ├── Mods │ ├── Aimbot.cs │ ├── AutoAim.cs │ ├── ExtraSensoryPerception.cs │ ├── FreeCam.cs │ ├── GameSpeed.cs │ ├── JumpHeight.cs │ ├── MovementSpeed.cs │ ├── SceneDebugger.cs │ ├── UnlimitedAmmo.cs │ └── WeaponMod.cs ├── NativeNetSharp.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # JustCode is a .NET coding add-in 131 | .JustCode 132 | 133 | # TeamCity is a build add-in 134 | _TeamCity* 135 | 136 | # DotCover is a Code Coverage Tool 137 | *.dotCover 138 | 139 | # AxoCover is a Code Coverage Tool 140 | .axoCover/* 141 | !.axoCover/settings.json 142 | 143 | # Visual Studio code coverage results 144 | *.coverage 145 | *.coveragexml 146 | 147 | # NCrunch 148 | _NCrunch_* 149 | .*crunch*.local.xml 150 | nCrunchTemp_* 151 | 152 | # MightyMoose 153 | *.mm.* 154 | AutoTest.Net/ 155 | 156 | # Web workbench (sass) 157 | .sass-cache/ 158 | 159 | # Installshield output folder 160 | [Ee]xpress/ 161 | 162 | # DocProject is a documentation generator add-in 163 | DocProject/buildhelp/ 164 | DocProject/Help/*.HxT 165 | DocProject/Help/*.HxC 166 | DocProject/Help/*.hhc 167 | DocProject/Help/*.hhk 168 | DocProject/Help/*.hhp 169 | DocProject/Help/Html2 170 | DocProject/Help/html 171 | 172 | # Click-Once directory 173 | publish/ 174 | 175 | # Publish Web Output 176 | *.[Pp]ublish.xml 177 | *.azurePubxml 178 | # Note: Comment the next line if you want to checkin your web deploy settings, 179 | # but database connection strings (with potential passwords) will be unencrypted 180 | *.pubxml 181 | *.publishproj 182 | 183 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 184 | # checkin your Azure Web App publish settings, but sensitive information contained 185 | # in these scripts will be unencrypted 186 | PublishScripts/ 187 | 188 | # NuGet Packages 189 | *.nupkg 190 | # NuGet Symbol Packages 191 | *.snupkg 192 | # The packages folder can be ignored because of Package Restore 193 | **/[Pp]ackages/* 194 | # except build/, which is used as an MSBuild target. 195 | !**/[Pp]ackages/build/ 196 | # Uncomment if necessary however generally it will be regenerated when needed 197 | #!**/[Pp]ackages/repositories.config 198 | # NuGet v3's project.json files produces more ignorable files 199 | *.nuget.props 200 | *.nuget.targets 201 | 202 | # Microsoft Azure Build Output 203 | csx/ 204 | *.build.csdef 205 | 206 | # Microsoft Azure Emulator 207 | ecf/ 208 | rcf/ 209 | 210 | # Windows Store app package directories and files 211 | AppPackages/ 212 | BundleArtifacts/ 213 | Package.StoreAssociation.xml 214 | _pkginfo.txt 215 | *.appx 216 | *.appxbundle 217 | *.appxupload 218 | 219 | # Visual Studio cache files 220 | # files ending in .cache can be ignored 221 | *.[Cc]ache 222 | # but keep track of directories ending in .cache 223 | !?*.[Cc]ache/ 224 | 225 | # Others 226 | ClientBin/ 227 | ~$* 228 | *~ 229 | *.dbmdl 230 | *.dbproj.schemaview 231 | *.jfm 232 | *.pfx 233 | *.publishsettings 234 | orleans.codegen.cs 235 | 236 | # Including strong name files can present a security risk 237 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 238 | #*.snk 239 | 240 | # Since there are multiple workflows, uncomment next line to ignore bower_components 241 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 242 | #bower_components/ 243 | 244 | # RIA/Silverlight projects 245 | Generated_Code/ 246 | 247 | # Backup & report files from converting an old project file 248 | # to a newer Visual Studio version. Backup files are not needed, 249 | # because we have git ;-) 250 | _UpgradeReport_Files/ 251 | Backup*/ 252 | UpgradeLog*.XML 253 | UpgradeLog*.htm 254 | ServiceFabricBackup/ 255 | *.rptproj.bak 256 | 257 | # SQL Server files 258 | *.mdf 259 | *.ldf 260 | *.ndf 261 | 262 | # Business Intelligence projects 263 | *.rdl.data 264 | *.bim.layout 265 | *.bim_*.settings 266 | *.rptproj.rsuser 267 | *- [Bb]ackup.rdl 268 | *- [Bb]ackup ([0-9]).rdl 269 | *- [Bb]ackup ([0-9][0-9]).rdl 270 | 271 | # Microsoft Fakes 272 | FakesAssemblies/ 273 | 274 | # GhostDoc plugin setting file 275 | *.GhostDoc.xml 276 | 277 | # Node.js Tools for Visual Studio 278 | .ntvs_analysis.dat 279 | node_modules/ 280 | 281 | # Visual Studio 6 build log 282 | *.plg 283 | 284 | # Visual Studio 6 workspace options file 285 | *.opt 286 | 287 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 288 | *.vbw 289 | 290 | # Visual Studio LightSwitch build output 291 | **/*.HTMLClient/GeneratedArtifacts 292 | **/*.DesktopClient/GeneratedArtifacts 293 | **/*.DesktopClient/ModelManifest.xml 294 | **/*.Server/GeneratedArtifacts 295 | **/*.Server/ModelManifest.xml 296 | _Pvt_Extensions 297 | 298 | # Paket dependency manager 299 | .paket/paket.exe 300 | paket-files/ 301 | 302 | # FAKE - F# Make 303 | .fake/ 304 | 305 | # CodeRush personal settings 306 | .cr/personal 307 | 308 | # Python Tools for Visual Studio (PTVS) 309 | __pycache__/ 310 | *.pyc 311 | 312 | # Cake - Uncomment if you are using it 313 | # tools/** 314 | # !tools/packages.config 315 | 316 | # Tabs Studio 317 | *.tss 318 | 319 | # Telerik's JustMock configuration file 320 | *.jmconfig 321 | 322 | # BizTalk build output 323 | *.btp.cs 324 | *.btm.cs 325 | *.odx.cs 326 | *.xsd.cs 327 | 328 | # OpenCover UI analysis results 329 | OpenCover/ 330 | 331 | # Azure Stream Analytics local run output 332 | ASALocalRun/ 333 | 334 | # MSBuild Binary and Structured Log 335 | *.binlog 336 | 337 | # NVidia Nsight GPU debugger configuration file 338 | *.nvuser 339 | 340 | # MFractors (Xamarin productivity tool) working folder 341 | .mfractor/ 342 | 343 | # Local History for Visual Studio 344 | .localhistory/ 345 | 346 | # BeatPulse healthcheck temp database 347 | healthchecksdb 348 | 349 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 350 | MigrationBackup/ 351 | 352 | # Ionide (cross platform F# VS Code tools) working folder 353 | .ionide/ 354 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Il2CppAssemblyUnhollower"] 2 | path = Il2CppAssemblyUnhollower 3 | url = https://github.com/knah/Il2CppAssemblyUnhollower 4 | [submodule "Il2CppDumper"] 5 | path = Il2CppDumper 6 | url = https://github.com/Perfare/Il2CppDumper 7 | -------------------------------------------------------------------------------- /AutoGunfireReborn.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30011.22 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssemblyUnhollower", "Il2CppAssemblyUnhollower\AssemblyUnhollower\AssemblyUnhollower.csproj", "{B6EB4C86-9B1A-4719-8707-D84B234F7676}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnhollowerBaseLib", "Il2CppAssemblyUnhollower\UnhollowerBaseLib\UnhollowerBaseLib.csproj", "{B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnhollowerRuntimeLib", "Il2CppAssemblyUnhollower\UnhollowerRuntimeLib\UnhollowerRuntimeLib.csproj", "{A969803F-C2AF-4E42-B772-A48C18116CBC}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Il2CppDumper", "Il2CppDumper\Il2CppDumper\Il2CppDumper.csproj", "{8975D064-7ECE-49EE-A68D-F52D22B4D98F}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GunfireRebornDumper", "GunfireRebornDumper\GunfireRebornDumper.csproj", "{385C11FF-EF0F-4FD5-B207-B76820ADE367}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GunfireRebornMods", "GunfireRebornMods\GunfireRebornMods.csproj", "{786E2464-E23C-4392-A81A-870456D7FD63}" 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Any CPU = Debug|Any CPU 21 | Debug|x64 = Debug|x64 22 | Debug|x86 = Debug|x86 23 | Release|Any CPU = Release|Any CPU 24 | Release|x64 = Release|x64 25 | Release|x86 = Release|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Debug|x64.ActiveCfg = Debug|Any CPU 31 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Debug|x64.Build.0 = Debug|Any CPU 32 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Debug|x86.ActiveCfg = Debug|Any CPU 33 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Debug|x86.Build.0 = Debug|Any CPU 34 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Release|x64.ActiveCfg = Release|Any CPU 37 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Release|x64.Build.0 = Release|Any CPU 38 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Release|x86.ActiveCfg = Release|Any CPU 39 | {B6EB4C86-9B1A-4719-8707-D84B234F7676}.Release|x86.Build.0 = Release|Any CPU 40 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Debug|x64.ActiveCfg = Debug|Any CPU 43 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Debug|x64.Build.0 = Debug|Any CPU 44 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Debug|x86.ActiveCfg = Debug|Any CPU 45 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Debug|x86.Build.0 = Debug|Any CPU 46 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Release|x64.ActiveCfg = Release|Any CPU 49 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Release|x64.Build.0 = Release|Any CPU 50 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Release|x86.ActiveCfg = Release|Any CPU 51 | {B7C01AE9-0FC8-4751-B56D-F2ECFC72F269}.Release|x86.Build.0 = Release|Any CPU 52 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 53 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU 54 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Debug|x64.ActiveCfg = Debug|Any CPU 55 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Debug|x64.Build.0 = Debug|Any CPU 56 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Debug|x86.ActiveCfg = Debug|Any CPU 57 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Debug|x86.Build.0 = Debug|Any CPU 58 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Release|Any CPU.ActiveCfg = Release|Any CPU 59 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Release|Any CPU.Build.0 = Release|Any CPU 60 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Release|x64.ActiveCfg = Release|Any CPU 61 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Release|x64.Build.0 = Release|Any CPU 62 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Release|x86.ActiveCfg = Release|Any CPU 63 | {A969803F-C2AF-4E42-B772-A48C18116CBC}.Release|x86.Build.0 = Release|Any CPU 64 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 65 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Debug|Any CPU.Build.0 = Debug|Any CPU 66 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Debug|x64.ActiveCfg = Debug|Any CPU 67 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Debug|x64.Build.0 = Debug|Any CPU 68 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Debug|x86.ActiveCfg = Debug|Any CPU 69 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Debug|x86.Build.0 = Debug|Any CPU 70 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Release|Any CPU.ActiveCfg = Release|Any CPU 71 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Release|Any CPU.Build.0 = Release|Any CPU 72 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Release|x64.ActiveCfg = Release|Any CPU 73 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Release|x64.Build.0 = Release|Any CPU 74 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Release|x86.ActiveCfg = Release|Any CPU 75 | {8975D064-7ECE-49EE-A68D-F52D22B4D98F}.Release|x86.Build.0 = Release|Any CPU 76 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 77 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Debug|Any CPU.Build.0 = Debug|Any CPU 78 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Debug|x64.ActiveCfg = Debug|x64 79 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Debug|x64.Build.0 = Debug|x64 80 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Debug|x86.ActiveCfg = Debug|Any CPU 81 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Debug|x86.Build.0 = Debug|Any CPU 82 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Release|Any CPU.ActiveCfg = Release|Any CPU 83 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Release|Any CPU.Build.0 = Release|Any CPU 84 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Release|x64.ActiveCfg = Release|x64 85 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Release|x64.Build.0 = Release|x64 86 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Release|x86.ActiveCfg = Release|Any CPU 87 | {385C11FF-EF0F-4FD5-B207-B76820ADE367}.Release|x86.Build.0 = Release|Any CPU 88 | {786E2464-E23C-4392-A81A-870456D7FD63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 89 | {786E2464-E23C-4392-A81A-870456D7FD63}.Debug|Any CPU.Build.0 = Debug|Any CPU 90 | {786E2464-E23C-4392-A81A-870456D7FD63}.Debug|x64.ActiveCfg = Debug|x64 91 | {786E2464-E23C-4392-A81A-870456D7FD63}.Debug|x64.Build.0 = Debug|x64 92 | {786E2464-E23C-4392-A81A-870456D7FD63}.Debug|x86.ActiveCfg = Debug|Any CPU 93 | {786E2464-E23C-4392-A81A-870456D7FD63}.Debug|x86.Build.0 = Debug|Any CPU 94 | {786E2464-E23C-4392-A81A-870456D7FD63}.Release|Any CPU.ActiveCfg = Release|Any CPU 95 | {786E2464-E23C-4392-A81A-870456D7FD63}.Release|Any CPU.Build.0 = Release|Any CPU 96 | {786E2464-E23C-4392-A81A-870456D7FD63}.Release|x64.ActiveCfg = Release|x64 97 | {786E2464-E23C-4392-A81A-870456D7FD63}.Release|x64.Build.0 = Release|x64 98 | {786E2464-E23C-4392-A81A-870456D7FD63}.Release|x86.ActiveCfg = Release|Any CPU 99 | {786E2464-E23C-4392-A81A-870456D7FD63}.Release|x86.Build.0 = Release|Any CPU 100 | EndGlobalSection 101 | GlobalSection(SolutionProperties) = preSolution 102 | HideSolutionNode = FALSE 103 | EndGlobalSection 104 | GlobalSection(ExtensibilityGlobals) = postSolution 105 | SolutionGuid = {91033C52-D2C7-446E-98EC-025450DFD9FA} 106 | EndGlobalSection 107 | EndGlobal 108 | -------------------------------------------------------------------------------- /GunfireRebornDumper/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /GunfireRebornDumper/GunfireRebornDumper.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {385C11FF-EF0F-4FD5-B207-B76820ADE367} 8 | Exe 9 | GunfireRebornDumper 10 | GunfireRebornDumper 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | true 37 | bin\x64\Debug\ 38 | DEBUG;TRACE 39 | full 40 | x64 41 | 7.3 42 | prompt 43 | MinimumRecommendedRules.ruleset 44 | true 45 | 46 | 47 | bin\x64\Release\ 48 | TRACE 49 | true 50 | pdbonly 51 | x64 52 | 7.3 53 | prompt 54 | MinimumRecommendedRules.ruleset 55 | true 56 | 57 | 58 | 59 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.dll 60 | 61 | 62 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Mdb.dll 63 | 64 | 65 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Pdb.dll 66 | 67 | 68 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Rocks.dll 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | {b6eb4c86-9b1a-4719-8707-d84b234f7676} 91 | AssemblyUnhollower 92 | 93 | 94 | {b7c01ae9-0fc8-4751-b56d-f2ecfc72f269} 95 | UnhollowerBaseLib 96 | 97 | 98 | {a969803f-c2af-4e42-b772-a48c18116cbc} 99 | UnhollowerRuntimeLib 100 | 101 | 102 | {8975d064-7ece-49ee-a68d-f52d22b4d98f} 103 | Il2CppDumper 104 | 105 | 106 | 107 | 108 | PreserveNewest 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /GunfireRebornDumper/Minifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.IO.Compression; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Mono.Cecil; 9 | 10 | namespace GunfireRebornDumper 11 | { 12 | public static class Minifier 13 | { 14 | static List neededTypes = new List(); 15 | static List neededMethods = new List(); 16 | static List neededFields = new List(); 17 | static List neededProperties = new List(); 18 | static List blacklistTypes = new List { "Enum", "ValueType" }; 19 | static List blacklistedAssemblies = new List { "mscorlib", "System", "System.Core", "UnhollowerBaseLib", "UnhollowerRuntimeLib", "Iced", "Mono.Cecil", "Costura" }; 20 | //static List blacklistedAssemblies = new List { "System", "System.Core", "UnhollowerBaseLib", "UnhollowerRuntimeLib", "Iced", "Mono.Cecil", "Costura" }; 21 | static void AddNeededType(TypeReference type) 22 | { 23 | if (type.ContainsGenericParameter) return; 24 | if (blacklistedAssemblies.Contains(type.Scope.Name)) return; 25 | if (type.FullName.Contains("<") && type.FullName.StartsWith("Il2")) 26 | { 27 | if (!neededTypes.Contains(type.FullName.Substring(0, type.FullName.IndexOf("<")))) neededTypes.Add((type.FullName.Substring(0, type.FullName.IndexOf("<")))); 28 | 29 | } 30 | if (!neededTypes.Contains(type.FullName)) neededTypes.Add(type.FullName); 31 | if (blacklistTypes.Contains(type.Name)) return; 32 | var res = type.Resolve(); 33 | var baseType = type.Resolve().BaseType; 34 | if (baseType != null) AddNeededType(baseType); 35 | } 36 | static List Arrays = new List { "Il2CppArrayBase`1", "Il2CppStructArray`1", "Il2CppReferenceArray`1" }; 37 | static String GetCorrectMethodName(MethodDefinition method) 38 | { 39 | var returnType = method.ReturnType.FullName; 40 | if (Arrays.Contains(method.ReturnType.Name)) 41 | { 42 | returnType = ((GenericInstanceType)method.ReturnType).GenericArguments[0].FullName + "[]"; 43 | } 44 | var argTypes = new List(); 45 | foreach (var arg in method.Parameters) 46 | { 47 | var argType = arg.ParameterType.FullName; 48 | if (Arrays.Contains(arg.ParameterType.Name)) 49 | { 50 | argType = ((GenericInstanceType)arg.ParameterType).GenericArguments[0].FullName + "[]"; 51 | } 52 | argTypes.Add(argType); 53 | } 54 | var argString = String.Join(",", argTypes); 55 | return returnType + " " + method.DeclaringType.FullName + "::" + method.Name + "(" + argString + ")"; 56 | } 57 | public static Boolean CleanType(TypeDefinition type) 58 | { 59 | //type.BaseType = null; 60 | //type.Interfaces.Clear(); 61 | var deleteNestedTypes = new List(); 62 | foreach (var nestedType in type.NestedTypes) 63 | { 64 | var deleteNestedType = CleanType(nestedType); 65 | if (deleteNestedType) deleteNestedTypes.Add(nestedType); 66 | } 67 | if (type.FullName.Contains("ServerDefine")) 68 | Console.WriteLine(""); 69 | deleteNestedTypes.ForEach(t => type.NestedTypes.Remove(t)); 70 | if (!neededTypes.Contains(type.FullName)) 71 | { 72 | return type.NestedTypes.Count == 0; 73 | } 74 | if (type.IsEnum) return false; 75 | var deleteMethods = new List(); 76 | foreach (var method in type.Methods) 77 | { 78 | var gen = false; 79 | if (!(neededMethods.Contains(method.FullName))) 80 | { 81 | deleteMethods.Add(method); 82 | } 83 | } 84 | deleteMethods.ForEach(t => type.Methods.Remove(t.Resolve())); 85 | var deleteProperties = new List(); 86 | foreach (var field in type.Properties) 87 | { 88 | if (!(neededProperties.Contains(field.FullName))) 89 | { 90 | deleteProperties.Add(field); 91 | } 92 | } 93 | deleteProperties.ForEach(t => type.Properties.Remove(t.Resolve())); 94 | var deleteFields = new List(); 95 | foreach (var field in type.Fields) 96 | { 97 | if (!(neededFields.Contains(field.FullName) || type.IsValueType)) 98 | { 99 | deleteFields.Add(field); 100 | } 101 | } 102 | deleteFields.ForEach(t => type.Fields.Remove(t.Resolve())); 103 | return false; 104 | } 105 | static List neededDlls = new List(); 106 | public static void Minify(String exe) 107 | { 108 | var assembly = AssemblyDefinition.ReadAssembly(exe); 109 | var dlls = Directory.GetFiles("DummyDll", "*.dll"); 110 | 111 | foreach (EmbeddedResource resource in assembly.MainModule.Resources) 112 | { 113 | if (!resource.Name.EndsWith("dll.compressed")) continue; 114 | //if (blacklistedAssemblies.Count(a => "costura." + a.ToLower() + ".dll.compressed" == resource.Name) > 0) continue; 115 | if (resource.Name.Contains("mono.cecil")) continue; 116 | using (var compressedStream = resource.GetResourceStream()) 117 | { 118 | using (var deflateStream = new DeflateStream(compressedStream, CompressionMode.Decompress)) 119 | { 120 | using (var outputStream = new MemoryStream()) 121 | { 122 | deflateStream.CopyTo(outputStream); 123 | outputStream.Position = 0; 124 | var embeddedAssembly = AssemblyDefinition.ReadAssembly(outputStream); 125 | File.WriteAllBytes(embeddedAssembly.MainModule.Name, outputStream.ToArray()); 126 | } 127 | } 128 | } 129 | } 130 | 131 | foreach (var module in assembly.Modules) 132 | { 133 | foreach (var type in module.Types) 134 | { 135 | foreach (var m in type.Methods) 136 | { 137 | if (!m.HasBody) continue; 138 | var methodReferences = m.Body.Instructions.ToList().FindAll(il => /*il.OpCode == Mono.Cecil.Cil.OpCodes.Call &&*/ il.Operand as MethodReference != null).Select(il => il.Operand as MethodReference); 139 | foreach (var reference in methodReferences) 140 | { 141 | if (!blacklistedAssemblies.Contains(reference.DeclaringType.Scope.Name) && reference.DeclaringType.Scope != type.Scope) 142 | { 143 | var property = reference.DeclaringType.Resolve().Properties.FirstOrDefault(p => p.SetMethod == reference.Resolve() || p.GetMethod == reference.Resolve()); 144 | if (property != null) 145 | { 146 | if (!neededProperties.Contains(property.FullName.Replace("Il2Cpp", ""))) 147 | { 148 | neededProperties.Add(property.FullName.Replace("Il2Cpp", "")); 149 | } 150 | if (!neededFields.Contains(property.FullName.Replace("Il2Cpp", "").Replace("()", ""))) 151 | { 152 | neededFields.Add(property.FullName.Replace("Il2Cpp", "").Replace("()", "")); 153 | } 154 | } 155 | if (!neededDlls.Contains(reference.DeclaringType.Scope)) 156 | { 157 | neededDlls.Add(reference.DeclaringType.Scope); 158 | } 159 | AddNeededType(reference.DeclaringType); 160 | if (reference.IsGenericInstance) 161 | { 162 | var genReference = (GenericInstanceMethod)reference; 163 | foreach (var gp in genReference.GenericParameters) 164 | { 165 | AddNeededType(gp); 166 | } 167 | } 168 | AddNeededType(reference.ReturnType); 169 | foreach (var p in reference.Parameters) 170 | { 171 | AddNeededType(p.ParameterType); 172 | } 173 | foreach (var p in reference.DeclaringType.Resolve().Interfaces) 174 | { 175 | AddNeededType(p.InterfaceType); 176 | } 177 | var methodName = reference.FullName; 178 | var method = reference.Resolve(); 179 | methodName = GetCorrectMethodName(method).Replace("Il2Cpp", ""); 180 | if (!neededMethods.Contains(methodName)) 181 | { 182 | neededMethods.Add(methodName); 183 | } 184 | if (reference.IsGenericInstance) 185 | { 186 | if (!neededMethods.Contains(reference.Name)) 187 | { 188 | //neededMethods.Add(reference.Name); 189 | } 190 | } 191 | } 192 | } 193 | var fieldReferences = m.Body.Instructions.ToList().FindAll(il => il.Operand as FieldReference != null).Select(il => il.Operand as FieldReference); 194 | foreach (var reference in fieldReferences) 195 | { 196 | if (!blacklistedAssemblies.Contains(reference.DeclaringType.Scope.Name) && reference.DeclaringType.Scope != type.Scope) 197 | { 198 | if (!neededDlls.Contains(reference.DeclaringType.Scope)) 199 | { 200 | neededDlls.Add(reference.DeclaringType.Scope); 201 | } 202 | AddNeededType(reference.DeclaringType); 203 | AddNeededType(reference.FieldType); 204 | if (!neededFields.Contains(reference.FullName)) 205 | { 206 | neededFields.Add(reference.FullName); 207 | } 208 | } 209 | } 210 | } 211 | } 212 | } 213 | foreach (var dll in dlls) 214 | { 215 | if (neededDlls.Count(d => d.Name == Path.GetFileNameWithoutExtension(dll)) == 0) 216 | { 217 | continue; 218 | } 219 | assembly = AssemblyDefinition.ReadAssembly(dll); 220 | var module = assembly.MainModule; 221 | 222 | var deleteTypes = new List(); 223 | foreach (var type in module.Types) 224 | { 225 | var needRemove = CleanType(type); 226 | if (needRemove) deleteTypes.Add(type); 227 | } 228 | deleteTypes.ForEach(t => module.Types.Remove(t.Resolve())); 229 | 230 | assembly.Write(dll.Replace("DummyDll", "StrippedDll")); 231 | } 232 | Console.WriteLine(""); 233 | } 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /GunfireRebornDumper/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace GunfireRebornDumper 7 | { 8 | class Program 9 | { 10 | static Int32 appId = 1217060; // could also pull from reading all appmanifests 11 | static String gameName = "Gunfire Reborn"; 12 | static String steamPath = Path.Combine(Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam").GetValue("SteamPath").ToString(), "steamapps"); 13 | static String gamePath 14 | { 15 | get 16 | { 17 | if (File.Exists(Path.Combine(steamPath, $"appmanifest_{appId}.acf"))) 18 | return Path.Combine(steamPath, "common", gameName) + "\\"; 19 | var lib = File.ReadAllLines(Path.Combine(steamPath, "libraryfolders.vdf")); 20 | foreach (var line in lib) 21 | { 22 | if (line.Contains(@"\\")) 23 | { 24 | var path = line.Replace("\t", "").Replace("\\\\", "\\").Split(new char[1] { '"' }, StringSplitOptions.RemoveEmptyEntries)[1]; 25 | if (File.Exists(Path.Combine(path, $"steamapps\\appmanifest_{appId}.acf"))) 26 | return Path.Combine(path, "steamapps\\common", gameName) + "\\"; 27 | } 28 | } 29 | throw new Exception("Can't find game"); 30 | } 31 | } 32 | static void Main(string[] args) 33 | { 34 | if (false) 35 | { 36 | var config = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"config.json"); 37 | config = config.Replace("\"RequireAnyKey\": true,", "\"RequireAnyKey\": false,"); 38 | File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"config.json", config); 39 | var Il2CppDumperProgram = Type.GetType("Il2CppDumper.Program, Il2CppDumper"); 40 | var Il2CppDumperMain = Il2CppDumperProgram.GetMethods(BindingFlags.NonPublic | BindingFlags.Static).FirstOrDefault(m => m.Name == "Main"); 41 | Il2CppDumperMain.Invoke(null, new object[1] { (new string[2] { gamePath + gameName + @"_Data\il2cpp_data\Metadata\global-metadata.dat", gamePath + @"GameAssembly.dll" }) }); 42 | } 43 | if (false) 44 | { 45 | var options = new AssemblyUnhollower.UnhollowerOptions(); 46 | options.AdditionalAssembliesBlacklist.Add("Mono.Security"); // always blacklist this one 47 | options.AdditionalAssembliesBlacklist.Add("Newtonsoft.Json"); // always blacklist this one 48 | options.UnityBaseLibsDir = AppDomain.CurrentDomain.BaseDirectory + "DummyDll"; 49 | options.SourceDir = AppDomain.CurrentDomain.BaseDirectory + "DummyDll"; 50 | options.OutputDir = AppDomain.CurrentDomain.BaseDirectory + "ProxyDll"; 51 | options.MscorlibPath = @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll";// AppDomain.CurrentDomain.BaseDirectory + @"lib\mscorlib.dll"; 52 | var AssemblyUnhollowerProgram = Type.GetType("AssemblyUnhollower.Program, AssemblyUnhollower"); 53 | var AssemblyUnhollowerMain = AssemblyUnhollowerProgram.GetMethods(BindingFlags.Public | BindingFlags.Static).FirstOrDefault(m => m.Name == "Main" && m.GetParameters()[0].ParameterType == typeof(AssemblyUnhollower.UnhollowerOptions)); 54 | AssemblyUnhollowerMain.Invoke(null, new object[1] { options }); 55 | } 56 | if (true) 57 | { 58 | Minifier.Minify(@"..\..\..\..\GunfireRebornMods\bin\x64\Debug\GunfireRebornMods.exe"); 59 | var options = new AssemblyUnhollower.UnhollowerOptions(); 60 | options.AdditionalAssembliesBlacklist.Add("Mono.Security"); // always blacklist this one 61 | options.AdditionalAssembliesBlacklist.Add("Newtonsoft.Json"); // always blacklist this one 62 | options.UnityBaseLibsDir = AppDomain.CurrentDomain.BaseDirectory + "StrippedDll"; 63 | options.SourceDir = AppDomain.CurrentDomain.BaseDirectory + "StrippedDll"; 64 | options.OutputDir = AppDomain.CurrentDomain.BaseDirectory + "FinalDll"; 65 | options.MscorlibPath = @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll";// AppDomain.CurrentDomain.BaseDirectory + @"lib\mscorlib.dll"; 66 | var AssemblyUnhollowerProgram = Type.GetType("AssemblyUnhollower.Program, AssemblyUnhollower"); 67 | var AssemblyUnhollowerMain = AssemblyUnhollowerProgram.GetMethods(BindingFlags.Public | BindingFlags.Static).FirstOrDefault(m => m.Name == "Main" && m.GetParameters()[0].ParameterType == typeof(AssemblyUnhollower.UnhollowerOptions)); 68 | AssemblyUnhollowerMain.Invoke(null, new object[1] { options }); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /GunfireRebornDumper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GunfireRebornDumper")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GunfireRebornDumper")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("385c11ff-ef0f-4fd5-b207-b76820ade367")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GunfireRebornDumper/lib/mscorlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shalzuth/AutoGunfireReborn/9576c12f52a2fc909b2bd7114c62f8f6e7b65123/GunfireRebornDumper/lib/mscorlib.dll -------------------------------------------------------------------------------- /GunfireRebornDumper/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /GunfireRebornMods/Common/ModBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace GunfireRebornMods 4 | { 5 | public class ModBase 6 | { 7 | public String ModName { get; set; } = "Mod Name"; 8 | public virtual Boolean HasConfig { get; set; } = false; 9 | public virtual Single SliderVal { get; set; } = 5; 10 | public virtual Single SliderMin { get; set; } = 0; 11 | public virtual Single SliderMax { get; set; } = 10; 12 | public Boolean Enabled { get; set; } = false; 13 | public virtual void Start() { } 14 | public virtual void Update() { } 15 | public virtual void OnGUI() { } 16 | public virtual void OnDisable() { } 17 | public virtual void OnEnable() { } 18 | } 19 | } -------------------------------------------------------------------------------- /GunfireRebornMods/Common/ModManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace GunfireRebornMods 6 | { 7 | public class ModManager : MonoBehaviour 8 | { 9 | public ModManager(IntPtr intPtr) : base(intPtr) { } 10 | public List Mods = new List(); 11 | public GUILayoutOption[] GUILayoutOption = new GUILayoutOption[0]; 12 | unsafe void OnGUI() 13 | { 14 | foreach (var mod in Mods) if (mod.Enabled) mod.OnGUI(); 15 | if (Cursor.lockState == CursorLockMode.Locked) return; 16 | var area = new Rect(25, 25, 150, 250); 17 | GUI.Box(area, "shalzuth's mods"); 18 | GUILayout.BeginArea(area); 19 | GUILayout.Space(20); 20 | foreach (var mod in Mods) 21 | { 22 | var val = GUILayout.Toggle(mod.Enabled, mod.GetType().Name, GUILayoutOption); 23 | if (val != mod.Enabled) 24 | { 25 | if (val) mod.OnEnable(); 26 | else mod.OnDisable(); 27 | mod.Enabled = val; 28 | } 29 | if (mod.Enabled && mod.HasConfig) mod.SliderVal = GUILayout.DoHorizontalSlider(mod.SliderVal, mod.SliderMin, mod.SliderMax, new GUIStyle(GUI.skin.horizontalSlider), new GUIStyle(GUI.skin.horizontalSliderThumb), GUILayoutOption); 30 | if (mod.Enabled) mod.OnGUI(); 31 | } 32 | GUILayout.EndArea(); 33 | } 34 | 35 | void Update() 36 | { 37 | foreach (var mod in Mods) if (mod.Enabled) mod.Update(); 38 | } 39 | void OnDisable() 40 | { 41 | foreach (var mod in Mods) if (mod.Enabled) mod.OnDisable(); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /GunfireRebornMods/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /GunfireRebornMods/FodyWeavers.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks 13 | 14 | 15 | 16 | 17 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. 18 | 19 | 20 | 21 | 22 | A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks 23 | 24 | 25 | 26 | 27 | A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. 28 | 29 | 30 | 31 | 32 | A list of unmanaged 32 bit assembly names to include, delimited with line breaks. 33 | 34 | 35 | 36 | 37 | A list of unmanaged 64 bit assembly names to include, delimited with line breaks. 38 | 39 | 40 | 41 | 42 | The order of preloaded assemblies, delimited with line breaks. 43 | 44 | 45 | 46 | 47 | 48 | This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. 49 | 50 | 51 | 52 | 53 | Controls if .pdbs for reference assemblies are also embedded. 54 | 55 | 56 | 57 | 58 | Controls if runtime assemblies are also embedded. 59 | 60 | 61 | 62 | 63 | Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. 64 | 65 | 66 | 67 | 68 | Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. 69 | 70 | 71 | 72 | 73 | As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. 74 | 75 | 76 | 77 | 78 | Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. 79 | 80 | 81 | 82 | 83 | Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. 84 | 85 | 86 | 87 | 88 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | 89 | 90 | 91 | 92 | 93 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. 94 | 95 | 96 | 97 | 98 | A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | 99 | 100 | 101 | 102 | 103 | A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. 104 | 105 | 106 | 107 | 108 | A list of unmanaged 32 bit assembly names to include, delimited with |. 109 | 110 | 111 | 112 | 113 | A list of unmanaged 64 bit assembly names to include, delimited with |. 114 | 115 | 116 | 117 | 118 | The order of preloaded assemblies, delimited with |. 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. 127 | 128 | 129 | 130 | 131 | A comma-separated list of error codes that can be safely ignored in assembly verification. 132 | 133 | 134 | 135 | 136 | 'false' to turn off automatic generation of the XML Schema file. 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /GunfireRebornMods/GunfireRebornMods.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | {786E2464-E23C-4392-A81A-870456D7FD63} 9 | Exe 10 | Properties 11 | GunfireRebornMods 12 | GunfireRebornMods 13 | v4.7.2 14 | 512 15 | true 16 | 17 | 18 | 19 | 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | false 28 | true 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | true 40 | bin\x64\Debug\ 41 | DEBUG;TRACE 42 | full 43 | x64 44 | 7.3 45 | prompt 46 | MinimumRecommendedRules.ruleset 47 | true 48 | 49 | 50 | bin\x64\Release\ 51 | TRACE 52 | true 53 | pdbonly 54 | x64 55 | 7.3 56 | prompt 57 | MinimumRecommendedRules.ruleset 58 | true 59 | 60 | 61 | GunfireRebornMods.Program 62 | 63 | 64 | 65 | ..\packages\Costura.Fody.5.3.0\lib\netstandard1.0\Costura.dll 66 | 67 | 68 | ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll 69 | True 70 | True 71 | 72 | 73 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.dll 74 | 75 | 76 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Mdb.dll 77 | 78 | 79 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Pdb.dll 80 | 81 | 82 | ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Rocks.dll 83 | 84 | 85 | ..\GunfireRebornDumper\bin\x64\Debug\DummyDll\System.dll 86 | 87 | 88 | ..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll 89 | True 90 | True 91 | 92 | 93 | 94 | ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll 95 | True 96 | True 97 | 98 | 99 | 100 | ..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll 101 | True 102 | True 103 | 104 | 105 | ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll 106 | True 107 | True 108 | 109 | 110 | ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll 111 | True 112 | True 113 | 114 | 115 | ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll 116 | True 117 | True 118 | 119 | 120 | 121 | ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll 122 | True 123 | True 124 | 125 | 126 | ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll 127 | True 128 | True 129 | 130 | 131 | ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll 132 | True 133 | True 134 | 135 | 136 | ..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll 137 | True 138 | True 139 | 140 | 141 | ..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll 142 | True 143 | True 144 | 145 | 146 | ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll 147 | True 148 | True 149 | 150 | 151 | ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll 152 | True 153 | True 154 | 155 | 156 | 157 | ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll 158 | True 159 | True 160 | 161 | 162 | ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll 163 | True 164 | True 165 | 166 | 167 | ..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll 168 | True 169 | True 170 | 171 | 172 | ..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll 173 | True 174 | True 175 | 176 | 177 | ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll 178 | True 179 | True 180 | 181 | 182 | ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll 183 | True 184 | True 185 | 186 | 187 | ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll 188 | True 189 | True 190 | 191 | 192 | ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll 193 | True 194 | True 195 | 196 | 197 | ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll 198 | True 199 | True 200 | 201 | 202 | ..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll 203 | True 204 | True 205 | 206 | 207 | 208 | 209 | ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll 210 | True 211 | True 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\Assembly-CSharp.dll 234 | 235 | 236 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\csharpdata.dll 237 | 238 | 239 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\Il2Cppmscorlib.dll 240 | 241 | 242 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\Il2CppSystem.dll 243 | 244 | 245 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\UnityEngine.CoreModule.dll 246 | 247 | 248 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\UnityEngine.IMGUIModule.dll 249 | 250 | 251 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\UnityEngine.PhysicsModule.dll 252 | 253 | 254 | ..\GunfireRebornDumper\bin\x64\Debug\ProxyDll\UnityEngine.UIElementsModule.dll 255 | 256 | 257 | 258 | 259 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\Assembly-CSharp.dll 260 | 261 | 262 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\csharpdata.dll 263 | 264 | 265 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\Il2Cppmscorlib.dll 266 | 267 | 268 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\Il2CppSystem.dll 269 | 270 | 271 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\UnityEngine.CoreModule.dll 272 | 273 | 274 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\UnityEngine.IMGUIModule.dll 275 | 276 | 277 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\UnityEngine.PhysicsModule.dll 278 | 279 | 280 | ..\GunfireRebornDumper\bin\x64\Debug\FinalDll\UnityEngine.UIElementsModule.dll 281 | 282 | 283 | 284 | 285 | {b7c01ae9-0fc8-4751-b56d-f2ecfc72f269} 286 | UnhollowerBaseLib 287 | global 288 | 289 | 290 | {a969803f-c2af-4e42-b772-a48c18116cbc} 291 | UnhollowerRuntimeLib 292 | global 293 | False 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 304 | 305 | 306 | 307 | 308 | 309 | 310 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/Aimbot.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Runtime.InteropServices; 3 | namespace GunfireRebornMods 4 | { 5 | public class Aimbot : ModBase 6 | { 7 | [DllImport("user32.dll")] static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo); 8 | bool Toggled = false; 9 | // thx https://github.com/pentium1131/GunfireReborn-aimbot 10 | public override void Update() 11 | { 12 | if (Input.GetKeyDown(KeyCode.X)) Toggled = !Toggled; 13 | if (Toggled) return; 14 | var monsters = NewPlayerManager.GetMonsters(); 15 | if (monsters != null) 16 | { 17 | Transform closestMonster = null; 18 | var closestMonsterDist = 99999f; 19 | foreach (var monster in monsters) 20 | { 21 | if (monster == null) continue; 22 | var bodyPartCom = monster.BodyPartCom; 23 | if (bodyPartCom == null) continue; 24 | var monsterTransform = bodyPartCom.GetWeakTrans(true); 25 | if (monsterTransform == null) continue; 26 | var vec = CameraManager.MainCameraCom.WorldToViewportPoint(monsterTransform.position); 27 | if (true) 28 | { 29 | if (vec.z <= 0) continue; 30 | vec.y = 0; 31 | vec.x = 0.5f - vec.x; 32 | vec.x = Screen.width * vec.x; 33 | vec.z = 0f; 34 | if (vec.magnitude > 150f) continue; 35 | } 36 | vec = monsterTransform.position - CameraManager.MainCamera.position; 37 | var ray = new Ray(CameraManager.MainCamera.position, vec); 38 | var hits = Physics.RaycastAll(ray, vec.magnitude); 39 | var visible = true; 40 | foreach (var hit in hits) 41 | { 42 | if (hit.collider.gameObject.layer == 0 || hit.collider.gameObject.layer == 30 || hit.collider.gameObject.layer == 31) //&& hit.collider.name.Contains("_") 43 | { 44 | visible = false; 45 | break; 46 | } 47 | } 48 | if (visible) 49 | { 50 | if (vec.magnitude < closestMonsterDist) 51 | { 52 | closestMonsterDist = vec.magnitude; 53 | closestMonster = monsterTransform; 54 | } 55 | } 56 | } 57 | if (closestMonster != null) 58 | { 59 | var offset = closestMonster.position; 60 | offset += new Vector3(0, 0.2f); 61 | var screenAim = CameraManager.MainCameraCom.WorldToScreenPoint(offset); 62 | var aimTarget = new Vector2(screenAim.x, Screen.height - screenAim.y); 63 | if (aimTarget != Vector2.zero) 64 | { 65 | var x = aimTarget.x - Screen.width / 2.0f; 66 | var y = aimTarget.y - Screen.height / 2.0f; 67 | x /= 2.5f; 68 | y /= 2.5f; 69 | mouse_event(0x0001, (int)x, (int)y, 0, 0); 70 | } 71 | } 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/AutoAim.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | namespace GunfireRebornMods 3 | { 4 | public class AutoAim : ModBase 5 | { 6 | public override void OnEnable() 7 | { 8 | GameObject.FindObjectOfType().speed = 100; 9 | } 10 | public override void Update() 11 | { 12 | AutoAimat.AimAtTarget(100f); 13 | DetectionClass.aimAssist = true; 14 | } 15 | public override void OnDisable() 16 | { 17 | GameObject.FindObjectOfType().speed = 0; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/ExtraSensoryPerception.cs: -------------------------------------------------------------------------------- 1 | using DataHelper; 2 | using UnityEngine; 3 | 4 | namespace GunfireRebornMods 5 | { 6 | public class ExtraSensoryPerception : ModBase 7 | { 8 | public bool ShowObject(NewPlayerObject obj) 9 | { 10 | if (obj.FightType == ServerDefine.FightType.NWARRIOR_DROP_EQUIP) return true; 11 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_DROP_RELIC) return true; 12 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_SMITH) return true; 13 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_SHOP) return true; 14 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_GSCASHSHOP) return true; 15 | else if (obj.FightType == ServerDefine.FightType.WARRIOR_OBSTACLE_NORMAL && (obj.Shape == 4406 || obj.Shape == 4419 || obj.Shape == 4427)) return true; 16 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_EVENT) return true; 17 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_ITEMBOX) return true; 18 | return false; 19 | 20 | } 21 | public string FightTypeToString(NewPlayerObject obj) 22 | { 23 | if (obj.FightType == ServerDefine.FightType.NWARRIOR_DROP_EQUIP) return DataMgr.GetWeaponData(obj.Shape).Name + " +" + obj.DropOPCom.WeaponInfo.SIProp.Grade.ToString(); 24 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_DROP_RELIC) return DataMgr.GetRelicData(obj.DropOPCom.RelicSid).Name; 25 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_SMITH) return "Smith"; 26 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_SHOP) return "Kermit"; 27 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_GSCASHSHOP) return "GhostKermit"; 28 | else if (obj.FightType == ServerDefine.FightType.WARRIOR_OBSTACLE_NORMAL && (obj.Shape == 4406 || obj.Shape == 4419 || obj.Shape == 4427)) return "Vault"; 29 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_EVENT) return "Chest"; 30 | else if (obj.FightType == ServerDefine.FightType.NWARRIOR_NPC_ITEMBOX) return "Chest"; 31 | return "unk"; 32 | } 33 | public override void OnEnable() 34 | { 35 | foreach (var monster in NewPlayerManager.MonsterLst) 36 | { 37 | System.Console.WriteLine("MonsterLst : " + monster.FightType); 38 | } 39 | foreach (var monster in NewPlayerManager.PlayerDict) 40 | { 41 | var val = monster.Value; 42 | System.Console.WriteLine("PlayerDict : " + monster.Value.FightType); 43 | } 44 | foreach (var monster in NewPlayerManager.NpcLst) 45 | { 46 | System.Console.WriteLine("NpcLst : " + monster.FightType); 47 | } 48 | } 49 | public override void Update() 50 | { 51 | var mon = NewPlayerManager.GetMonsters(); 52 | foreach (var m in mon) if (m.BloodBarCom != null) m.BloodBarCom.ShowBloodBar(); 53 | //foreach (var m in NewPlayerManager.MonsterLst) if (m.BloodBarCom != null) m.BloodBarCom.ShowBloodBar(); 54 | } 55 | public override void OnGUI() 56 | { 57 | foreach (var p in NewPlayerManager.PlayerDict) 58 | { 59 | var val = p.Value; 60 | if (val.centerPointTrans == null) continue; 61 | if (!ShowObject(val)) continue; 62 | var screenPos = CameraManager.MainCameraCom.WorldToScreenPoint(val.centerPointTrans.transform.position); 63 | if (screenPos.z > 0) 64 | { 65 | var dist = Vector3.Distance(HeroMoveManager.HeroObj.centerPointTrans.position, val.centerPointTrans.position).ToString("0.0"); 66 | GUI.Label(new Rect(screenPos.x, Screen.height - screenPos.y, 800, 50), FightTypeToString(val) + "(" + dist + "m)"); 67 | //GUI.Label(new Rect(screenPos.x, Screen.height - screenPos.y, 800, 50), monster.Value.SID + " : " + monster.Value.Shape + " : " + monster.Value.FightType); 68 | } 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/FreeCam.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | namespace GunfireRebornMods 3 | { 4 | public class FreeCam : ModBase 5 | { 6 | Vector3 LastPos; 7 | Vector3 LastAngle; 8 | public override void Update() 9 | { 10 | var x = Input.GetAxis("Mouse X"); 11 | var y = Input.GetAxis("Mouse Y"); 12 | var lastMouse = new Vector3(x, y); 13 | if (Input.GetKey(KeyCode.LeftAlt)) 14 | { 15 | Cursor.lockState = CursorLockMode.None; 16 | Cursor.visible = true; 17 | return; 18 | } 19 | else 20 | { 21 | Cursor.lockState = CursorLockMode.Locked; 22 | Cursor.visible = false; 23 | } 24 | var f = 0.0f; 25 | var p = GetBaseInput(); 26 | p = p * mainSpeed; 27 | p = p * Time.deltaTime; 28 | var cameraTransform = CameraManager.MainCameraCom.transform; 29 | LastPos = cameraTransform.position; 30 | cameraTransform.position = LastPos; 31 | cameraTransform.Translate(p); 32 | LastPos = cameraTransform.position; 33 | 34 | LastAngle = cameraTransform.eulerAngles; 35 | lastMouse = new Vector3(-lastMouse.y * camSens, lastMouse.x * camSens, 0); 36 | lastMouse = new Vector3(LastAngle.x + lastMouse.x, LastAngle.y + lastMouse.y, 0); 37 | cameraTransform.eulerAngles = lastMouse; 38 | LastAngle = cameraTransform.eulerAngles; 39 | } 40 | float mainSpeed = 10f; 41 | float camSens = 5f; 42 | Vector3 GetBaseInput() 43 | { 44 | var dir = Vector3.zero; 45 | if (Input.GetKey(KeyCode.W)) 46 | dir += new Vector3(0, 0, 1); 47 | if (Input.GetKey(KeyCode.S)) 48 | dir += new Vector3(0, 0, -1); 49 | if (Input.GetKey(KeyCode.A)) 50 | dir += new Vector3(-1, 0, 0); 51 | if (Input.GetKey(KeyCode.D)) 52 | dir += new Vector3(1, 0, 0); 53 | if (Input.GetKey(KeyCode.Space)) 54 | dir += new Vector3(0, 1, 0); 55 | if (Input.GetKey(KeyCode.C)) 56 | dir += new Vector3(0, -1, 0); 57 | return dir; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/GameSpeed.cs: -------------------------------------------------------------------------------- 1 | namespace GunfireRebornMods 2 | { 3 | public class GameSpeed : ModBase 4 | { 5 | public override bool HasConfig { get; set; } = true; 6 | public override void Update() 7 | { 8 | UnityEngine.Time.timeScale = SliderVal; 9 | } 10 | public override void OnDisable() 11 | { 12 | UnityEngine.Time.timeScale = 1.0f; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/JumpHeight.cs: -------------------------------------------------------------------------------- 1 | namespace GunfireRebornMods 2 | { 3 | public class JumpHeight : ModBase 4 | { 5 | public override bool HasConfig { get; set; } = true; 6 | public override float SliderMin { get; set; } = 0; 7 | public override float SliderVal { get; set; } = 8f; 8 | public override float SliderMax { get; set; } = 30f; 9 | float orig = 0; 10 | public override void Update() 11 | { 12 | if (orig == 0) orig = HeroMoveManager.HMMJS.jumping.baseHeight; //HeroMoveManager.HMMJS.jumping.StoredDefaultHeight;// HeroMoveManager.HMMJS.jumping.baseHeight; 13 | HeroMoveManager.HMMJS.jumping.baseHeight = (SliderVal * SliderVal) / (HeroMoveManager.HMMJS.movement.gravity * 2); 14 | 15 | //HeroMoveManager.HMMJS?.SetJumperHeight(SliderVal); 16 | //HeroMoveManager.HMMJS.jumping.StoredDefaultHeight = HeroMoveManager.HMMJS.jumping.baseHeight; 17 | } 18 | public override void OnDisable() 19 | { 20 | HeroMoveManager.HMMJS.jumping.baseHeight = orig; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/MovementSpeed.cs: -------------------------------------------------------------------------------- 1 | namespace GunfireRebornMods 2 | { 3 | public class MovementSpeed : ModBase 4 | { 5 | public override bool HasConfig { get; set; } = true; 6 | public override float SliderMin { get; set; } = 0; 7 | public override float SliderVal { get; set; } = 10f; 8 | public override float SliderMax { get; set; } = 30f; 9 | float orig = 0; 10 | public override void Update() 11 | { 12 | if (orig == 0) orig = HeroMoveManager.HMMJS.maxForwardSpeed; 13 | //HeroMoveManager.HMMJS.SetSpeed(12); 14 | HeroMoveManager.HMMJS.maxForwardSpeed = HeroMoveManager.HMMJS.maxBackwardsSpeed = HeroMoveManager.HMMJS.maxSidewaysSpeed = SliderVal; 15 | } 16 | public override void OnDisable() 17 | { 18 | HeroMoveManager.HMMJS.maxForwardSpeed = HeroMoveManager.HMMJS.maxBackwardsSpeed = HeroMoveManager.HMMJS.maxSidewaysSpeed = orig; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/SceneDebugger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Reflection; 6 | using UnityEngine; 7 | 8 | namespace GunfireRebornMods 9 | { 10 | public class SceneDebugger : ModBase 11 | { 12 | Rect HierarchyWindow; 13 | Vector2 HierarchyScrollPos; 14 | String SearchText = ""; 15 | Vector2 PropertiesScrollPos; 16 | Transform SelectedGameObject; 17 | List ExpandedObjs = new List(); 18 | 19 | Rect ProjectWindow; 20 | Vector2 ProjectScrollPos; 21 | ConcurrentDictionary ExpandedObjects = new ConcurrentDictionary(); 22 | 23 | public override void OnEnable() 24 | { 25 | ModName = "Scene Debugger"; 26 | HasConfig = false; 27 | 28 | RootObjects = new List(); 29 | } 30 | public override void OnGUI() 31 | { 32 | var area = new Rect(525, 25, 250, 800); 33 | GUI.Box(area, "scene debugger"); 34 | GUILayout.BeginArea(area); 35 | GUILayout.Space(12); 36 | HierarchyWindowMethod(0); 37 | GUILayout.EndArea(); 38 | // HierarchyWindow = GUILayout.Window(HierarchyWindowId, HierarchyWindow, (GUI.WindowFunction)HierarchyWindowMethod, "Hierarchy", new GUILayoutOption[0]); 39 | //ProjectWindow = GUILayout.Window(ProjectWindowId, ProjectWindow, (GUI.WindowFunction)ProjectWindowMethod, "Project", new GUILayoutOption[0]); 40 | } 41 | #region Hierarchy GUI 42 | void DisplayGameObject(GameObject gameObj, Int32 level) 43 | { 44 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 45 | { 46 | GUILayout.Space(level * 20); 47 | var color = GUI.color; 48 | if (SelectedGameObject == gameObj.transform) 49 | GUI.color = Color.green; 50 | if (!gameObj.activeSelf && gameObj.transform.childCount == 0) 51 | GUI.color = Color.magenta; 52 | else if (gameObj.transform.childCount == 0) 53 | GUI.color = Color.yellow; 54 | else if (!gameObj.activeSelf) 55 | GUI.color = Color.red; 56 | if (GUILayout.Toggle(ExpandedObjs.Contains(gameObj.name), gameObj.name, new GUILayoutOption[1] { GUILayout.ExpandWidth(false) })) 57 | { 58 | if (!ExpandedObjs.Contains(gameObj.name)) 59 | { 60 | ExpandedObjs.Add(gameObj.name); 61 | SelectedGameObject = gameObj.transform; 62 | } 63 | } 64 | else 65 | { 66 | if (ExpandedObjs.Contains(gameObj.name)) 67 | { 68 | ExpandedObjs.Remove(gameObj.name); 69 | SelectedGameObject = gameObj.transform; 70 | } 71 | } 72 | GUI.color = color; 73 | } 74 | GUILayout.EndHorizontal(); 75 | if (ExpandedObjs.Contains(gameObj.name)) 76 | for (var i = 0; i < gameObj.transform.childCount; ++i) 77 | DisplayGameObject(gameObj.transform.GetChild(i).gameObject, level + 1); 78 | } 79 | List RootObjects = new List(); 80 | void HierarchyWindowMethod(Int32 id) 81 | { 82 | GUILayout.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);// { GUI.skin.box }); 83 | { 84 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 85 | { 86 | SearchText = GUILayout.TextField(SearchText, 100, new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); 87 | if (GUILayout.Button("Search", new GUILayoutOption[1] { GUILayout.ExpandWidth(false) })) 88 | { } 89 | } 90 | GUILayout.EndHorizontal(); 91 | if (RootObjects.Count == 0) 92 | { 93 | foreach (Transform xform in GameObject.FindObjectsOfType()) 94 | if (xform.parent == null && !xform.name.Contains("(Clone)")) 95 | RootObjects.Add(xform.gameObject); 96 | } 97 | //var rootObjects = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects(); 98 | if (SelectedGameObject == null) 99 | SelectedGameObject = RootObjects.First().transform; 100 | HierarchyScrollPos = GUILayout.BeginScrollView(HierarchyScrollPos, new GUILayoutOption[2] { GUILayout.Height(HierarchyWindow.height / 3), GUILayout.ExpandWidth(true) }); 101 | { 102 | foreach (var rootObject in RootObjects) 103 | DisplayGameObject(rootObject, 0); 104 | } 105 | GUILayout.EndScrollView(); 106 | } 107 | GUILayout.EndVertical(); 108 | GUILayout.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);//GUI.skin.box); 109 | { 110 | PropertiesScrollPos = GUILayout.BeginScrollView(PropertiesScrollPos, new GUILayoutOption[0]);// GUI.skin.box); 111 | { 112 | var fullName = SelectedGameObject.name; 113 | var parentTransform = SelectedGameObject.parent; 114 | while (parentTransform != null) 115 | { 116 | fullName = parentTransform.name + "/" + fullName; 117 | parentTransform = parentTransform.parent; 118 | } 119 | GUILayout.Label(fullName, new GUILayoutOption[0]); 120 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 121 | { 122 | GUILayout.Label(SelectedGameObject.gameObject.layer + " : " + LayerMask.LayerToName(SelectedGameObject.gameObject.layer), new GUILayoutOption[0]); 123 | GUILayout.FlexibleSpace(); 124 | SelectedGameObject.gameObject.SetActive(GUILayout.Toggle(SelectedGameObject.gameObject.activeSelf, "Active", new GUILayoutOption[1] { GUILayout.ExpandWidth(false) })); 125 | if (GUILayout.Button("?", new GUILayoutOption[0])) 126 | Console.WriteLine("?"); 127 | if (GUILayout.Button("X", new GUILayoutOption[0])) 128 | GameObject.Destroy(SelectedGameObject.gameObject); 129 | } 130 | GUILayout.EndHorizontal(); 131 | foreach (var component in SelectedGameObject.GetComponents()) 132 | { 133 | GUILayout.BeginHorizontal(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);// GUI.skin.box); 134 | { 135 | 136 | if (component is Behaviour) 137 | (component as Behaviour).enabled = GUILayout.Toggle((component as Behaviour).enabled, "", new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); 138 | 139 | GUILayout.Label(component.GetIl2CppType().Name + " : " + component.GetIl2CppType().Namespace, new GUILayoutOption[0]); 140 | GUILayout.FlexibleSpace(); 141 | if (GUILayout.Button("?", new GUILayoutOption[0])) 142 | Console.WriteLine("?"); 143 | if (!(component is Transform)) 144 | if (GUILayout.Button("X", new GUILayoutOption[0])) 145 | GameObject.Destroy(component); 146 | } 147 | GUILayout.EndHorizontal(); 148 | } 149 | } 150 | GUILayout.EndScrollView(); 151 | } 152 | GUILayout.EndVertical(); 153 | //GUI.DragWindow(); 154 | } 155 | #endregion 156 | #region Project GUI 157 | void ProjectWindowMethod(Int32 id) 158 | { 159 | GUILayout.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);// GUI.skin.box); 160 | { 161 | ProjectScrollPos = GUILayout.BeginScrollView(ProjectScrollPos, new GUILayoutOption[2] { GUILayout.Height(ProjectWindow.height / 3), GUILayout.ExpandWidth(true) }); 162 | { 163 | var assemblies = AppDomain.CurrentDomain.GetAssemblies(); 164 | foreach (var assembly in assemblies) 165 | { 166 | ExpandedObjects[assembly] = GUILayout.Toggle(ExpandedObjects.ContainsKey(assembly) ? ExpandedObjects[assembly] : false, assembly.GetName().Name, new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); 167 | if (ExpandedObjects[assembly]) 168 | { 169 | var types = assembly.GetTypes().Where(t => t.IsClass && !t.IsAbstract && !t.ContainsGenericParameters).ToList(); 170 | foreach (var type in types) 171 | { 172 | var staticfields = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy).Count(f => f.Name != "OffsetOfInstanceIDInCPlusPlusObject"); 173 | if (staticfields == 0) 174 | continue; 175 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 176 | { 177 | var color = GUI.color; 178 | GUILayout.Space(20); 179 | ExpandedObjects[type] = GUILayout.Toggle(ExpandedObjects.ContainsKey(type) ? ExpandedObjects[type] : false, type.Name, new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); 180 | GUI.color = color; 181 | } 182 | GUILayout.EndHorizontal(); 183 | if (ExpandedObjects[type]) 184 | { 185 | var fields = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy); 186 | foreach (var field in fields) 187 | { 188 | if (field.Name == "OffsetOfInstanceIDInCPlusPlusObject") continue; 189 | //var val = field.GetValue(null); 190 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 191 | { 192 | GUILayout.Space(40); 193 | ExpandedObjects[field] = GUILayout.Toggle(ExpandedObjects.ContainsKey(field) ? ExpandedObjects[field] : false, field.Name + " : " + field.FieldType, new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); 194 | } 195 | GUILayout.EndHorizontal(); 196 | } 197 | } 198 | } 199 | } 200 | } 201 | } 202 | GUILayout.EndScrollView(); 203 | } 204 | GUILayout.EndVertical(); 205 | //GUI.DragWindow(); 206 | } 207 | #endregion 208 | } 209 | } -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/UnlimitedAmmo.cs: -------------------------------------------------------------------------------- 1 | namespace GunfireRebornMods 2 | { 3 | public class Ammo : ModBase 4 | { 5 | public override void Update() 6 | { 7 | var ws = HeroMoveManager.HeroObj?.BulletPreFormCom?.weapondict; 8 | foreach (var w in ws) w.value?.ReloadBulletImmediately(); 9 | foreach (var w in ws) w.value?.ModifyBulletInMagzine(1, 100); 10 | // or Hook ConsumeBulletFromMag 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /GunfireRebornMods/Mods/WeaponMod.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | namespace GunfireRebornMods 3 | { 4 | public class WeaponMod : ModBase 5 | { 6 | Vector2 ScrollPos = Vector2.zero; 7 | public override void Update() 8 | { 9 | var ws = HeroMoveManager.HeroObj?.BulletPreFormCom?.weapondict; 10 | foreach (var w in ws) 11 | { 12 | if (w.value.WeaponAttr.Radius != 500f) w.value.WeaponAttr.Radius = 500f; 13 | //if (w.value.WeaponAttr.Accuracy != 10000) w.value.WeaponAttr.Accuracy = 10000; 14 | if (w.value.WeaponAttr.AttDis != 500f) w.value.WeaponAttr.AttDis = 500f; 15 | // if (w.value.WeaponAttr.Pierce != 99) w.value.WeaponAttr.Pierce = 99; 16 | if (w.value.WeaponAttr.BulletSpeed >= 50f && w.value.WeaponAttr.BulletSpeed != 55f && w.value.WeaponAttr.BulletSpeed != 500f || w.value.WeaponAttr.BulletSpeed == 30f) w.value.WeaponAttr.BulletSpeed = 500f; 17 | //if (w.value.WeaponAttr.Stability != 10000) w.value.WeaponAttr.Stability = 10000; 18 | if (w.value.WeaponAttr.Radius > 0f && w.value.WeaponAttr.Radius < 9f) w.value.WeaponAttr.Radius = 9f; 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /GunfireRebornMods/NativeNetSharp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Runtime.CompilerServices; 6 | using System.Runtime.InteropServices; 7 | using System.Reflection; 8 | using System.Reflection.Emit; 9 | using System.Text; 10 | 11 | using System.IO; 12 | using Microsoft.Win32.SafeHandles; 13 | 14 | namespace GunfireRebornMods 15 | { 16 | public unsafe static class NativeNetSharp 17 | { 18 | public delegate dynamic DynamicDelegate(params dynamic[] args); 19 | static ModuleBuilder moduleBuilder; 20 | public static IntPtr GetFunctionPointerForNativeCode(Action a) 21 | { 22 | var methodInfo = a.Method; 23 | if (moduleBuilder == null) moduleBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("JitDelegateTypes"), AssemblyBuilderAccess.Run).DefineDynamicModule("JitDelegateTypes"); 24 | var parameters = methodInfo.GetParameters().Select(x => x.ParameterType).ToArray(); 25 | var builder = moduleBuilder.DefineType(methodInfo.Name + "Delegate", TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.AnsiClass | TypeAttributes.AutoClass, typeof(MulticastDelegate)); 26 | builder.DefineConstructor(MethodAttributes.RTSpecialName | MethodAttributes.HideBySig | MethodAttributes.Public, CallingConventions.Standard, new Type[] { typeof(Object), typeof(IntPtr) }).SetImplementationFlags(MethodImplAttributes.Runtime | MethodImplAttributes.Managed); 27 | builder.DefineMethod("Invoke", MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual, methodInfo.ReturnType, parameters).SetImplementationFlags(MethodImplAttributes.Runtime | MethodImplAttributes.Managed); 28 | var delegateType = builder.CreateTypeInfo(); 29 | var dlg = Delegate.CreateDelegate(delegateType, null, methodInfo); 30 | return Marshal.GetFunctionPointerForDelegate(dlg); 31 | } 32 | public static T FastCallDelegate(IntPtr functionPtr) 33 | { 34 | var wrapper = new List(); 35 | wrapper.Add(0x58); // pop eax - store the return address 36 | wrapper.Add(0x59); // pop ecx - move the 1st argument to ecx 37 | wrapper.Add(0x5A); // pop edx - move the 2nd argument to edx 38 | wrapper.Add(0x50); // push eax - restore the return address 39 | wrapper.Add(0x68); // push ... 40 | wrapper.AddRange(BitConverter.GetBytes(functionPtr.ToInt32())); // the function address to call 41 | wrapper.Add(0xC3); // ret - and jump to 42 | var wrapperPtr = Marshal.AllocHGlobal(wrapper.Count); 43 | Marshal.Copy(wrapper.ToArray(), 0, wrapperPtr, wrapper.Count); 44 | return Marshal.GetDelegateForFunctionPointer(wrapperPtr); 45 | } 46 | public static void JmpPatch(IntPtr originalPtr, IntPtr replacement) 47 | { 48 | // todo fix 49 | throw new Exception("JmpPatch not supported"); 50 | var origCodeLoc = Marshal.ReadIntPtr(originalPtr); 51 | var jmpToNew = new List(); 52 | if (Environment.Is64BitProcess) 53 | { 54 | jmpToNew.AddRange(new Byte[] { 0x49, 0xBB }); // mov r11, replacement 55 | jmpToNew.AddRange(BitConverter.GetBytes(replacement.ToInt64())); 56 | jmpToNew.AddRange(new Byte[] { 0x41, 0xFF, 0xE3 }); // jmp r11 57 | } 58 | else 59 | { 60 | jmpToNew.Add(0xB8); // mov eax 61 | jmpToNew.AddRange(BitConverter.GetBytes(replacement.ToInt32())); 62 | jmpToNew.AddRange(new Byte[] { 0xFF, 0xE0 }); // jmp eax 63 | } 64 | var origCode = new byte[0x12]; 65 | Marshal.Copy(origCodeLoc, origCode, 0, origCode.Length); 66 | var jmpToOrig = new List(); 67 | jmpToOrig.AddRange(origCode); 68 | if (Environment.Is64BitProcess) 69 | { 70 | jmpToOrig.AddRange(new Byte[] { 0x49, 0xBB }); // mov r11, replacement 71 | jmpToOrig.AddRange(BitConverter.GetBytes((origCodeLoc + origCode.Length).ToInt64())); 72 | jmpToOrig.AddRange(new Byte[] { 0x41, 0xFF, 0xE3 }); // jmp r11 73 | } 74 | else 75 | { 76 | 77 | } 78 | var newFuncLocation = VirtualAllocEx(GetCurrentProcess(), IntPtr.Zero, 0x100, 0x3000, 0x40); 79 | Marshal.Copy(jmpToOrig.ToArray(), 0, newFuncLocation, jmpToOrig.ToArray().Length); 80 | 81 | VirtualProtect(origCodeLoc, (UIntPtr)jmpToNew.ToArray().Length, (UInt32)0x40, out UInt32 old); 82 | Marshal.Copy(jmpToNew.ToArray(), 0, origCodeLoc, jmpToNew.ToArray().Length); 83 | FlushInstructionCache(GetCurrentProcess(), origCodeLoc, (UIntPtr)jmpToNew.ToArray().Length); 84 | VirtualProtect(origCodeLoc, (UIntPtr)jmpToNew.ToArray().Length, old, out UInt32 _); 85 | 86 | Marshal.WriteIntPtr(originalPtr, newFuncLocation); 87 | } 88 | public static IntPtr baseAddress; 89 | public static IntPtr procHandle; 90 | public static Boolean target32Bit = false; 91 | public static void Inject(String procName, Byte[] exeBytes) 92 | { 93 | var CLSID_CLRMetaHost = new Guid("9280188D-0E8E-4867-B30C-7FA83884E8DE").ToByteArray(); 94 | var IID_ICLRMetaHost = new Guid("D332DB9E-B9B3-4125-8207-A14884F53216").ToByteArray(); 95 | var IID_ICLRRuntimeInfo = new Guid("BD39D1D2-BA2F-486A-89B0-B4B0CB466891").ToByteArray(); 96 | var CLSID_CorRuntimeHost = new Guid("CB2F6723-AB3A-11D2-9C40-00C04FA30A3E").ToByteArray(); 97 | var IID_ICorRuntimeHost = new Guid("CB2F6722-AB3A-11D2-9C40-00C04FA30A3E").ToByteArray(); 98 | var _AppDomain = new Guid("05F696DC-2B29-3663-AD8B-C4389CF2A713").ToByteArray(); 99 | var CLSID_CLRRuntimeHost = new Guid("90F1A06E-7712-4762-86B5-7A5EBA6BDB02").ToByteArray(); 100 | var IID_ICLRRuntimeHost = new Guid("90F1A06C-7712-4762-86B5-7A5EBA6BDB02").ToByteArray(); 101 | 102 | var targetProcess = Process.GetProcessesByName(procName)[0]; 103 | procHandle = OpenProcess(0x43a, false, targetProcess.Id); 104 | if (procHandle == IntPtr.Zero) throw new Exception("can't open target process. try run as admin"); 105 | baseAddress = GetBaseAddress(); 106 | if (!IsWow64Process(procHandle, out target32Bit)) target32Bit = IntPtr.Size == 4; 107 | RemoteLoadLibrary("mscoree.dll"); 108 | var ptrSize = target32Bit ? 4 : 8; 109 | 110 | var CLRCreateInstance = GetProcAddress("mscoree.dll", "CLRCreateInstance"); 111 | var safeArray = CreateSafeArray(exeBytes.ToList()); 112 | var metaHost = ExecFunc(CLRCreateInstance, CLSID_CLRMetaHost, IID_ICLRMetaHost, new Byte[0]); 113 | var runtime = ExecVTable(metaHost, 3 * ptrSize, Encoding.Unicode.GetBytes("v4.0.30319"), IID_ICLRRuntimeInfo, new Byte[0]); 114 | var runtimeHost = ExecVTable(runtime, 9 * ptrSize, CLSID_CorRuntimeHost, IID_ICorRuntimeHost, new Byte[0]); 115 | var started = ExecVTable(runtimeHost, 0xA * ptrSize); 116 | var domain = ExecVTable(runtimeHost, 0xD * ptrSize, new Byte[0]); 117 | var appDomain = ExecVTable(domain, 0, _AppDomain, new Byte[0]); 118 | var assembly = ExecVTable(appDomain, 0x2D * ptrSize, BitConverter.GetBytes((UInt64)safeArray), new Byte[0]); 119 | var method = ExecVTable(assembly, 0x10 * ptrSize, new Byte[0]); 120 | var variant = new Byte[0x18]; variant[0] = 1; 121 | var mainReturnVal = new Byte[0x18]; 122 | var methodResult = ExecVTable(method, 0x25 * ptrSize, variant, new Byte[8], new Byte[8], new Byte[8], new Byte[8], mainReturnVal); // todo fix parameters... x86 has more? 123 | var val = BitConverter.ToUInt64(mainReturnVal, 8); 124 | //var released = ExecVTable(method, 2 * ptrSize); // not sure how this works if the app is still running. 125 | //VirtualFreeEx(procHandle, safeArray - 0x10, 0, 0x8000); 126 | //var stopped = ExecVTable(runtimeHost, 0xB * ptrSize); // not sure how this works if the app is still running. 127 | } 128 | [DllImport("kernel32")] static extern IntPtr GetCurrentProcess(); 129 | [DllImport("kernel32")] static extern IntPtr OpenProcess(Int32 dwDesiredAccess, Boolean bInheritHandle, Int32 dwProcessId); 130 | [DllImport("kernel32")] static extern IntPtr GetModuleHandle(String lpModuleName); 131 | //[DllImport("kernel32")] static extern IntPtr GetProcAddress(IntPtr hModule, String procName); 132 | [DllImport("kernel32")] static extern Boolean FlushInstructionCache(IntPtr hProcess, IntPtr lpBaseAddress, UIntPtr dwSize); 133 | [DllImport("kernel32")] public static extern Boolean VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, UInt32 flNewProtect, out UInt32 lpflOldProtect); 134 | [DllImport("kernel32")] static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, Int32 dwSize, UInt32 flAllocationType, UInt32 flProtect); 135 | [DllImport("kernel32")] static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] Byte[] buffer, Int32 size, out Int32 lpNumberOfBytesRead); 136 | [DllImport("kernel32")] static extern Boolean WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, Byte[] lpBuffer, Int32 nSize, out Int32 lpNumberOfBytesWritten); 137 | [DllImport("kernel32")] static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, UInt32 dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, UInt32 dwCreationFlags, IntPtr lpThreadId); 138 | [DllImport("kernel32")] static extern UInt32 WaitForSingleObject(IntPtr hHandle, UInt32 dwMilliseconds); 139 | [DllImport("kernel32")] static extern Int32 CloseHandle(IntPtr hObject); 140 | [DllImport("kernel32")] static extern Boolean VirtualProtectEx(IntPtr hProcess, IntPtr lpAddress, Int32 dwSize, UInt32 flNewProtect, out UInt32 lpflOldProtect); 141 | [DllImport("kernel32")] static extern Boolean VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress, Int32 dwSize, Int32 dwFreeType); 142 | [DllImport("kernel32")] static extern Boolean IsWow64Process(IntPtr processHandle, out Boolean wow64Process); 143 | [DllImport("psapi")] static extern bool GetModuleInformation(IntPtr hProcess, IntPtr hModule, out MODULEINFO lpmodinfo, UInt32 cb); 144 | [DllImport("psapi")] static extern bool EnumProcessModulesEx(IntPtr hProcess, IntPtr[] lphModule, UInt32 cb, out UInt32 lpcbNeeded, UInt32 dwFilterFlag); 145 | [DllImport("psapi")] static extern uint GetModuleFileNameEx(IntPtr hProcess, IntPtr hModule, [Out] StringBuilder lpBaseName, UInt32 nSize); 146 | [DllImport("kernel32")] public static extern IntPtr GetStdHandle(Int32 nStdHandle); 147 | [DllImport("kernel32")] public static extern int AllocConsole(); 148 | [DllImport("kernel32")] public static extern int FreeConsole(); 149 | [StructLayout(LayoutKind.Sequential)] 150 | public struct MODULEINFO 151 | { 152 | public IntPtr lpBaseOfDll; 153 | public UInt32 SizeOfImage; 154 | public IntPtr EntryPoint; 155 | } 156 | public static IntPtr CreateSafeArray(List bytes) 157 | { 158 | var safeArray = VirtualAllocEx(procHandle, IntPtr.Zero, bytes.Count + 0x30, 0x1000, 4); 159 | var safeArrayBytes = new List(); 160 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0)); // ?? 161 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0)); // ?? 162 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0)); // ?? 163 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0x11)); // arrayType... weird 164 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt16)1)); // cDims 165 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt16)0x80)); // fFeatures 166 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)1)); // cbElements 167 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0)); // cLocks 168 | if (!target32Bit) safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0)); // ??? 169 | safeArrayBytes.AddRange(target32Bit ? BitConverter.GetBytes((Int32)safeArray + 0x28) : BitConverter.GetBytes((UInt64)safeArray + 0x30)); // pvData 170 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)bytes.Count)); // rgsabound numElements 171 | safeArrayBytes.AddRange(BitConverter.GetBytes((UInt32)0)); // rgsabound min 172 | safeArrayBytes.AddRange(bytes); 173 | WriteProcessMemory(procHandle, safeArray, safeArrayBytes.ToArray(), safeArrayBytes.Count, out _); 174 | return safeArray + 0x10; 175 | } 176 | public static IntPtr ExecVTable(IntPtr obj, Int32 offset, params Byte[][] args) 177 | { 178 | var methodAddr = ReadIntPtr(ReadIntPtr(obj) + offset); 179 | args = args.Prepend(BitConverter.GetBytes((UInt64)obj)).ToArray(); 180 | return ExecFunc(methodAddr, args); 181 | } 182 | public static IntPtr ExecFunc(IntPtr funcAddr, params Byte[][] args) 183 | { 184 | var newArgs = new List(); 185 | foreach (var arg in args) 186 | { 187 | if (arg.Length == 8) newArgs.Add((IntPtr)(target32Bit ? BitConverter.ToInt32(arg, 0) : BitConverter.ToInt64(arg, 0))); // todo fix hack for direct args 188 | else 189 | { 190 | var argLength = arg.Length == 0 ? 0x8 : arg.Length; 191 | var argVal = arg; 192 | if (arg.Length == 0) 193 | { 194 | argLength = target32Bit ? 4 : 8; 195 | argVal = new byte[argLength]; 196 | } 197 | var temp = VirtualAllocEx(procHandle, IntPtr.Zero, argLength, 0x3000, 0x40); 198 | WriteProcessMemory(procHandle, temp, argVal, argLength, out _); 199 | newArgs.Add(temp); 200 | } 201 | } 202 | var retVal = ExecFunc(funcAddr, newArgs.ToArray()); 203 | for (var i = 0; i < args.Length; i++) 204 | { 205 | var arg = args[i]; 206 | var argLength = arg.Length == 0 ? (target32Bit ? 4 : 8) : arg.Length; 207 | var buf = new Byte[argLength]; 208 | if (args[i].Length == 8u) { } 209 | else 210 | { 211 | ReadProcessMemory(procHandle, newArgs[i], buf, buf.Length, out _); 212 | if (args[i].Length != argLength) Array.Resize(ref args[i], argLength); 213 | Array.Copy(buf, args[i], argLength); 214 | VirtualFreeEx(procHandle, newArgs[i], 0, 0x8000); 215 | } 216 | } 217 | if (retVal == IntPtr.Zero && args.ToList().Last().Length == (target32Bit ? 4u : 8u)) return (IntPtr)(target32Bit ? BitConverter.ToInt32(args.ToList().Last(), 0) : BitConverter.ToInt64(args.ToList().Last(), 0)); // todo fix hack for arg refs 218 | else return retVal; 219 | } 220 | public static IntPtr ExecFunc(IntPtr funcAddr, params IntPtr[] args) 221 | { 222 | var asm = new List(); 223 | var retVal = VirtualAllocEx(procHandle, IntPtr.Zero, 8, 0x3000, 4); 224 | WriteProcessMemory(procHandle, retVal, BitConverter.GetBytes(0xdeadbeefcafef00d), 8, out _); 225 | if (target32Bit) 226 | { 227 | for (var i = args.Length - 1; i >= 0; i--) 228 | { 229 | asm.Add(0x68); // push 230 | asm.AddRange(BitConverter.GetBytes((UInt32)args[i])); 231 | } 232 | asm.Add(0xB8); // mov eax 233 | asm.AddRange(BitConverter.GetBytes((UInt32)funcAddr)); 234 | asm.AddRange(new Byte[] { 0xFF, 0xD0 }); // call eax 235 | // todo fix this? 236 | //asm.AddRange(new Byte[] { 0x83, 0xC4 }); // add esp 237 | //asm.Add((Byte)(args.Length * 4)); 238 | asm.Add(0xA3); // mov eax to 239 | asm.AddRange(BitConverter.GetBytes((UInt32)retVal)); 240 | } 241 | else 242 | { 243 | asm.AddRange(new Byte[] { 0x48, 0x83, 0xEC, 0x38 }); // sub rsp 0x38 244 | for (var i = 0; i < args.Length && i < 4; i++) 245 | { 246 | if (i == 0) asm.AddRange(new Byte[] { 0x48, 0xB9 }); // mov rcx 247 | if (i == 1) asm.AddRange(new Byte[] { 0x48, 0xBA }); // mov rdx 248 | if (i == 2) asm.AddRange(new Byte[] { 0x49, 0xB8 }); // mov r8 249 | if (i == 3) asm.AddRange(new Byte[] { 0x49, 0xB9 }); // mov r9 250 | asm.AddRange(BitConverter.GetBytes((UInt64)args[i])); 251 | } 252 | for (var i = 4; i < args.Length; i++) // broke need to fix 253 | { 254 | /*asm.Add(0x68); 255 | asm.AddRange(BitConverter.GetBytes((UInt32)(UInt64)args[i])); 256 | asm.Add(0x68); 257 | asm.AddRange(BitConverter.GetBytes(((UInt64)args[i]) >> 32));*/ 258 | } 259 | asm.AddRange(new Byte[] { 0x48, 0xB8 }); // mov rax 260 | asm.AddRange(BitConverter.GetBytes((UInt64)funcAddr)); 261 | 262 | asm.AddRange(new Byte[] { 0xFF, 0xD0 }); // call rax 263 | asm.AddRange(new Byte[] { 0x48, 0x83, 0xC4, 0x38 }); // add rsp 0x38 264 | 265 | asm.AddRange(new Byte[] { 0x48, 0xA3 }); // mov rax to retval 266 | asm.AddRange(BitConverter.GetBytes((UInt64)retVal)); 267 | } 268 | asm.AddRange(Enumerable.Range(0, 0x20).Select(a => (byte)0x90)); 269 | asm.Add(0xC3); // ret 270 | var codePtr = VirtualAllocEx(procHandle, IntPtr.Zero, asm.Count, 0x3000, 0x40); 271 | WriteProcessMemory(procHandle, codePtr, asm.ToArray(), asm.Count, out _); 272 | var qq = BitConverter.ToString(asm.ToArray()).Replace("-", " "); 273 | var thread = CreateRemoteThread(procHandle, IntPtr.Zero, 0, codePtr, IntPtr.Zero, 0, IntPtr.Zero); 274 | WaitForSingleObject(thread, 10000); 275 | var buf = new Byte[target32Bit ? 4u : 8u]; 276 | ReadProcessMemory(procHandle, retVal, buf, buf.Length, out _); 277 | VirtualFreeEx(procHandle, retVal, 0, 0x8000); 278 | VirtualFreeEx(procHandle, codePtr, 0, 0x8000); 279 | CloseHandle(thread); 280 | return (IntPtr)(target32Bit ? BitConverter.ToInt32(buf, 0) : BitConverter.ToInt64(buf, 0)); 281 | } 282 | public static IntPtr ReadIntPtr(IntPtr addr) 283 | { 284 | var buf = new Byte[8]; 285 | ReadProcessMemory(procHandle, addr, buf, buf.Length, out _); 286 | return (IntPtr)(target32Bit ? BitConverter.ToInt32(buf, 0) : BitConverter.ToInt64(buf, 0)); 287 | } 288 | public static Int32 ReadInt32(IntPtr addr) 289 | { 290 | var temp = new Byte[4]; 291 | ReadProcessMemory(procHandle, addr, temp, temp.Length, out _); 292 | return BitConverter.ToInt32(temp, 0); 293 | } 294 | public static IntPtr LoadLibraryA = IntPtr.Zero; 295 | public static void RemoteLoadLibrary(String dllName) 296 | { 297 | if (LoadLibraryA == IntPtr.Zero) LoadLibraryA = GetProcAddress("kernel32.dll", "LoadLibraryA"); 298 | var allocMemAddress = VirtualAllocEx(procHandle, IntPtr.Zero, ((dllName.Length + 1) * Marshal.SizeOf(typeof(char))), 0x3000, 4); 299 | WriteProcessMemory(procHandle, allocMemAddress, Encoding.Default.GetBytes(dllName), ((dllName.Length + 1) * Marshal.SizeOf(typeof(char))), out _); 300 | var thread = CreateRemoteThread(procHandle, IntPtr.Zero, 0, LoadLibraryA, allocMemAddress, 0, IntPtr.Zero); WaitForSingleObject(thread, 10000); 301 | VirtualFreeEx(procHandle, allocMemAddress, 0, 0x8000); 302 | } 303 | public static IntPtr GetBaseAddress() 304 | { 305 | var ptrs = new IntPtr[1]; 306 | EnumProcessModulesEx(procHandle, ptrs, target32Bit ? 4u : 8u, out _, 3); 307 | return ptrs[0]; 308 | } 309 | public static IntPtr GetProcAddress(String dll, String procName) 310 | { 311 | var ptrs = new IntPtr[0]; 312 | EnumProcessModulesEx(procHandle, ptrs, 0, out UInt32 bytesNeeded, 3); 313 | var size = target32Bit ? 4 : 8; 314 | var moduleCount = bytesNeeded / size; 315 | ptrs = new IntPtr[moduleCount]; 316 | EnumProcessModulesEx(procHandle, ptrs, bytesNeeded, out _, 3); 317 | for (var i = 0; i < moduleCount; i++) 318 | { 319 | var path = new StringBuilder(260); 320 | GetModuleFileNameEx(procHandle, ptrs[i], path, 260); 321 | 322 | if (path.ToString().ToLower().Contains(dll.ToLower())) 323 | { 324 | GetModuleInformation(procHandle, ptrs[i], out MODULEINFO info, (uint)(size * ptrs.Length)); 325 | var e_lfanew = ReadInt32(info.lpBaseOfDll + 0x3C); 326 | var ntHeaders = info.lpBaseOfDll + e_lfanew; 327 | var optionalHeader = ntHeaders + 0x18; 328 | var dataDirectory = optionalHeader + (target32Bit ? 0x60 : 0x70); 329 | var exportDirectory = info.lpBaseOfDll + ReadInt32(dataDirectory); 330 | var names = info.lpBaseOfDll + ReadInt32(exportDirectory + 0x20); 331 | var ordinals = info.lpBaseOfDll + ReadInt32(exportDirectory + 0x24); 332 | var functions = info.lpBaseOfDll + ReadInt32(exportDirectory + 0x1C); 333 | var numFuncs = ReadInt32(exportDirectory + 0x18); 334 | 335 | for (var j = 0; j < numFuncs; j++) 336 | { 337 | var offset = ReadInt32(names + j * 4); 338 | var buffer = new Byte[32]; 339 | ReadProcessMemory(procHandle, info.lpBaseOfDll + offset, buffer, 32, out _); 340 | var name = Encoding.UTF8.GetString(buffer); 341 | if (name.Contains("\0")) name = name.Substring(0, name.IndexOf("\0")); 342 | var ordinal = ReadInt32(ordinals + j * 2) & 0xFFFF; 343 | var address = info.lpBaseOfDll + ReadInt32(functions + ordinal * 4); 344 | if (name == procName) return address; 345 | } 346 | } 347 | } 348 | return IntPtr.Zero; 349 | } 350 | } 351 | } -------------------------------------------------------------------------------- /GunfireRebornMods/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using System; 3 | using System.Diagnostics; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Reflection; 8 | using System.Runtime.InteropServices; 9 | using UnhollowerBaseLib; 10 | using UnhollowerRuntimeLib; 11 | using UnityEngine; 12 | using Microsoft.Win32.SafeHandles; 13 | using Mono.Cecil; 14 | 15 | namespace GunfireRebornMods 16 | { 17 | static class Program 18 | { 19 | static unsafe void Main() 20 | { 21 | if (Process.GetCurrentProcess().ProcessName == typeof(Program).Namespace) 22 | { 23 | var dll = AssemblyDefinition.ReadAssembly(Assembly.GetEntryAssembly().Location); 24 | var rand = Guid.NewGuid().ToString().Replace("-", ""); 25 | dll.Name.Name += rand; 26 | dll.MainModule.Name += rand; 27 | dll.MainModule.Types.ToList().ForEach(t => t.Namespace += rand); 28 | var dllBytes = new Byte[0]; 29 | using (var newDll = new MemoryStream()) 30 | { 31 | dll.Write(newDll); 32 | dllBytes = newDll.ToArray(); 33 | } 34 | NativeNetSharp.Inject("Gunfire Reborn", dllBytes); 35 | } 36 | else 37 | { 38 | try 39 | { 40 | NativeNetSharp.AllocConsole(); 41 | var standardOutput = new StreamWriter(new FileStream(new SafeFileHandle(NativeNetSharp.GetStdHandle(-11), true), FileAccess.Write), Encoding.GetEncoding(437)) { AutoFlush = true }; 42 | Console.SetOut(standardOutput); 43 | LogSupport_TraceHandler("C# DLL loaded"); 44 | Setup(); 45 | } 46 | catch (Exception e) 47 | { 48 | LogSupport_TraceHandler(e.Message.ToString()); 49 | } 50 | } 51 | } 52 | 53 | public static GameObject BaseObject; 54 | public static void Setup() 55 | { 56 | IL2CPP.il2cpp_thread_attach(IL2CPP.il2cpp_domain_get()); 57 | AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; 58 | Console.WriteLine(Environment.Version); 59 | Console.WriteLine(Application.unityVersion); 60 | Console.WriteLine(Directory.GetCurrentDirectory()); 61 | UnhollowerBaseLib.Runtime.UnityVersionHandler.Initialize(2018, 4, 20); 62 | LogSupport.RemoveAllHandlers(); 63 | LogSupport.TraceHandler += LogSupport_TraceHandler; 64 | LogSupport.ErrorHandler += LogSupport_TraceHandler; 65 | LogSupport.InfoHandler += LogSupport_TraceHandler; 66 | LogSupport.WarningHandler += LogSupport_TraceHandler; 67 | 68 | ClassInjector.Detour = new DoHookDetour(); 69 | //ClassInjector.DoHook?.GetInvocationList().ToList().ForEach(d => ClassInjector.DoHook -= (Action)d); 70 | //ClassInjector.DoHook += JmpPatch; 71 | ClassInjector.RegisterTypeInIl2Cpp(); 72 | while (BaseObject = GameObject.Find("ModManager")) GameObject.DestroyImmediate(BaseObject); 73 | BaseObject = new GameObject("ModManager"); 74 | GameObject.DontDestroyOnLoad(BaseObject); 75 | var modMgr = BaseObject.AddComponent(); 76 | var types = Assembly.GetExecutingAssembly().GetTypes().ToList().Where(t => t.BaseType == typeof(ModBase) && !t.IsNested); 77 | foreach (var type in types) modMgr.Mods.Add((ModBase)Activator.CreateInstance(type)); 78 | } 79 | 80 | private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) 81 | { 82 | LogSupport.Info(e.ToString()); 83 | } 84 | unsafe class DoHookDetour : IManagedDetour 85 | { 86 | private static readonly List PinnedDelegates = new List(); 87 | public T Detour(IntPtr @from, T to) where T : Delegate 88 | { 89 | IntPtr* targetVarPointer = &from; 90 | PinnedDelegates.Add(to); 91 | JmpPatch((IntPtr)targetVarPointer, Marshal.GetFunctionPointerForDelegate(to)); 92 | return Marshal.GetDelegateForFunctionPointer(from); 93 | } 94 | } 95 | 96 | private static void LogSupport_TraceHandler(string obj) 97 | { 98 | File.AppendAllText(@"log.txt", obj + "\n"); 99 | Console.WriteLine(obj); 100 | } 101 | [DllImport("kernel32")] static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string lpFileName); 102 | [DllImport("kernel32")] static extern bool FlushInstructionCache(IntPtr hProcess, IntPtr lpBaseAddress, UIntPtr dwSize); 103 | [DllImport("kernel32")] static extern IntPtr GetCurrentProcess(); 104 | [DllImport("kernel32")] static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect); 105 | [DllImport("kernel32")] static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, Int32 dwSize, Int32 flAllocationType, Int32 flProtect); 106 | [DllImport("kernel32")] static extern IntPtr GetModuleHandle(string lpModuleName); 107 | public static void JmpPatch(IntPtr originalPtr, IntPtr replacement) 108 | { 109 | var origCodeLoc = Marshal.ReadIntPtr(originalPtr); 110 | var jmpToNew = new List(); 111 | jmpToNew.AddRange(new Byte[] { 0x49, 0xBB }); // mov r11, replacement 112 | jmpToNew.AddRange(BitConverter.GetBytes(replacement.ToInt64())); 113 | jmpToNew.AddRange(new Byte[] { 0x41, 0xFF, 0xE3 }); // jmp r11 114 | var origCode = new byte[0x12]; 115 | Marshal.Copy(origCodeLoc, origCode, 0, origCode.Length); 116 | var jmpToOrig = new List(); 117 | jmpToOrig.AddRange(origCode); 118 | jmpToOrig.AddRange(new Byte[] { 0x49, 0xBB }); // mov r11, replacement 119 | jmpToOrig.AddRange(BitConverter.GetBytes((origCodeLoc + origCode.Length).ToInt64())); 120 | jmpToOrig.AddRange(new Byte[] { 0x41, 0xFF, 0xE3 }); // jmp r11 121 | var newFuncLocation = VirtualAllocEx(GetCurrentProcess(), IntPtr.Zero, 0x100, 0x3000, 0x40); // Marshal.Alloc doesn't work here? 122 | Marshal.Copy(jmpToOrig.ToArray(), 0, newFuncLocation, jmpToOrig.ToArray().Length); 123 | 124 | VirtualProtect(origCodeLoc, (UIntPtr)jmpToNew.ToArray().Length, (UInt32)0x40, out UInt32 old); 125 | Marshal.Copy(jmpToNew.ToArray(), 0, origCodeLoc, jmpToNew.ToArray().Length); 126 | FlushInstructionCache(GetCurrentProcess(), origCodeLoc, (UIntPtr)jmpToNew.ToArray().Length); 127 | VirtualProtect(origCodeLoc, (UIntPtr)jmpToNew.ToArray().Length, old, out UInt32 _); 128 | 129 | Marshal.WriteIntPtr(originalPtr, newFuncLocation); 130 | } 131 | public static void JmpUnPatch(IntPtr originalPtr, IntPtr replacement) 132 | { 133 | // todo 134 | } 135 | unsafe public static void Hook(IntPtr original, IntPtr target) 136 | { 137 | IntPtr originalPtr = original; 138 | IntPtr* targetVarPointer = &originalPtr; 139 | JmpPatch((IntPtr)targetVarPointer, target); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /GunfireRebornMods/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GunfireRebornMods")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GunfireRebornMods")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("786e2464-e23c-4392-a81a-870456d7fd63")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GunfireRebornMods/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 shalzuth 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoGunfireReborn 2 | A tool that adds easy mode to Gunfire Reborn. 3 | 4 | This project shows how to inject Unity modules during runtime into il2cpp Unity games. 5 | 6 | ## Features 7 | - AutoAim - adds the auto-aim functionality from controller usage when playing with keyboard & mouse 8 | - ExtraSensoryPerception - shows where portals, chests, vendors, and enemies are located (through walls) 9 | - FreeCam - not functional yet. Goal is to add a free camera to wander the world. 10 | - GameSpeed - speeds up the game 11 | - JumpHeight - changes the jump height of your character, making all puzzles trivial. 12 | - MovementSpeed - lets you run as fast as the Flash. 13 | - UnlimitedAmmo - no need to reload or find ammo anymore. 14 | - UnlockAll - not functional yet. Goal is to unlock all weapons/scrolls/etc., but this is server-sided for the most part. 15 | - WeaponMod - not functional. Currently only adds map-wide AOE range to explosive weapons. 16 | 17 | ## Todo / current issues 18 | - Occasionally crashes on injection 19 | - Deployment / packaging requries lots of DLL's, would be nice to have a single exe. Fody doesn't work as is. 20 | - Dumper needs to be manually run on game update 21 | - Most of the logic of Gunfire Reborn is done outside of Unity in a native dll / python. 22 | - App that does the injection is just a simple winform - need to clean this up. 23 | 24 | ## Credits 25 | https://github.com/Perfare/Il2CppDumper - dumps out dummy DLLs from Unity il2cpp game 26 | 27 | https://github.com/knah/Il2CppAssemblyUnhollower - converts dummy DLLs from Il2CppDumper into native calls. knah also helped me debug along the way 28 | 29 | https://github.com/warbler/SharpMonoInjector - calls mono functions after mono is loaded 30 | 31 | 32 | https://github.com/HerpDerpinstine/MelonLoader - not used in this project directly, but I leveraged the workflow to inject mono into the target app --------------------------------------------------------------------------------