// Generated by DllShimmer (github.com/Print3M/DllShimmer) // // Author: Print3M (print3m.github.io/) {{- $r := . }} #include "dllshimmer.h" #include #include {{- 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; }