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