Skip to content

Repository files navigation

Memory.Manipulation NuGet

Library for memory manipulating, get regions, set rights, use pattern scan, calculate offsets, validate pointers and etc

Get regions

Mem.GetAllRegions()// All regions, even free
Mem.GetRegions(mbi => ...)// Regions adopting the condition in the argumentsMem.GetAccesibleRegions()// Commited regions without Guard that has access flags
Mem.GetCommitedRegions()// All Commited regions
Mem.GetReadableRegions()// Regions available for reading
Mem.GetWriteableRegions()// Regions available for writing

Create pattern for signature scan

Mem.CreatePattern("0 2F 90 ?")// 00 2F 90 ??
Mem.CreatePattern("0 0x2F 90 ?????")// 00 2F 90 ??
Mem.CreatePattern("00 2F 90 .")// 00 2F 90 ??
Mem.CreatePattern(2d)// 40 00 00 00 00 00 00 00// So work for all primitive types
Mem.CreatePattern([0,0x2F,0x90,null])// 00 2F 90 ??

Signature scan

varregions= ...;varpattern= ...;varfound=Mem.Scan(pattern,regions);

Pointer validating

varpointer= ...;varisValid=Mem.IsValid(pointer);// Checks if the pointer is inside the commited region

Calculate offsets

varpointer= ...;varshifted=Mem.CalcOffsets(pointer,0,8,0x90,0);/* Alternative for: var shifted = *(nint*)(*(nint*)(*(nint*)(*(nint*)(pointer + 0) + 8) + 0x90) + 0);*/

Used Libraries

DotnetNativeBaseNuGet
Yotic.Memory.ExtensionsNuGet

Versions

Start ordinalFrameworkDescriptionDate
1.0.0.net8.0PublishedApr 29, 2024
.net8.0Changed frameworkApr 26, 2024
.net7.0Sep 28, 2023

About

Library for memory manipulating, get and alloc regions, set rights

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages