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

Disassembly:
sub esp, 0xd0
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0xf84]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ebx, [esi + 0xfa4]
xor eax, eax
cmp dword [ebx], 0xffffffff
je 0x406f06
cmp dword [esi + 0xfa8], 0xffffffff
jne 0x406f91
push 0x38
push eax
lea eax, [esp + 0x30]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.0041cce0
add esp, 8
mov dword [esp + 0x2c], 4
mov dword [esp + 0x5c], 0x18
mov dword [esp + 0x4c], 0xa00
push str.Microsoft_Unified_Security_Protocol_Provider
push ecx
push 0x3f
pop edx
lea ecx, [esp + 0x6c]
call fcn.0043c81b
lea eax, [esp + 0x20]
xor ecx, ecx
push eax
push ebx
push ecx
push ecx
lea eax, [esp + 0x38]
push eax
push ecx
push 2
lea eax, [esp + 0x7c]
push eax
push ecx
call dword [sym.imp.Secur32.dll_AcquireCredentialsHandleW]
test eax, eax
je 0x406f91
push eax
push str.tls___handshake_credential_handle_failed___u_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c67
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40713c
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call ebx
lea ebp, [esi + 0x28]
mov ecx, esi
push ebp
call fcn.00406103
test al, al
jne 0x406fce
lea ecx, [esi + 0x228]
xor edi, edi
cmp word [ecx], di
jne 0x40713c
push str.tls___handshake_start_failed
mov edx, 0xff
call fcn.00403e49
jmp 0x40713c
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
cmp dword [esi + 0xfac], eax
jne 0x407023
push 0x45f8cc
push 0x10010
mov dword [esi + 0xfbc], 0x10000
call fcn.0041ae2d
mov dword [esi + 0xfac], eax
pop ecx
pop ecx
test eax, eax
jne 0x407021
push str.tls___handshake_no_memory
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403e49
push edi
call ebx
jmp 0x40713c
xor eax, eax
push edi
mov dword [esi + 0xfb0], eax
mov dword [esi + 0xfb4], eax
mov dword [esi + 0xfb8], eax
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount64]
call ebx
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x18], edx
mov byte [esp + 0x13], al
mov ecx, esi
mov dword [esp + 0x1c], eax
call fcn.004062c7
cmp dword [esi + 8], 0xffffffff
mov edi, eax
je 0x407134
call ebx
test edi, edi
jne 0x407092
sub eax, dword [esp + 0x14]
sbb edx, dword [esp + 0x18]
cmp edx, edi
ja 0x407134
jb 0x407088
cmp eax, 0x2710
ja 0x407134
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4070f5
mov ecx, dword [esi + 0xfb0]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xfbc]
sub eax, ecx
mov dword [esp + 0x18], edx
cmp edi, eax
cmova edi, eax
xor eax, eax
push eax
push eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi + 0xfac]
add eax, ecx
mov ecx, esi
push edi
push eax
call fcn.00406378
test al, al
je 0x40710e
mov eax, dword [esp + 0x1c]
mov ecx, esi
add dword [esi + 0xfb0], eax
lea eax, [esp + 0x13]
push eax
push dword [esp + 0xe8]
call fcn.0040685c
test al, al
je 0x40713c
cmp byte [esp + 0x13], 0
jne 0x407103
xor eax, eax
jmp 0x40704e
mov byte [esi + 0xfcc], 1
mov al, 1
jmp 0x40713e
add esi, 0x228
xor edi, edi
cmp word [esi], di
jne 0x40713c
push dword [esp + 0x20]
push str.tls___handshake_read_failed___u_error
push 0xff
push esi
call fcn.00403c67
add esp, 0x10
jmp 0x40713c
push 1
push ebp
call fcn.00445745
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd0
ret 4