// DIE's signature file
// Author: hypn0 <hypn0@mail.ru>

init("protector","PELock");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(PE.getNumberOfImports()==1)
    {
        if(PE.isLibraryFunctionPresent("KERNEL32.DLL", "LoadLibraryA")&&
           PE.isLibraryFunctionPresent("KERNEL32.DLL", "VirtualAlloc"))
        {
            if(PE.getNumberOfResources()>=1)
            {
                if(PE.getNumberOfSections()>=4)
                {
                    if((PE.getSectionName(0)==PE.getSectionName(1))&&(PE.getSectionName(0)==PE.getSectionName(3)))
                    {
                        bDetected=1;
                    }
                }
            }
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
