@@ -329,13 +329,6 @@ impl S2BinLib {
329329 ) )
330330 }
331331
332- fn find_pattern_string ( & self , binary_name : & str , string : & str ) -> Result < u64 > {
333- let bytes = string. as_bytes ( ) . to_vec ( ) ;
334- // bytes.push(0); // null terminato
335-
336- self . find_pattern_bytes ( binary_name, & bytes)
337- }
338-
339332 fn find_pattern_string_in_section (
340333 & self ,
341334 binary_name : & str ,
@@ -347,12 +340,6 @@ impl S2BinLib {
347340 self . find_pattern_bytes_in_section ( binary_name, section_name, & bytes)
348341 }
349342
350- fn find_pattern_bytes ( & self , binary_name : & str , pattern : & [ u8 ] ) -> Result < u64 > {
351- let binary_data = self . get_binary ( binary_name) ?;
352- let pattern_wildcard = vec ! [ ] ;
353- find_pattern_simd ( binary_data, pattern, & pattern_wildcard)
354- }
355-
356343 fn find_pattern_int32_in_section (
357344 & self ,
358345 binary_name : & str ,
@@ -396,7 +383,7 @@ impl S2BinLib {
396383
397384 fn find_pattern_va ( & self , binary_name : & str , pattern_string : & str ) -> Result < u64 > {
398385 let result = Cell :: new ( 0 ) ;
399- self . pattern_scan_all_va ( binary_name, pattern_string, |index , address| {
386+ self . pattern_scan_all_va ( binary_name, pattern_string, |_ , address| {
400387 result. set ( address) ;
401388 true
402389 } ) ?;
@@ -848,17 +835,6 @@ impl S2BinLib {
848835 Ok ( self . va_to_mem_address ( binary_name, result) ?)
849836 }
850837
851- /// Dump cross-references from all executable sections
852- ///
853- /// This function scans all executable sections in the binary, disassembles
854- /// the instructions using iced-x86, and extracts cross-references (xrefs).
855- /// The results are cached in the `xrefs_cache` HashMap.
856- ///
857- /// # Arguments
858- /// * `binary_name` - The name of the binary to analyze
859- ///
860- /// # Returns
861- /// Returns Ok(()) on success, or an error if the binary cannot be processed
862838 pub fn dump_xrefs ( & mut self , binary_name : & str ) -> Result < ( ) > {
863839 let binary_data = self . get_binary ( binary_name) ?;
864840 let object = object:: File :: parse ( binary_data) ?;
@@ -981,17 +957,6 @@ impl S2BinLib {
981957 Ok ( ( ) )
982958 }
983959
984- /// Get cached cross-references for a target virtual address
985- ///
986- /// Returns None if the binary hasn't been analyzed with `dump_xrefs` yet,
987- /// or if there are no references to the target address.
988- ///
989- /// # Arguments
990- /// * `binary_name` - The name of the binary
991- /// * `target_va` - The target virtual address to find references to
992- ///
993- /// # Returns
994- /// An optional reference to a vector of virtual addresses that reference the target
995960 pub fn find_xrefs_cached ( & self , binary_name : & str , target_va : u64 ) -> Option < & Vec < u64 > > {
996961 self . xrefs_cache
997962 . get ( binary_name)
@@ -1239,7 +1204,7 @@ impl S2BinLib {
12391204
12401205 let success = Cell :: new ( false ) ;
12411206
1242- if ( warmup < warmup_threshold) {
1207+ if warmup < warmup_threshold {
12431208 warmup += 1 ;
12441209 continue ;
12451210 }
0 commit comments