mirror of
https://github.com/a0rtega/pafish
synced 2024-11-24 23:29:39 +03:00
Minor fix, minor function cleanup
This commit is contained in:
parent
d03750ae28
commit
7da8b35d13
@ -7,6 +7,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "gensandbox.h"
|
||||
#include "utils.h"
|
||||
|
||||
int gensandbox_mouse_act() {
|
||||
POINT position1, position2;
|
||||
@ -75,16 +76,14 @@ int gensandbox_common_names() {
|
||||
char* szSingleDrive = szLogicalDrives;
|
||||
while(*szSingleDrive)
|
||||
{
|
||||
snprintf(filename, MAX_PATH, "%ssample.exe",szSingleDrive);
|
||||
exists = pafish_exists_file(filename);
|
||||
if (exists)
|
||||
return TRUE;
|
||||
|
||||
snprintf(filename, MAX_PATH, "%smalware.exe",szSingleDrive);
|
||||
exists = pafish_exists_file(filename);
|
||||
if (exists)
|
||||
return TRUE;
|
||||
|
||||
if (GetDriveType(szSingleDrive) != DRIVE_REMOVABLE ) {
|
||||
snprintf(filename, MAX_PATH, "%ssample.exe",szSingleDrive);
|
||||
exists = pafish_exists_file(filename);
|
||||
if (exists) return TRUE;
|
||||
snprintf(filename, MAX_PATH, "%smalware.exe",szSingleDrive);
|
||||
exists = pafish_exists_file(filename);
|
||||
if (exists) return TRUE;
|
||||
}
|
||||
szSingleDrive += strlen(szSingleDrive) + 1;
|
||||
}
|
||||
}
|
||||
@ -133,10 +132,3 @@ int gensandbox_sleep_patched() {
|
||||
else return TRUE;
|
||||
}
|
||||
|
||||
int gensandbox_rdtsc() {
|
||||
uint64_t ret, ret2;
|
||||
asm volatile ( "rdtsc" : "=A"(ret) );
|
||||
asm volatile ( "rdtsc" : "=A"(ret2) );
|
||||
return (ret2 - ret) > 1000 ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,4 @@ int gensandbox_drive_size2();
|
||||
|
||||
int gensandbox_sleep_patched();
|
||||
|
||||
int gensandbox_rdtsc();
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user