Last active
April 23, 2016 19:37
for PhantasyStarOnline2(nProtect?)'s Issue.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
int main(void) | |
{ | |
HWND KTITL,NTITL=NULL; | |
DWORD i=0; | |
HANDLE h; | |
FILE *fp; | |
int j; | |
char a[256],b[24]; | |
SetConsoleTitle("NtfsDisableLastAccessUpdate-Enabler"); | |
Sleep(100); | |
KTITL=FindWindow(NULL,"NtfsDisableLastAccessUpdate-Enabler"); | |
ShowWindow(KTITL,i); | |
l1:Sleep(10000); | |
NTITL=FindWindow(NULL,"Phantasy Star Online 2"); | |
if(NTITL!=NULL) | |
{ | |
srand(time(NULL)); | |
sprintf(b,"%d%d.bat",rand(),rand()); | |
fp=fopen(b,"w"); | |
fprintf(fp,"@echo off\n"); | |
fprintf(fp,"set ValueName=NtfsDisableLastAccessUpdate\n"); | |
fprintf(fp,"for /f \"tokens=1,2*\" %%%%i in ( \'reg query \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"%%ValueName%%\"\' ) DO ( if \"%%%%i\"==\"%%ValueName%%\" ( set Value=%%%%k ))\n"); | |
fprintf(fp,"exit /b %%Value:~2,3%%"); | |
fclose(fp); | |
_fullpath(a,b,128); | |
l2:Sleep(10000); | |
j=system(a); | |
if(j==0) | |
{ | |
system("reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"NtfsDisableLastAccessUpdate\" /t REG_DWORD /d 1 /f > nul"); | |
remove(a); | |
l3:Sleep(10000); | |
if(FindWindow(NULL,"Phantasy Star Online 2")!=NULL) | |
{ | |
goto l3; | |
} | |
if(FindWindow(NULL,"Phantasy Star Online 2")==NULL) | |
{ | |
goto l1; | |
} | |
} | |
goto l2; | |
} | |
goto l1; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment