Function at 0x406f6c
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 + 0x134c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ebx, [esi + 0x136c]
xor eax, eax
cmp dword [ebx], 0xffffffff
je 0x406f9f
cmp dword [esi + 0x1370], 0xffffffff
jne 0x40702a
push 0x38
push eax
lea eax, [esp + 0x30]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.0041db90
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.0043d6cd
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 0x40702a
push eax
push str.tls___handshake_credential_handle_failed___u_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403ccb
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4071d4
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call ebx
lea ebp, [esi + 0x28]
mov ecx, esi
push ebp
call fcn.0040619d
test al, al
jne 0x407067
lea ecx, [esi + 0x228]
xor edi, edi
cmp word [ecx], di
jne 0x4071d4
push str.tls___handshake_start_failed
mov edx, 0xff
call fcn.00403ead
jmp 0x4071d4
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
cmp dword [esi + 0x1374], eax
jne 0x4070bc
push 0x45f8cc
push 0x10010
mov dword [esi + 0x1384], 0x10000
call fcn.0041bcdd
mov dword [esi + 0x1374], eax
pop ecx
pop ecx
test eax, eax
jne 0x4070ba
push str.tls___handshake_no_memory
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403ead
push edi
call ebx
jmp 0x4071d4
xor eax, eax
push edi
mov dword [esi + 0x1378], eax
mov dword [esi + 0x137c], eax
mov dword [esi + 0x1380], 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.00406360
cmp dword [esi + 8], 0xffffffff
mov edi, eax
je 0x4071cd
call ebx
test edi, edi
jne 0x40712b
sub eax, dword [esp + 0x14]
sbb edx, dword [esp + 0x18]
cmp edx, edi
ja 0x4071cd
jb 0x407121
cmp eax, 0x2710
ja 0x4071cd
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40718e
mov ecx, dword [esi + 0x1378]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x1384]
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 + 0x1374]
add eax, ecx
mov ecx, esi
push edi
push eax
call fcn.00406411
test al, al
je 0x4071a7
mov eax, dword [esp + 0x1c]
mov ecx, esi
add dword [esi + 0x1378], eax
lea eax, [esp + 0x13]
push eax
push dword [esp + 0xe8]
call fcn.004068f5
test al, al
je 0x4071d4
cmp byte [esp + 0x13], 0
jne 0x40719c
xor eax, eax
jmp 0x4070e7
mov byte [esi + 0x1394], 1
mov al, 1
jmp 0x4071d6
add esi, 0x228
xor edi, edi
cmp word [esi], di
jne 0x4071d4
push dword [esp + 0x20]
push str.tls___handshake_read_failed___u_error
push 0xff
push esi
call fcn.00403ccb
add esp, 0x10
jmp 0x4071d4
push ecx
push ebp
call fcn.0044637f
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd0
ret 4