Function at 0x406e32
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 0x406e65
cmp dword [esi + 0xfa8], 0xffffffff
jne 0x406ef0
push 0x38
push eax
lea eax, [esp + 0x30]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.0041cc70
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.0043c7ab
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 0x406ef0
push eax
push str.tls___handshake_credential_handle_failed___u_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c17
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40709b
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call ebx
lea ebp, [esi + 0x28]
mov ecx, esi
push ebp
call fcn.00406080
test al, al
jne 0x406f2d
lea ecx, [esi + 0x228]
xor edi, edi
cmp word [ecx], di
jne 0x40709b
push str.tls___handshake_start_failed
mov edx, 0xff
call fcn.00403df9
jmp 0x40709b
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
cmp dword [esi + 0xfac], eax
jne 0x406f82
push 0x45f8cc
push 0x10010
mov dword [esi + 0xfbc], 0x10000
call fcn.0041adbd
mov dword [esi + 0xfac], eax
pop ecx
pop ecx
test eax, eax
jne 0x406f80
push str.tls___handshake_no_memory
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403df9
push edi
call ebx
jmp 0x40709b
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.00406244
cmp dword [esi + 8], 0xffffffff
mov edi, eax
je 0x407093
call ebx
test edi, edi
jne 0x406ff1
sub eax, dword [esp + 0x14]
sbb edx, dword [esp + 0x18]
cmp edx, edi
ja 0x407093
jb 0x406fe7
cmp eax, 0x2710
ja 0x407093
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x407054
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.004062f5
test al, al
je 0x40706d
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.004067d9
test al, al
je 0x40709b
cmp byte [esp + 0x13], 0
jne 0x407062
xor eax, eax
jmp 0x406fad
mov byte [esi + 0xfcc], 1
mov al, 1
jmp 0x40709d
add esi, 0x228
xor edi, edi
cmp word [esi], di
jne 0x40709b
push dword [esp + 0x20]
push str.tls___handshake_read_failed___u_error
push 0xff
push esi
call fcn.00403c17
add esp, 0x10
jmp 0x40709b
push 1
push ebp
call fcn.00445803
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd0
ret 4