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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x20]
sub rsp, 0x120
lea rdi, [rcx + 0xb98]
mov rbx, rcx
mov rcx, rdi
mov r15, rdx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rsi, [rbx + 0xbd0]
xor r12d, r12d
cmp qword [rsi], 0xffffffffffffffff
je 0x408b2b
cmp qword [rbx + 0xbd8], 0xffffffffffffffff
jne 0x408c00
xor edx, edx
mov qword [rbp + 0x60], r12
lea rcx, [rsp + 0x50]
lea r8d, [rdx + 0x50]
call fcn.00424830
lea r8, str.Microsoft_Unified_Security_Protocol_Provider
mov dword [rsp + 0x50], 4
lea rax, [rbp - 0x60]
mov dword [rbp - 0x68], 0x18
sub r8, rax
mov dword [rbp - 0x78], 0xa00
mov edx, 0x3f
lea rcx, [rbp - 0x60]
lea rax, [rdx + 0x7fffffbf]
test rax, rax
je 0x408b8f
movzx eax, word [r8 + rcx]
test ax, ax
je 0x408b8f
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x408b6c
test rdx, rdx
lea rax, [rcx - 2]
lea rdx, [rbp - 0x60]
cmovne rax, rcx
xor r9d, r9d
xor ecx, ecx
mov word [rax], r12w
lea r8d, [r9 + 2]
lea rax, [rbp + 0x60]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.Secur32.dll_AcquireCredentialsHandleW]
test eax, eax
je 0x408c00
lea rcx, [rbx + 0x22c]
mov r9d, eax
lea r8, str.tls___handshake_credential_handle_failed___u_status
mov edx, 0xff
call fcn.0040457c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x408e1c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rsi, [rbx + 0x2c]
mov rcx, rbx
mov rdx, rsi
call fcn.00407964
test al, al
jne 0x408c72
add rbx, 0x22c
cmp word [rbx], r12w
jne 0x408e1c
lea rcx, str.tls___handshake_start_failed
mov edx, 0xff
sub rcx, rbx
lea rax, [rdx + 0x7ffffeff]
test rax, rax
je 0x408c5e
movzx eax, word [rcx + rbx]
test ax, ax
je 0x408c5e
mov word [rbx], ax
add rbx, 2
sub rdx, 1
jne 0x408c3c
test rdx, rdx
lea rax, [rbx - 2]
cmovne rax, rbx
mov word [rax], r12w
jmp 0x408e1c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [rbx + 0xbe0], r12
jne 0x408cf8
lea rdx, [0x0047b0a0]
mov qword [rbx + 0xc00], 0x10000
mov ecx, 0x10010
call fcn.0042267c
mov qword [rbx + 0xbe0], rax
test rax, rax
jne 0x408cf8
add rbx, 0x22c
lea rcx, str.tls___handshake_no_memory
sub rcx, rbx
mov edx, 0xff
lea rax, [rdx + 0x7ffffeff]
test rax, rax
je 0x408ce4
movzx eax, word [rcx + rbx]
test ax, ax
je 0x408ce4
mov word [rbx], ax
add rbx, 2
sub rdx, 1
jne 0x408cc2
test rdx, rdx
lea rax, [rbx - 2]
cmovne rax, rbx
mov word [rax], r12w
jmp 0x408bf2
mov rcx, rdi
mov qword [rbx + 0xbe8], r12
mov qword [rbx + 0xbf0], r12
mov qword [rbx + 0xbf8], r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov r14, rax
mov byte [rbp + 0x60], r12b
mov rcx, rbx
mov qword [rbp + 0x78], r12
call fcn.00407c08
mov rcx, qword [rbx + 8]
mov edi, eax
cmp rcx, 0xffffffffffffffff
je 0x408e0e
test eax, eax
jne 0x408d65
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
sub rax, r14
cmp rax, 0x2710
ja 0x408e0e
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x408dd5
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov rcx, qword [rbx + 0xbe8]
lea r9, [rbp + 0x78]
mov r8, qword [rbx + 0xc00]
mov r14, rax
mov rdx, qword [rbx + 0xbe0]
lea rax, [rbp + 0x70]
sub r8, rcx
mov byte [rsp + 0x30], r12b
cmp rdi, r8
mov dword [rsp + 0x28], r12d
mov dword [rbp + 0x70], r12d
cmovbe r8, rdi
mov qword [rsp + 0x20], rax
add rdx, rcx
mov rcx, rbx
call fcn.00407cec
test al, al
je 0x408dea
mov rax, qword [rbp + 0x78]
lea r8, [rbp + 0x60]
add qword [rbx + 0xbe8], rax
mov rdx, r15
mov rcx, rbx
call fcn.0040830c
test al, al
je 0x408e1c
cmp byte [rbp + 0x60], r12b
je 0x408d23
mov byte [rbx + 0xc14], 1
mov al, 1
jmp 0x408e1e
lea rcx, [rbx + 0x22c]
cmp word [rcx], r12w
jne 0x408e1c
mov r9d, dword [rbp + 0x70]
lea r8, str.tls___handshake_read_failed___u_error
mov edx, 0xff
call fcn.0040457c
jmp 0x408e1c
mov r8d, 1
mov rdx, rsi
call fcn.004573fc
xor al, al
add rsp, 0x120
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret