MCPcopy Create free account
hub / github.com/c2pain/RustPatchlessCLRLoader / get_arg

Function get_arg

src/main.rs:116–124  ·  view source on GitHub ↗
(ctx: &CONTEXT, index: i32)

Source from the content-addressed store, hash-verified

114}
115
116fn get_arg(ctx: &CONTEXT, index: i32) -> usize {
117 match index {
118 0 => ctx.Rcx as usize,
119 1 => ctx.Rdx as usize,
120 2 => ctx.R8 as usize,
121 3 => ctx.R9 as usize,
122 _ => unsafe { *((ctx.Rsp as *const u64).offset((index + 1) as isize) as *const usize) }
123 }
124}
125
126fn get_return_address(ctx: &CONTEXT) -> usize {
127 unsafe { *((ctx.Rsp as *const u64) as *const usize) }

Callers 1

exception_handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected