Function at 0x406c41
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 0x406c74
cmp dword [esi + 0xb98], 0xffffffff
jne 0x406cff
push 0x38
push eax
lea eax, [esp + 0x30]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.0041c9b0
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.0043c4eb
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 0x406cff
push eax
push str.tls___handshake_credential_handle_failed___u_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c23
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x406eaa
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call ebx
lea ebp, [esi + 0x28]
mov ecx, esi
push ebp
call fcn.00405eda
test al, al
jne 0x406d3c
lea ecx, [esi + 0x228]
xor edi, edi
cmp word [ecx], di
jne 0x406eaa
push str.tls___handshake_start_failed
mov edx, 0xff
call fcn.00403dea
jmp 0x406eaa
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
cmp dword [esi + 0xb9c], eax
jne 0x406d91
push 0x45f8cc
push 0x10010
mov dword [esi + 0xbac], 0x10000
call fcn.0041aafd
mov dword [esi + 0xb9c], eax
pop ecx
pop ecx
test eax, eax
jne 0x406d8f
push str.tls___handshake_no_memory
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403dea
push edi
call ebx
jmp 0x406eaa
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.0040609e
cmp dword [esi + 8], 0xffffffff
mov edi, eax
je 0x406ea2
call ebx
test edi, edi
jne 0x406e00
sub eax, dword [esp + 0x14]
sbb edx, dword [esp + 0x18]
cmp edx, edi
ja 0x406ea2
jb 0x406df6
cmp eax, 0x2710
ja 0x406ea2
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406e63
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.0040614f
test al, al
je 0x406e7c
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.004065e9
test al, al
je 0x406eaa
cmp byte [esp + 0x13], 0
jne 0x406e71
xor eax, eax
jmp 0x406dbc
mov byte [esi + 0xbbc], 1
mov al, 1
jmp 0x406eac
add esi, 0x228
xor edi, edi
cmp word [esi], di
jne 0x406eaa
push dword [esp + 0x20]
push str.tls___handshake_read_failed___u_error
push 0xff
push esi
call fcn.00403c23
add esp, 0x10
jmp 0x406eaa
push 1
push ebp
call fcn.004456eb
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd0
ret 4