Post by shirx0 on Dec 30, 2018 16:42:25 GMT -8
If you are using Windows 7 or 10, it comes with PowerShell.
We can use this to patch the executable.
Such that is does not require the disc.
We must, replace 5 bytes at 2 offsets.
In the CMD Script, there are 2 variables, "File_Path" and "Offset_Addresses"
"File_Path" is the path to frogger.exe, and "Offset_Addresses" are the 2 offsets, which to start at to replace 5 bytes.
The replacement bytes are the same for all versions of frogger.exe, the offsets and bytes to replace are different.
I only have the offsets to 1 version of frogger.exe (Version - V3.0e)
If you have a different version post the exe here and I will find and add the offsets to, known offsets list.
We can use this to patch the executable.
Such that is does not require the disc.
We must, replace 5 bytes at 2 offsets.
In the CMD Script, there are 2 variables, "File_Path" and "Offset_Addresses"
"File_Path" is the path to frogger.exe, and "Offset_Addresses" are the 2 offsets, which to start at to replace 5 bytes.
The replacement bytes are the same for all versions of frogger.exe, the offsets and bytes to replace are different.
I only have the offsets to 1 version of frogger.exe (Version - V3.0e)
If you have a different version post the exe here and I will find and add the offsets to, known offsets list.
CMD Script
@ECHO OFF
REM Change To Current Directory Of CMD Script
CD /D "%~dp0"
SET File_Path='%SystemDrive%\Program Files\Hasbro Interactive\Frogger\frogger.exe'
SET Offset_Addresses=0x000225F1,0x0002F5DC
REM Change ExecutionPolicy And Run Script
PowerShell.exe -ExecutionPolicy Bypass -Command ".\Powershell_No_CD_Patch.ps1" -Path "%File_Path%" -Offsets "%Offset_Addresses%"
PAUSE
PowerShell Script
Param ([String]$Path, [Array]$Offsets)
$Bytes = [System.IO.File]::ReadAllBytes("$Path")
[Byte[]]$Byte_Array = @(0xB8, 0x01, 0x00, 0x00, 0x00)
Function No_CD()
{
For ($i = 0; $i -lt $Offsets.Length; $i++)
{
ForEach ($Element In $Byte_Array) {$Bytes[$Offsets[$i]++] = $Element}
}
}
No_CD($Null)
[System.IO.File]::WriteAllBytes("$Path", $Bytes)
Known Offsets
Credit To OP
frogger.exe V1.001
--------------------------------------------
Search For: E8 BA 07 00 00 @Offset:
Change To: B8 01 00 00 00
Offset:
Search For: E8 2A D0 FF FF @Offset:
Change To: B8 01 00 00 00
--------------------------------------------
frogger.exe V1.1e
--------------------------------------------
Search For: E8 BA 07 00 00 @Offset:
Change To: B8 01 00 00 00
Search For: E8 4A CF FF FF @Offset:
Change To: B8 01 00 00 00
--------------------------------------------
frogger.exe V3.0e
---------------------------------------------
Search For: E8 1A 08 00 00 @Offset: 0x000225F1
Change To: B8 01 00 00 00
Search For: E8 2F 38 FF FF @Offset: 0x0002F5DC
Change To: B8 01 00 00 00
--------------------------------------------
frogger.exe V3.0u
--------------------------------------------
Search For: E8 1A 08 00 00 @Offset:
Change To: B8 01 00 00 00
Search For: E8 3F CF FF FF @Offset:
Change To: B8 01 00 00 00
--------------------------------------------