find_tzm 0.1.0

mem hack for find tzm code
Documentation
  • Coverage
  • 25%
    2 out of 8 items documented0 out of 3 items with examples
  • Size
  • Source code size: 29.79 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 753.77 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • emptyqwb/find_tzm
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • emptyqwb

find feature code

This repository contains scripts and instructions for building the Windows kernel using the Rust programming language.

Prerequisites

Build Instructions

  1. Clone this repository:
cargo add find_tzm <version>

Example

fn main() {
            let mut ret_list = Vec::<u64>::new();
        let mut buffer = vec![0u8; 0x1400fffff];
        buffer[24000000-1] = 0x7b;
        buffer[24000000] = 0x48;
        buffer[24000001] = 0x8b;
        buffer[24000002] = 0x31;
        buffer[24000003] = 0x1c;
        buffer[24000004] = 0x15;
        buffer[24000005] = 0x00;
        buffer[24000006] = 0x48;
        buffer[24000007] = 0x8b;

        buffer[34000000-1] = 0x7b;
        buffer[34000000] = 0x48;
        buffer[34000001] = 0x8b;
        buffer[34000002] = 0x31;
        buffer[34000003] = 0x1c;
        buffer[34000004] = 0x15;
        buffer[34000005] = 0x00;
        buffer[34000006] = 0x48;
        buffer[34000007] = 0x8b;
        // buffer[20] = 0x48;
        // buffer[21] = 0x8b;
        // buffer[22] = 0x31;
        // buffer[23] = 0x1c;
        // buffer[24] = 0x15;
        // buffer[25] = 0x00;
        // buffer[26] = 0x48;
        // buffer[27] = 0x8b;
        let search_start_addr = buffer.as_mut_ptr() as u64;
        let search_size =  84000000;
        let tzm = "?b 48 8b 3? ?c ?? ?? 48 8b ?? ?? ??";
        let offset_size = 0;
        let search_num = 2;
        sse2_pattern_find(&mut ret_list, search_start_addr, search_size, tzm, offset_size, search_num).unwrap();
        assert_eq!(ret_list,  [24000000-1, 34000000-1]);
}

MORE

see https://docs.rs/