@@ -4,7 +4,7 @@ use crate::pattern_mask::PatternMask;
44use crate :: triggerbot_hook:: setup_trigger_bot;
55use crate :: utils:: find_pattern;
66use crate :: vars:: mem_patches:: {
7- MAPHACK_MEMORY_PATCH , NO_RECOIL_MEMORY_PATCH , RAPID_FIRE_MEMORY_PATCH ,
7+ MAPHACK_MEMORY_PATCH , NO_RECOIL_MEMORY_PATCH , RADAR_MEMORY_PATCH , RAPID_FIRE_MEMORY_PATCH ,
88} ;
99use crate :: wallhack_hook:: setup_wallhack;
1010use std:: ffi:: c_void;
@@ -71,7 +71,7 @@ pub unsafe fn init_mem_patches() {
7171 }
7272 } ) ;
7373 thread:: spawn ( || {
74- let pattern_mask = PatternMask :: aob_to_pattern_mask ( "75 57 85 C9 ? ? ? ? ? ? 83 F9 04 " ) ;
74+ let pattern_mask = PatternMask :: aob_to_pattern_mask ( "0F 8D ? ? ? ? 85 C9 74 64 " ) ;
7575
7676 println ! ( "[MapHack] {:#x}" , & pattern_mask) ;
7777
@@ -89,9 +89,40 @@ pub unsafe fn init_mem_patches() {
8989 println ! ( "[esp] maphack pattern not found" ) ;
9090 }
9191 unsafe {
92- MAPHACK_MEMORY_PATCH =
93- MemoryPatch :: new ( & [ 0x90 , 0x90 ] , 0x02 , map_res as * mut c_void , 2usize )
94- . expect ( "Failed to patch map" ) ;
92+ MAPHACK_MEMORY_PATCH = MemoryPatch :: new (
93+ & [ 0xE9 , 0xCD , 0x00 , 0x00 , 0x00 , 0x90 ] ,
94+ 0x06 ,
95+ map_res as * mut c_void ,
96+ 6usize ,
97+ )
98+ . expect ( "Failed to patch map" ) ;
99+ }
100+
101+ let pattern_mask2 = PatternMask :: aob_to_pattern_mask ( "0F 8D ? ? ? ? 85 C9 74 68" ) ;
102+
103+ println ! ( "[RadarHack] {:#x}" , & pattern_mask2) ;
104+
105+ let radarhack_aob = find_pattern (
106+ "ac_client.exe" ,
107+ & * pattern_mask2. aob_pattern ,
108+ & pattern_mask2. mask_to_string ( ) ,
109+ ) ;
110+
111+ let mut radar_res: usize = 0 ;
112+ if radarhack_aob. is_some ( ) {
113+ radar_res = radarhack_aob. unwrap ( ) ;
114+ println ! ( "[esp] radarhack pattern found at: {:#x}" , radar_res) ;
115+ } else {
116+ println ! ( "[esp] radarhack pattern not found" ) ;
117+ }
118+ unsafe {
119+ RADAR_MEMORY_PATCH = MemoryPatch :: new (
120+ & [ 0xE9 , 0xD6 , 0x00 , 0x00 , 0x00 , 0x90 ] ,
121+ 0x06 ,
122+ radar_res as * mut c_void ,
123+ 6usize ,
124+ )
125+ . expect ( "Failed to patch radar" ) ;
95126 }
96127 } ) ;
97128 setup_trigger_bot ( ) ;
0 commit comments