SkillAgentSearch skills...

MemoryModule

Load dll/exe from memory. Support .NET "AnyCPU" platform!

Install / Use

/learn @wwh1004/MemoryModule
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MemoryModule

Load dll/exe from memory. And it supports "AnyCPU" platform!

Original code MemoryModule by fancycode.

Examples

You can see the Test project for the examples.

LoadLibrary

byte[] data = xxxx;
MemoryModule memoryModule = MemoryModule.Create(data);

GetProcAddress/GetProcDelegate

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate size_t FastLzma2CompressProc(byte[] dst, size_t dstCapacity, byte[] src, size_t srcSize, int compressionLevel, uint nbThreads);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate size_t FastLzma2DecompressProc(byte[] dst, size_t dstCapacity, byte[] src, size_t compressedSize);
private static FastLzma2CompressProc FastLzma2Compress;
private static FastLzma2DecompressProc FastLzma2Decompress;

......

FastLzma2Compress = memoryModule.GetProcDelegate<FastLzma2CompressProc>("FL2_compressMt");
FastLzma2Decompress = memoryModule.GetProcDelegate<FastLzma2DecompressProc>("FL2_decompress");

Related Skills

View on GitHub
GitHub Stars63
CategoryCustomer
Updated22d ago
Forks22

Languages

C#

Security Score

95/100

Audited on Mar 5, 2026

No findings