Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma comment(linker,"/MERGE:.rdata=.text")
- #pragma comment(linker,"/MERGE:.data=.text")
- #pragma comment(linker,"/SECTION:.text,ERW,512")
- #pragma comment(linker,"/Od")
- #pragma comment(linker,"/NODEFAULTLIB")
- #pragma comment(linker,"/CLRUNMANAGEDCODECHECK:NO")
- #pragma comment(linker,"/MANIFEST:NO")
- #pragma comment(linker,"/MANIFESTUAC:NO")
- #pragma comment(linker,"/GS-")
- #pragma comment(linker,"/PDBPATH:NONE")
- #pragma comment(linker,"/DYNAMICBASE:NO")
- #pragma comment(linker,"/ENTRY:WinMain")
- #include <windows.h>
- int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow){
- typedef int(__stdcall *PSHDeleteKeyA)(HKEY, LPCSTR);
- PSHDeleteKeyA SHDeleteKeyA = (PSHDeleteKeyA)GetProcAddress(LoadLibraryA("shlwapi.dll"), "SHDeleteKeyA");
- if (SHDeleteKeyA != NULL)
- SHDeleteKeyA(HKEY_CURRENT_USER, "Software\\SweetScape\\010 Editor\\CLASSES");
- LPSTR cl = GetCommandLineA();
- HGLOBAL prog = GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE, lstrlenA(cl) + MAX_PATH);
- if (!prog)
- ExitProcess(0);
- lstrcpyA((LPSTR)prog, "010EditorOrig.exe \0");
- char srh = ' ';
- int i, len = lstrlenA(cl);
- if (cl[0] == '"'){
- srh = '"';
- }
- for (i = 1; i < len; i++){
- if ((cl[i] == srh) || (cl[i] == '\0')){
- break;
- }
- }
- lstrcatA((LPSTR)prog, (LPCSTR)&cl[i + 1]);
- WinExec((LPCSTR)prog, SW_SHOWNORMAL);
- GlobalFree(prog);
- ExitProcess(0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement