// Detect It Easy: detection rule file

// Author: DosX
// E-Mail: collab@kay-software.ru
// GitHub: https://github.com/DosX-dev
// Telegram: @DosX_dev

// https://www.nvidia.com/en-gb/geforce/technologies/dlss/
meta("library", "Nvidia DLSS");

function detect() {
    if (PE.isLibraryPresentExp(/^nvngx_dlss|\.dlss(\.|_)/i)) {
        bDetected = true;
    } else if (PE.isLibraryPresentExp(/^d3d/i) || PE.isLibraryPresentExp(/^physx/i)) {
        var rdataSection = PE.section[".rdata"];

        if (rdataSection && PE.isSignaturePresent(rdataSection.FileOffset, rdataSection.FileSize, "%% 'DLSS' %%")) {
            bDetected = true;
        }
    }

    return result();
}