Function at 0x450960
Capabilities:
Get client handle via schannel
Get outbound credentials handle via credssp

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x596c60]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
test edi, edi
mov dword [ebp - 0x408], edi
je 0x4509b3
cmp dword [edi], 0
jne 0x4509b3
mov ebx, dword [edi + 0x10040]
lea eax, [ebp - 0x438]
push eax
push 0x59
lea ecx, [edi + 0x1c]
push ecx
call sub.Secur32.dll_QueryContextAttributesA
test eax, eax
je 0x4509c6
push eax
push str.Error_querying_issuer_list_info:__s
push 1
call fcn.00477440
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005072fd
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x434]
xor eax, eax
push 0
lea ecx, [ebp - 0x428]
push ecx
push 1
push 0
mov dword [ebp - 0x420], eax
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x410], eax
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x420], eax
mov eax, dword [ebp - 0x438]
push 1
push ebx
mov dword [ebp - 0x428], 0x20
mov dword [ebp - 0x424], str.1.3.6.1.5.5.7.3.2
mov dword [ebp - 0x418], edx
mov dword [ebp - 0x414], eax
call dword [sym.imp.CRYPT32.dll_CertFindChainInStore]
mov esi, eax
test esi, esi
je 0x450b0d
jmp 0x450a56
mov edi, dword [ebp - 0x408]
push str._ncertificate_chain_found_n
push 1
call fcn.00477440
mov edx, dword [esi + 0x10]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
mov ecx, dword [ecx]
mov eax, dword [edi + 0x10]
add esp, 8
add ecx, 4
call fcn.00450920
test eax, eax
je 0x450b6b
push 0
lea edx, [ebp - 0x430]
push edx
push 0
push 0
lea eax, [edi + 0x10]
push eax
mov eax, dword [edi + 0x14]
push 0
push 2
push eax
push 0
call sub.Secur32.dll_AcquireCredentialsHandleA
mov edi, eax
test edi, edi
je 0x450b8d
push 0x3ff
lea ecx, [ebp - 0x403]
push 0
push ecx
mov byte [ebp - 0x404], 0
call fcn.0050c510
push 0x400
lea edx, [ebp - 0x404]
push edx
push edi
call fcn.00470ef0
lea eax, [ebp - 0x404]
push eax
push str.Error_returned_by_AcquireCredentialsHandle__:__s
push 1
call fcn.00477440
add esp, 0x24
push esi
lea ecx, [ebp - 0x428]
push ecx
push 1
push 0
push 1
push ebx
call dword [sym.imp.CRYPT32.dll_CertFindChainInStore]
mov esi, eax
test esi, esi
jne 0x450a50
push 0x3ff
lea edx, [ebp - 0x403]
push 0
push edx
mov byte [ebp - 0x404], 0
call fcn.0050c510
add esp, 0xc
push 0x400
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00470ef0
lea ecx, [ebp - 0x404]
push ecx
push str.Error_finding_cert_chain:__s_n
push 1
call fcn.00477440
add esp, 0x18
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005072fd
mov esp, ebp
pop ebp
ret
push str.authdata_schannel_set_cert___failed_in_authdata_refresh_schannel_credentials___n
push 1
call fcn.00477440
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005072fd
mov esp, ebp
pop ebp
ret
push str._nnew_schannel_credential_created_n
push 1
call fcn.00477440
mov esi, dword [ebp - 0x408]
add esp, 8
add esi, 4
push esi
call dword [sym.imp.Secur32.dll_FreeCredentialsHandle]
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x430]
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi + 4], eax
mov dword [esi], edx
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.005072fd
mov esp, ebp
pop ebp
ret