|
| 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 ®istry) { |
| 64 | + registry.add_version(0x9A46E97F, v3_270_1_macos_arm64_steam); |
| 65 | + } |
| 66 | +} |
0 commit comments