mirror of
https://github.com/Print3M/DllShimmer
synced 2026-06-06 16:34:32 +00:00
50 lines
960 B
Plaintext
50 lines
960 B
Plaintext
// Generated by DllShimmer (github.com/Print3M/DllShimmer)
|
|
//
|
|
// Author: Print3M (print3m.github.io/)
|
|
|
|
{{- $r := . }}
|
|
#include "dllshimmer.h"
|
|
#include <windows.h>
|
|
#include <stdio.h>
|
|
|
|
{{- range $i, $v := .Functions }}
|
|
|
|
{{- if eq (len $v.Forwarder) 0 }}
|
|
|
|
// {{$v.Name}}
|
|
extern "C" UINT64 {{$v.Name}}Fwd(PARAMS) {
|
|
#ifdef DEBUG
|
|
dbgf("{{$v.Name}} called");
|
|
#endif
|
|
{{ if $r.Mutex }}
|
|
if (MUTEX("Global\\{{$v.Name}}__{{$i}}")) {
|
|
// Put your code here...
|
|
}
|
|
{{- else }}
|
|
// Put your code here...
|
|
{{- end }}
|
|
|
|
return PROXY_FUNCTION("{{$v.Name}}");
|
|
}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
|
|
|
|
switch (fdwReason) {
|
|
case DLL_PROCESS_ATTACH: {
|
|
#ifdef DEBUG
|
|
dbgf("DLL_PROCESS_ATTACH");
|
|
#endif
|
|
}
|
|
case DLL_THREAD_ATTACH:
|
|
case DLL_THREAD_DETACH:
|
|
case DLL_PROCESS_DETACH:
|
|
break;
|
|
}
|
|
|
|
return TRUE;
|
|
} |