| 52 | using FuncRtlGetVersion = NTSYSAPI NTSTATUS(*)(PRTL_OSVERSIONINFOW lpVersionInformation); |
| 53 | |
| 54 | NTSTATUS WINAPI FakeRtlGetVersion(PRTL_OSVERSIONINFOW lpVersionInformation) { |
| 55 | // The minimal version is 10.0.22000.120 VER_NT_WORKSTATION |
| 56 | LOGD(L"-FakeRtlGetVersion"); |
| 57 | DWORD size = lpVersionInformation->dwOSVersionInfoSize; |
| 58 | memcpy(lpVersionInformation, &gOsVersionInfo, size); |
| 59 | lpVersionInformation->dwOSVersionInfoSize = size; |
| 60 | if (gIsPatchVersionNumber) { |
| 61 | lpVersionInformation->dwBuildNumber = 22000; |
| 62 | } |
| 63 | if (gIsPatchProductType && size >= sizeof(OSVERSIONINFOEXW)) { |
| 64 | ((PRTL_OSVERSIONINFOEXW) lpVersionInformation)->wProductType = VER_NT_WORKSTATION; |
| 65 | } |
| 66 | return STATUS_SUCCESS; |
| 67 | } |
| 68 | |
| 69 | FARPROC WINAPI BadGetProcAddress(_In_ HMODULE hModule, _In_ LPCSTR lpProcName) { |
| 70 | FARPROC result; |
nothing calls this directly
no outgoing calls
no test coverage detected