Function at 0x4067e3
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 + 0xb74]
push edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
lea ebx, [esi + 0xb94]
xor eax, eax
cmp dword [ebx], 0xffffffff
je 0x406816
cmp dword [esi + 0xb98], 0xffffffff
jne 0x4068a1
push 0x38
push eax
lea eax, [esp + 0x30]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.0041c3f0
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.0043b61f
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 0x4068a1
push eax
push str.tls___handshake_credential_handle_failed___u_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.0040397c
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
jmp 0x406a4c
mov ebx, dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
push edi
call ebx
lea ebp, [esi + 0x28]
mov ecx, esi
push ebp
call fcn.00405b10
test al, al
jne 0x4068de
lea ecx, [esi + 0x228]
xor edi, edi
cmp word [ecx], di
jne 0x406a4c
push str.tls___handshake_start_failed
mov edx, 0xff
call fcn.00403b43
jmp 0x406a4c
push edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
xor eax, eax
cmp dword [esi + 0xb9c], eax
jne 0x406933
push 0x45a8ac
push 0x10010
mov dword [esi + 0xbac], 0x10000
call fcn.0041a51d
mov dword [esi + 0xb9c], eax
pop ecx
pop ecx
test eax, eax
jne 0x406931
push str.tls___handshake_no_memory
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403b43
push edi
call ebx
jmp 0x406a4c
xor eax, eax
push edi
mov dword [esi + 0xba0], eax
mov dword [esi + 0xba4], eax
mov dword [esi + 0xba8], 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.00405cd4
cmp dword [esi + 8], 0xffffffff
mov edi, eax
je 0x406a44
call ebx
test edi, edi
jne 0x4069a2
sub eax, dword [esp + 0x14]
sbb edx, dword [esp + 0x18]
cmp edx, edi
ja 0x406a44
jb 0x406998
cmp eax, 0x2710
ja 0x406a44
push 1
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x406a05
mov ecx, dword [esi + 0xba0]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xbac]
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 + 0xb9c]
add eax, ecx
mov ecx, esi
push edi
push eax
call fcn.00405d85
test al, al
je 0x406a1e
mov eax, dword [esp + 0x1c]
mov ecx, esi
add dword [esi + 0xba0], eax
lea eax, [esp + 0x13]
push eax
push dword [esp + 0xe8]
call fcn.0040621f
test al, al
je 0x406a4c
cmp byte [esp + 0x13], 0
jne 0x406a13
xor eax, eax
jmp 0x40695e
mov byte [esi + 0xbbc], 1
mov al, 1
jmp 0x406a4e
add esi, 0x228
xor edi, edi
cmp word [esi], di
jne 0x406a4c
push dword [esp + 0x20]
push str.tls___handshake_read_failed___u_error
push 0xff
push esi
call fcn.0040397c
add esp, 0x10
jmp 0x406a4c
push 1
push ebp
call fcn.00442ff6
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd0
ret 4