From 939f506a25e3a60f049ce227ff37ba8ff16ab0eb Mon Sep 17 00:00:00 2001 From: vxunderground <57078196+vxunderground@users.noreply.github.com> Date: Thu, 14 Jul 2022 23:12:16 -0500 Subject: [PATCH] Create GetOSIdentificationData.cpp --- Windows API/GetOSIdentificationData.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Windows API/GetOSIdentificationData.cpp diff --git a/Windows API/GetOSIdentificationData.cpp b/Windows API/GetOSIdentificationData.cpp new file mode 100644 index 0000000..85b1f28 --- /dev/null +++ b/Windows API/GetOSIdentificationData.cpp @@ -0,0 +1,25 @@ +DWORD GetOSIdentificationData(DWORD Id) +{ + PPEB Peb = GetPeb(); + + switch (Id) + { + case 0: + return Peb->OSMajorVersion; + + case 1: + return Peb->OSMinorVersion; + + case 2: + return Peb->OSBuildNumber; + + case 3: + return Peb->OSPlatformId; + + default: + return 0; + + } + + return 0; +}