Skip to content

Commit 0b0c681

Browse files
authored
Update darwin patcher for 3.270.1 (Steam) (#714)
## Scope I've created a new patch_definitions with offsets and patches for a newer version of the game ## Test Plan Run the patcher and start the game, check that requests go through ## Checklist <!-- Once you create the PR, the checklist will be added below this comment automatically (based on what files you've changed). It's just a few reminders to make sure everything is perfect. You can place an "X" in the boxes to tick them off. When you have completed the checklist, press the "Ready for review" button. --> -------- #### General - [x] I've run Prettier to format any changed files - [x] I've verified that my changes work, and included a test plan
2 parents ee3b894 + 6c5e56f commit 0b0c681

4 files changed

Lines changed: 69 additions & 0 deletions

File tree

patcher-darwin/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ add_executable(PeacockPatcher
1414
src/patcher.cpp
1515
src/patches.cpp
1616
src/patch_definitions/v3_260_1.cpp
17+
src/patch_definitions/v3_270_1.cpp
1718
src/version.cpp
1819
)
1920

patcher-darwin/src/patch_definitions/definitions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44

55
namespace peacock::patch_definitions {
66
void add_v3_260_1(PatchRegistry &registry);
7+
void add_v3_270_1(PatchRegistry &registry);
78
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#include "definitions.h"
2+
3+
namespace peacock::patch_definitions {
4+
// UUID: 133CC413-E97A-35A3-A36E-392A5238D15B
5+
static const HitmanVersion v3_270_1_macos_arm64_steam = {
6+
.name = "3.270.1 macOS ARM64 (Steam)",
7+
8+
// Patch tbnz → unconditional branch in mbedtls_ssl_parse_certificate.
9+
// Makes cert verification results always non-fatal.
10+
.certpin = {
11+
Patch(0x19C18C8,
12+
{0x68, 0x01, 0x00, 0x37}, // tbnz w8, #0, +0x2C
13+
{0x0B, 0x00, 0x00, 0x14}, // b +0x2C (unconditional)
14+
VM_PROT_READ | VM_PROT_EXECUTE),
15+
},
16+
17+
// NOP both conditional branches that skip Authorization header injection.
18+
.authheader = {
19+
Patch(0xFF086C,
20+
{0x60, 0x05, 0x00, 0x34}, // cbz w0, +0xAC
21+
{0x1F, 0x20, 0x03, 0xD5}, // NOP
22+
VM_PROT_READ | VM_PROT_EXECUTE),
23+
Patch(0xFF0880,
24+
{0xC1, 0x04, 0x00, 0x54}, // b.ne +0x98
25+
{0x1F, 0x20, 0x03, 0xD5}, // NOP
26+
VM_PROT_READ | VM_PROT_EXECUTE),
27+
},
28+
29+
// Overwrite ZConfigString buffer for "config.hitman.io" with custom domain.
30+
.configdomain = {
31+
Patch(0x2DC7DB0,
32+
{},
33+
{},
34+
VM_PROT_READ | VM_PROT_WRITE,
35+
"configdomain"),
36+
},
37+
38+
// Patch "https://{0}" → "http://{0}a"
39+
.protocol = {
40+
Patch(0x1B9E014,
41+
str_bytes("https://{0}"),
42+
str_bytes("http://{0}a"),
43+
VM_PROT_READ),
44+
},
45+
46+
// Set "OnlineResources_ForceOfflineOnFailure" to 0.
47+
.dynres_noforceoffline = {
48+
Patch(0x2DC7D90,
49+
{0x00, 0x00, 0x00, 0x00},
50+
{0x00, 0x00, 0x00, 0x00},
51+
VM_PROT_READ | VM_PROT_WRITE),
52+
},
53+
54+
// Set "OnlineResources_Disable" to 0 (enable dynamic resources).
55+
.dynres_enable = {
56+
Patch(0x2DC7D70,
57+
{0x01, 0x00, 0x00, 0x00},
58+
{0x00, 0x00, 0x00, 0x00},
59+
VM_PROT_READ | VM_PROT_WRITE),
60+
},
61+
};
62+
63+
void add_v3_270_1(PatchRegistry &registry) {
64+
registry.add_version(0x9A46E97F, v3_270_1_macos_arm64_steam);
65+
}
66+
}

patcher-darwin/src/patches.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace peacock {
99

1010
PatchRegistry::PatchRegistry() {
1111
patch_definitions::add_v3_260_1(*this);
12+
patch_definitions::add_v3_270_1(*this);
1213
}
1314

1415
void PatchRegistry::add_version(uint32_t identifier, HitmanVersion version) {

0 commit comments

Comments
 (0)