Skip to content

ramhaidar/Win_1337_Apply_Patch_Powershell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Win_1337_Apply_Patch_Powershell

Description

This PowerShell script is designed to apply/patch 1337 files directly into a .dll or .exe file. It includes modifications to handle permission and ownership changes to ensure successful patching, as recommended by @VorlonCD in this issue comment.

Features

  • Apply patches to .dll or .exe files.
  • Handles permission and ownership changes to ensure successful patching.
  • Removes digital certificates from patched files.
  • Updates the checksum of patched files.
  • Provides detailed logging of the patching process.
  • Create backup files before patching.

Usage

Prerequisites

  • PowerShell 5.1 or higher.
  • Administrative privileges to run the script.
  • Patch files (Recommended to be in the same directory as the script) can be downloaded from nvidia-patch repository here based on your driver version.

Parameters

  • -patchFile: Path to the patch file (mandatory).
  • -targetFile: Path to the target .dll or .exe file (mandatory).
  • -fixOffset: Optional switch to adjust the offset during patching.

Example Commands

.\Win_1337_Apply.ps1 -patchFile "nvencodeapi64.1337" -targetFile "C:\Windows\System32\nvencodeapi64.dll" -fixOffset
.\Win_1337_Apply.ps1 -patchFile "nvencodeapi.1337" -targetFile "C:\Windows\SysWOW64\nvencodeapi.dll" -fixOffset

Detailed Process

  1. Permission and Ownership Change:

    • Changes the owner of the target file to "Administrators".
    • Grants "Administrators" full control permissions.
  2. Patch Application:

    • Validates the patch instructions.
    • Creates a backup of the original file.
    • Applies the patch instructions to the target file.
  3. Post-Patch Processing:

    • Removes the digital certificate from the patched file.
    • Updates the file checksum to ensure integrity.

Credits

This script is based on the work by Deltafox79 with additional modifications as per @VorlonCD's instructions.

About

PowerShell script to patch .dll or .exe files with 1337 files, handling permission changes, ownership adjustments, digital certificate removal, and checksum updates.

Resources

Stars

Watchers

Forks

Contributors