Function at 0x4173f0
Capabilities:
Get inbound credentials handle via credssp
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x448d60]
xor eax, ebp
mov dword [ebp - 8], eax
mov byte [ebp - 0x14d], 1
cmp dword [0x45239c], 0
je 0x417435
mov eax, dword [0x45239c]
mov dword [ebp - 0x158], eax
mov dword [0x45239c], 0
mov ecx, dword [ebp - 0x158]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [0x452390], 0
je 0x417455
mov edx, dword [0x452390]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x452390], 0
mov dword [0x4523a8], 0
cmp dword [0x45239c], 0
je 0x41747e
mov eax, dword [0x45239c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x45239c], 0
mov byte [0x44800d], 1
mov dword [0x4480a8], 0x1f90
mov dword [0x452388], 0
mov dword [0x4480a4], 0
lea ecx, [ebp - 0x10c]
push ecx
mov edx, dword [ebp + 8]
push edx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
je 0x4174f0
push str.Open_ContinentTLS_config
mov eax, dword [ebp - 0x148]
push eax
call fcn.0040e240
add esp, 8
push str.ContinentTLS_configuration_not_found_n
call fcn.0040e130
add esp, 4
xor al, al
jmp 0x417c63
mov dword [ebp - 0x14c], 0x100
lea ecx, [ebp - 0x14c]
push ecx
lea edx, [ebp - 0x108]
push edx
push 0
push 0
push str.ProtectedAddress
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
jne 0x417622
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x15c], ecx
push 6
push str.http:_
lea edx, [ebp - 0x108]
push edx
call fcn.0042cbd6
add esp, 0xc
test eax, eax
jne 0x417575
mov eax, dword [ebp - 0x15c]
add eax, 6
mov dword [ebp - 0x15c], eax
mov ecx, dword [ebp - 0x14c]
sub ecx, 6
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x15c]
movsx eax, byte [edx]
cmp eax, 0x2f
jne 0x4175a1
mov ecx, dword [ebp - 0x15c]
add ecx, 1
mov dword [ebp - 0x15c], ecx
mov edx, dword [ebp - 0x14c]
sub edx, 1
mov dword [ebp - 0x14c], edx
cmp dword [ebp - 0x14c], 1
jbe 0x4175c4
mov eax, dword [ebp - 0x14c]
add eax, 1
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x160], eax
jmp 0x4175ce
mov dword [ebp - 0x160], 0
mov ecx, dword [ebp - 0x160]
mov dword [0x452390], ecx
cmp dword [0x452390], 0
jne 0x417600
push 0x4390ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040e240
add esp, 8
mov byte [ebp - 0x14d], 0
jmp 0x417620
mov edx, dword [ebp - 0x14c]
add edx, 1
push edx
mov eax, dword [ebp - 0x15c]
push eax
mov ecx, dword [0x452390]
push ecx
call fcn.0042a7e0
add esp, 0xc
jmp 0x41763f
cmp dword [ebp - 0x148], 2
je 0x41763f
push str.Read_config.ProtectedAddress
mov edx, dword [ebp - 0x148]
push edx
call fcn.0040e240
add esp, 8
mov dword [ebp - 0x14c], 4
lea eax, [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x154]
push ecx
push 0
push 0
push str.Port
mov edx, dword [ebp - 0x10c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
jne 0x4176b0
mov eax, dword [ebp - 0x154]
mov dword [0x4480a8], eax
cmp dword [0x4480a8], 0
je 0x41769c
cmp dword [0x4480a8], 0xffff
jle 0x4176b0
push str.incorrect_port_n
call fcn.0040e130
add esp, 4
mov byte [ebp - 0x14d], 0
cmp dword [0x452390], 0
je 0x4176d2
push 0x3a
mov ecx, dword [0x452390]
push ecx
call fcn.00418d50
add esp, 8
mov dword [ebp - 0x164], eax
jmp 0x4176dc
mov dword [ebp - 0x164], 0
mov edx, dword [ebp - 0x164]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x4176f1
mov eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [0x452390]
push ecx
call fcn.0040ede0
add esp, 4
mov dword [0x45238c], eax
cmp dword [ebp - 4], 0
je 0x417711
mov edx, dword [ebp - 4]
mov byte [edx], 0x3a
cmp dword [ebp - 4], 0
je 0x417760
mov eax, dword [ebp - 4]
add eax, 1
push eax
call fcn.0042ca4c
add esp, 4
mov dword [0x44802c], eax
cmp dword [0x44802c], 0
je 0x417740
cmp dword [0x44802c], 0xffff
jle 0x41775e
push str.incorrect_server_port_n
call fcn.0040e130
add esp, 4
mov dword [0x44802c], 0x1bb
mov byte [ebp - 0x14d], 0
jmp 0x41776a
mov dword [0x44802c], 0x1bb
mov dword [ebp - 0x14c], 4
lea ecx, [ebp - 0x14c]
push ecx
lea edx, [ebp - 0x154]
push edx
push 0
push 0
push str.RequireRFC5746
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
je 0x4177c4
cmp dword [ebp - 0x148], 2
je 0x4177c4
push str.Read_config.RequireRFC5746
mov ecx, dword [ebp - 0x148]
push ecx
call fcn.0040e240
add esp, 8
cmp dword [ebp - 0x148], 0
jne 0x4177df
xor edx, edx
cmp dword [ebp - 0x154], 0
setne dl
mov byte [0x44800d], dl
mov dword [ebp - 0x14c], 4
lea eax, [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x154]
push ecx
push 0
push 0
push str.UseProxy
mov edx, dword [ebp - 0x10c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
je 0x417839
cmp dword [ebp - 0x148], 2
je 0x417839
push str.Read_config.UseProxy
mov eax, dword [ebp - 0x148]
push eax
call fcn.0040e240
add esp, 8
cmp dword [ebp - 0x148], 0
jne 0x417994
cmp dword [ebp - 0x154], 1
jne 0x417994
mov dword [ebp - 0x14c], 4
lea ecx, [ebp - 0x14c]
push ecx
lea edx, [ebp - 0x154]
push edx
push 0
push 0
push str.ProxyPort
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
je 0x4178ad
cmp dword [ebp - 0x148], 2
je 0x4178ad
push str.Read_config.ProxyPort
mov ecx, dword [ebp - 0x148]
push ecx
call fcn.0040e240
add esp, 8
mov edx, dword [ebp - 0x154]
mov dword [0x4480a4], edx
cmp dword [ebp - 0x148], 0
jne 0x4178d7
cmp dword [0x4480a4], 0
je 0x4178d7
cmp dword [0x4480a4], 0xffff
jle 0x4178fe
mov dword [0x4480a4], 0x1f90
cmp dword [ebp - 0x148], 2
je 0x4178fe
mov byte [ebp - 0x14d], 0
push str.incorrect_proxy_port
call fcn.0040e130
add esp, 4
mov dword [ebp - 0x14c], 0x100
lea eax, [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x108]
push ecx
push 0
push 0
push str.ProxyAddress
mov edx, dword [ebp - 0x10c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
je 0x417958
cmp dword [ebp - 0x148], 2
je 0x417958
push str.Read_config.ProxyAddress
mov eax, dword [ebp - 0x148]
push eax
call fcn.0040e240
add esp, 8
lea ecx, [ebp - 0x108]
push ecx
call fcn.0040ede0
add esp, 4
mov dword [0x452388], eax
cmp dword [ebp - 0x148], 0
jne 0x41797e
cmp dword [0x452388], 0xffffffff
jne 0x417992
push str.Incorrect_proxy_address_n
call fcn.0040e130
add esp, 4
mov byte [ebp - 0x14d], 0
jmp 0x4179aa
mov dword [0x4480a4], 0
mov edx, dword [0x4480a4]
mov dword [0x452388], edx
lea eax, [ebp - 0x14c]
push eax
push 0
push 0
push 0
push 0x4391dc
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
jne 0x417a8c
mov edx, dword [ebp - 0x14c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x45239c], eax
cmp dword [0x45239c], 0
jne 0x417a16
push 0x4391e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040e240
add esp, 8
mov byte [ebp - 0x14d], 0
jmp 0x417a73
lea eax, [ebp - 0x14c]
push eax
mov ecx, dword [0x45239c]
push ecx
push 0
push 0
push str.Certificate
mov edx, dword [ebp - 0x10c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
je 0x417a73
mov eax, dword [0x45239c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x45239c], 0
push str.Incorrect_server_certificate_n
call fcn.0040e130
add esp, 4
mov byte [ebp - 0x14d], 0
movzx ecx, byte [ebp - 0x14d]
test ecx, ecx
je 0x417a8a
mov edx, dword [ebp - 0x14c]
mov dword [0x4523a8], edx
jmp 0x417ab8
cmp dword [ebp - 0x148], 2
jne 0x417aa4
push str.Server_certificate_is_not_set_n
call fcn.0040e130
add esp, 4
jmp 0x417ab8
push str.Read_config.Certificate
mov eax, dword [ebp - 0x148]
push eax
call fcn.0040e240
add esp, 8
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x4523b4], 0
je 0x417adb
mov edx, dword [0x4523b4]
push edx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp dword [0x452390], 0
je 0x417afc
push 0x3a
mov eax, dword [0x452390]
push eax
call fcn.00418d50
add esp, 8
mov dword [ebp - 0x168], eax
jmp 0x417b06
mov dword [ebp - 0x168], 0
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
je 0x417b1b
mov edx, dword [ebp - 4]
mov byte [edx], 0
cmp dword [0x452390], 0
je 0x417b3a
mov eax, dword [0x452390]
push eax
call fcn.00411750
add esp, 4
mov dword [ebp - 0x16c], eax
jmp 0x417b44
mov dword [ebp - 0x16c], 0
mov ecx, dword [ebp - 0x16c]
mov dword [0x4523b4], ecx
cmp dword [ebp - 4], 0
je 0x417b5c
mov edx, dword [ebp - 4]
mov byte [edx], 0x3a
cmp dword [0x4523ac], 0
jne 0x417b8d
cmp dword [0x4523b0], 0
jne 0x417b8d
push 0x4523ac
call dword [sym.imp.Secur32.dll_FreeCredentialsHandle]
mov dword [0x4523b0], 0
mov eax, dword [0x4523b0]
mov dword [0x4523ac], eax
cmp dword [0x4523b4], 0
jne 0x417ba1
mov al, byte [ebp - 0x14d]
jmp 0x417c63
mov dword [ebp - 0x144], 0
push 0x34
push 0
lea ecx, [ebp - 0x140]
push ecx
call fcn.0042adc0
add esp, 0xc
mov dword [ebp - 0x144], 4
mov dword [ebp - 0x114], 0x18
mov dword [ebp - 0x140], 1
mov dword [ebp - 0x13c], 0x4523b4
mov dword [ebp - 0x124], 0x40000555
push 0
push 0x4523ac
push 0
push 0
lea edx, [ebp - 0x144]
push edx
push 0
push 1
push str.Microsoft_Unified_Security_Protocol_Provider
push 0
call sub.Secur32.dll_AcquireCredentialsHandleA
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
jne 0x417c33
cmp dword [0x4523ac], 0
jne 0x417c5d
cmp dword [0x4523b0], 0
jne 0x417c5d
push str.AcquireCredentialsHandle
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040e240
add esp, 8
mov eax, dword [0x4523b4]
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov dword [0x4523b4], 0
mov al, byte [ebp - 0x14d]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042a637
mov esp, ebp
pop ebp
ret