-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import from msvcrt.dll to reduce false positives in anti-virus software
virustotal false positives before the change: smlrcc.exe 9/67 smlrpp.exe 11/67 smlrc.exe 22/68 smlrl.exe 18/66 n2f.exe 17/67 virustotal false positives after the change: smlrcc.exe 8/67 smlrpp.exe 5/67 smlrc.exe 20/68 smlrl.exe 14/67 n2f.exe 5/66
- Loading branch information
Showing
10 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
Copyright (c) 2021, Alexey Frunze | ||
2-clause BSD license. | ||
*/ | ||
#ifdef _WINDOWS | ||
|
||
#define DLL "msvcrt" | ||
#define FXN "abs" | ||
#include "../dimports.h" | ||
|
||
int __msvcrt_abs(int x) | ||
{ | ||
asm( | ||
"push dword [ebp+8]\n" | ||
"call dword [__imp__abs]\n" | ||
"add esp, 4" | ||
); | ||
} | ||
|
||
#endif // _WINDOWS |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright (c) 2021, Alexey Frunze | ||
2-clause BSD license. | ||
*/ | ||
#ifdef _WINDOWS | ||
|
||
asm( | ||
" section .dll_import0_msvcrt write align=4\n" | ||
" extern __start__dll_import2_msvcrt\n" | ||
" extern __start__dll_iat2_msvcrt\n" | ||
" dd __start__dll_import2_msvcrt, 0, 0, __msvcrt_dll__, __start__dll_iat2_msvcrt\n" | ||
|
||
// .dll_import2_msvcrt section follows. | ||
|
||
" section .dll_import2_msvcrt_trailer write align=4\n" | ||
" dd 0\n" | ||
|
||
// .dll_import3_msvcrt section follows. | ||
|
||
" section .dll_import4_msvcrt write align=1\n" | ||
" global __msvcrt_dll__\n" | ||
" __msvcrt_dll__:\n" // win32 functions will pull this file by this symbol | ||
" db \"msvcrt.dll\", 0\n" | ||
|
||
// .dll_iat2_msvcrt section follows. | ||
|
||
" section .dll_iat2_msvcrt_trailer write align=4\n" | ||
" dd 0\n" | ||
|
||
" section .data\n" | ||
" extern __dll_imports\n" | ||
" dd __dll_imports\n" // pull ../dimports.c | ||
); | ||
|
||
#endif // _WINDOWS |
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