' Validate hardware resources
Public Function obf_CheckHardware() As Boolean
    On Error GoTo obf_ProcError

    Dim obf_objWMIService, obf_objItem, obf_colItems, obf_colComputer, obf_objComputer, obf_colItems2
    Dim obf_totalSize, obf_totalMemory, obf_cpusNum As Integer
    
    obf_totalSize = 0
    obf_totalMemory = 0
    obf_cpusNum = 0

    Set obf_objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set obf_colItems = obf_objWMIService.ExecQuery("Select * from Win32_LogicalDisk")
    
    For Each obf_objItem In obf_colItems
        Dim obf_num
        obf_num = Int(obf_objItem.Size / 1073741824)
        If obf_num > 0 And obf_objItem.DriveType = 3 Then
            obf_totalSize = obf_totalSize + obf_num
        End If
    Next
    
    If obf_totalSize < <<<MIN_HDD_SIZE_GB>>> Then
        obf_CheckHardware = False
        Exit Function
    End If
    
    Set obf_colComputer = obf_objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
    
    For Each obf_objComputer In obf_colComputer
        obf_totalMemory = obf_totalMemory + Int((obf_objComputer.TotalPhysicalMemory) / 1048576) + 1
    Next

    If obf_totalMemory < <<<MIN_RAM_SIZE_GB>>> Then
        obf_CheckHardware = False
        Exit Function
    End If
    
    Set obf_colItems2 = obf_objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", _
         &H10 + &H20)
        
    For Each obf_objItem In obf_colItems2
        obf_cpusNum = obf_cpusNum + obf_objItem.NumberOfLogicalProcessors
    Next
    
    If obf_cpusNum < <<<MIN_LOGICAL_CPUS>>> Then
        obf_CheckHardware = False
        Exit Function
    End If
    
    obf_CheckHardware = True
    Exit Function

obf_ProcError:
    obf_CheckHardware = False
End Function
