Advertisement
HEX0x29A

SweetScape 010 Editor Anti-Ban-Key Loader

Mar 23rd, 2014
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 KB | None | 0 0
  1. #pragma comment(linker,"/MERGE:.rdata=.text")
  2. #pragma comment(linker,"/MERGE:.data=.text")
  3. #pragma comment(linker,"/SECTION:.text,ERW,512")
  4. #pragma comment(linker,"/Od")
  5. #pragma comment(linker,"/NODEFAULTLIB")
  6. #pragma comment(linker,"/CLRUNMANAGEDCODECHECK:NO")
  7. #pragma comment(linker,"/MANIFEST:NO")
  8. #pragma comment(linker,"/MANIFESTUAC:NO")
  9. #pragma comment(linker,"/GS-")
  10. #pragma comment(linker,"/PDBPATH:NONE")
  11. #pragma comment(linker,"/DYNAMICBASE:NO")
  12. #pragma comment(linker,"/ENTRY:WinMain")
  13. #include <windows.h>
  14.  
  15. int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow){
  16.     typedef int(__stdcall *PSHDeleteKeyA)(HKEY, LPCSTR);
  17.     PSHDeleteKeyA SHDeleteKeyA = (PSHDeleteKeyA)GetProcAddress(LoadLibraryA("shlwapi.dll"), "SHDeleteKeyA");
  18.     if (SHDeleteKeyA != NULL)
  19.         SHDeleteKeyA(HKEY_CURRENT_USER, "Software\\SweetScape\\010 Editor\\CLASSES");
  20.     LPSTR cl =  GetCommandLineA();
  21.     HGLOBAL prog = GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE, lstrlenA(cl) + MAX_PATH);
  22.     if (!prog)
  23.         ExitProcess(0);
  24.     lstrcpyA((LPSTR)prog, "010EditorOrig.exe \0");
  25.     char srh = ' ';
  26.     int i, len = lstrlenA(cl);
  27.     if (cl[0] == '"'){
  28.         srh = '"';
  29.     }
  30.     for (i = 1; i < len; i++){
  31.         if ((cl[i] == srh) || (cl[i] == '\0')){
  32.             break;
  33.         }
  34.     }
  35.     lstrcatA((LPSTR)prog, (LPCSTR)&cl[i + 1]);
  36.     WinExec((LPCSTR)prog, SW_SHOWNORMAL);
  37.     GlobalFree(prog);
  38.     ExitProcess(0);
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement