MCPcopy Create free account
hub / github.com/Kudaes/Dumpy / rtl_adjust_privilege

Function rtl_adjust_privilege

dumpy/dinvoke/src/lib.rs:697–711  ·  view source on GitHub ↗

Dynamically calls RtlAdjustPrivilege. It will return the NTSTATUS value returned by the call.

(privilege: u32, enable: u8, current_thread: u8, enabled: *mut u8)

Source from the content-addressed store, hash-verified

695///
696/// It will return the NTSTATUS value returned by the call.
697pub fn rtl_adjust_privilege(privilege: u32, enable: u8, current_thread: u8, enabled: *mut u8) -> i32 {
698
699 unsafe
700 {
701 let ret;
702 let func_ptr: data::RtlAdjustPrivilege;
703 let ntdll = get_module_base_address(&lc!("ntdll.dll"));
704 dynamic_invoke!(ntdll,&lc!("RtlAdjustPrivilege"),func_ptr,ret,privilege,enable,current_thread,enabled);
705
706 match ret {
707 Some(x) => return x,
708 None => return -1,
709 }
710 }
711}
712
713/// Dynamically calls NtQuerySystemInformation.
714///

Callers 1

dumpFunction · 0.85

Calls 1

get_module_base_addressFunction · 0.85

Tested by

no test coverage detected