Skip to content

Commit c849ce3

Browse files
committed
feat: 为代码段 patch 补充 AOB 特征码,减少硬编码依赖
1 parent 37a03d0 commit c849ce3

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/patches/audio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub fn apply(api: &Api, config: &Config) {
2222
&PatchDef {
2323
name: "强制双声道输出",
2424
section: "Force2chAudio",
25-
pattern: Some("75 3F"),
26-
pattern_offset: 0,
25+
pattern: Some("83 C4 04 85 C0 75 3F 68 ?? ?? ?? ?? E8 ?? ?? ?? ?? B8 02 00 00 00"),
26+
pattern_offset: 5,
2727
known_offsets: &[0xE2944B],
2828
expected: &[0x75, 0x3F],
2929
patch: &[0x90, 0x90],

src/patches/bypass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub fn apply(api: &Api, config: &Config) {
2121
&PatchDef {
2222
name: "绕过 AppUser 检测",
2323
section: "BypassAppUser",
24-
pattern: None,
25-
pattern_offset: 0,
24+
pattern: Some("83 7C 24 04 00 75"),
25+
pattern_offset: 5,
2626
known_offsets: &[0x89075],
2727
expected: &[0x75],
2828
patch: &[0xEB],

src/patches/free_play.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub fn apply(api: &Api, config: &Config) {
99
&PatchDef {
1010
name: "免费游玩",
1111
section: "FreePlay",
12-
pattern: Some("3C 01"),
13-
pattern_offset: 0,
12+
pattern: Some("E8 ?? ?? ?? ?? 3C 01 75 ?? 6A 09"),
13+
pattern_offset: 5,
1414
known_offsets: &[0x3DF4E4],
1515
expected: &[0x3C, 0x01],
1616
patch: &[0x38, 0xC0],

src/patches/skip_startup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub fn apply(api: &Api, config: &Config) {
99
&PatchDef {
1010
name: "跳过启动画面",
1111
section: "SkipStartup",
12-
pattern: None,
13-
pattern_offset: 0,
12+
pattern: Some("6A 07 8B CF E8 ?? ?? ?? ?? 6A 01 E8 ?? ?? ?? ?? 8B 35"),
13+
pattern_offset: 9,
1414
known_offsets: &[0x99B21A],
1515
expected: &[0x6A, 0x01],
1616
patch: &[0x6A, 0x04],

src/patches/timers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub fn apply(api: &Api, config: &Config) {
1010
&PatchDef {
1111
name: "禁用选歌计时器",
1212
section: "DisableTimer",
13-
pattern: Some("32 C0"),
13+
pattern: Some("32 C0 C3"),
1414
pattern_offset: 0,
1515
known_offsets: &[0x3D4110],
1616
expected: &[0x32, 0xC0],

src/patches/unlock_tracks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ pub fn apply(api: &Api, config: &Config) {
1010
&PatchDef {
1111
name: "解锁曲数上限",
1212
section: "UnlockTracks",
13-
pattern: None,
14-
pattern_offset: 0,
13+
pattern: Some("B8 09 00 00 00 3B F0 5F 0F 47"),
14+
pattern_offset: 10,
1515
known_offsets: &[0x6F8B82],
1616
expected: &[0xF0],
1717
patch: &[0xC0],

0 commit comments

Comments
 (0)