Files
2025-08-26 12:51:18 +02:00

50 lines
994 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.OriginalName}}
extern "C" UINT64 {{$v.ProxyName}}(PARAMS) {
#ifdef DEBUG
dbgf("{{$v.OriginalName}} called");
#endif
{{ if $r.Mutex }}
if (MUTEX("Global\\{{$v.OriginalName}}__{{$i}}")) {
// Put your code here...
}
{{- else }}
// Put your code here...
{{- end }}
return PROXY_FUNCTION("{{$v.OriginalName}}");
}
{{- 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;
}