Function at 0x4067d9
Capabilities:
Get remote cert context via schannel

Disassembly:
mov eax, 0x426c
call fcn.0041bda0
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov esi, ecx
mov dword [esp + 0x18], 0x4000
push edi
push 2
pop edx
mov eax, dword [esi + 0xfac]
lea ebx, [esi + 0xf84]
mov dword [esp + 0x30], eax
xor ecx, ecx
mov eax, dword [esi + 0xfb0]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x278]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x1c]
push ebx
mov dword [esp + 0x30], edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x68], edx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], eax
mov dword [esp + 0x58], ecx
call ebp
xor edx, edx
lea ecx, [esp + 0x98]
push edx
push ecx
lea ecx, [esp + 0x5c]
push ecx
push edx
push edx
lea ecx, [esp + 0x74]
push ecx
push edx
push edx
push 0x809c
push edx
lea eax, [esi + 0xf9c]
push eax
lea eax, [esi + 0xfa4]
push eax
call dword [sym.imp.Secur32.dll_InitializeSecurityContextW]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x4068d1
cmp edi, 0x90312
je 0x4068d1
cmp edi, 0x80090318
je 0x406e02
lea ecx, [esi + 0x228]
mov edx, 0xff
cmp edi, 0x80090308
jne 0x4068ca
push 0x46ee24
jmp 0x406940
push str.tls___handshake_failed
jmp 0x406940
cmp dword [esp + 0x38], 5
jne 0x406909
mov edx, dword [esp + 0x34]
test edx, edx
je 0x406909
mov ecx, dword [esi + 0xfac]
mov eax, ecx
sub eax, edx
add eax, dword [esi + 0xfb0]
push edx
push eax
push ecx
call fcn.0041c6f0
mov eax, dword [esp + 0x40]
add esp, 0xc
mov dword [esi + 0xfb0], eax
xor eax, eax
jmp 0x406911
xor eax, eax
mov dword [esi + 0xfb0], eax
cmp dword [esp + 0x1c], 0
jbe 0x40694c
push eax
push dword [esp + 0x20]
lea eax, [esp + 0x280]
mov ecx, esi
push eax
call fcn.00406502
test al, al
jne 0x40694c
push str.tls___handshake_send_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403df9
xor al, al
jmp 0x406e04
test edi, edi
jne 0x406e02
xor eax, eax
lea edi, [esp + 0x40]
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call ebp
lea eax, [esp + 0x40]
push eax
push 4
lea edi, [esi + 0xf9c]
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x406e11
cmp dword [esp + 0x48], eax
je 0x406e11
cmp dword [esp + 0x4c], 4
ja 0x406e11
push 0xb20
push eax
lea ebp, [esi + 0x460]
push ebp
call fcn.0041cc70
add esp, 0xc
cmp byte [esi + 0xf80], 0
je 0x406c78
and dword [esp + 0x18], 0
lea eax, [esp + 0x18]
push eax
push 0x53
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x406c62
mov edi, dword [esp + 0x18]
test edi, edi
je 0x406c62
cmp dword [esp + 0x4280], eax
je 0x406c2d
push 0xb20
push eax
push ebp
call fcn.0041cc70
add esp, 0xc
cmp byte [esi + 0xf80], 0
jne 0x406a08
mov bl, 1
jmp 0x406c2f
xor eax, eax
push 0x30
push eax
mov bl, al
lea eax, [esp + 0xb8]
push eax
call fcn.0041cc70
xor edx, edx
mov dword [esp + 0xbc], 0x30
xor ecx, ecx
lea eax, [edi + 0x10]
inc edx
mov dword [esp + 0x20], ecx
add esp, 0xc
mov dword [esp + 0xc8], edx
cmp dword [eax], ecx
je 0x406a4f
mov dword [esp + 0xc0], edx
mov dword [esp + 0xc4], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
je 0x406c07
cmp dword [esp + 0x14], 0
je 0x406c07
xor eax, eax
mov dword [esp + 0x78], 0x10
inc eax
mov dword [esp + 0x84], 0x4921e0
xor ecx, ecx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
lea eax, [esp + 0x10]
push eax
push ecx
push ecx
lea eax, [esp + 0x84]
mov dword [esp + 0x1c], ecx
push eax
push ecx
push ecx
push edi
push dword [esp + 0x30]
call dword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
je 0x406bdb
xor eax, eax
mov dword [esp + 0x88], 0x10
mov dword [esp + 0x90], eax
xorps xmm0, xmm0
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x4280]
mov dword [esp + 0x94], eax
lea eax, [esp + 0x88]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x9c]
push eax
lea eax, [esp + 0x70]
movlpd qword [esp + 0xa4], xmm0
push eax
push dword [esp + 0x18]
movlpd qword [esp + 0xb4], xmm0
push 4
mov dword [esp + 0x9c], 2
mov dword [esp + 0x7c], 0xc
mov dword [esp + 0xac], 0x14
call dword [sym.imp.CRYPT32.dll_CertVerifyCertificateChainPolicy]
test eax, eax
je 0x406baf
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x406b70
cmp eax, 0x800b0109
je 0x406b70
cmp eax, 0x800b010f
je 0x406b70
cmp eax, 0x800b0101
je 0x406b70
cmp eax, 0x80096004
je 0x406b70
push eax
push str.tls___certificate_error__0x_0X
jmp 0x406bbb
mov eax, dword [esp + 0x10]
mov bl, 1
cmp dword [eax + 0xc], 0
jbe 0x406bcf
mov eax, dword [eax + 0x10]
test eax, eax
je 0x406bcf
mov eax, dword [eax]
cmp dword [eax + 0xc], 0
jbe 0x406bcf
push dword [eax + 0xc]
mov ecx, esi
push dword [eax + 0x10]
push edi
call fcn.004066c9
test al, al
jne 0x406bcf
push 0xb20
push 0
push ebp
call fcn.0041cc70
add esp, 0xc
jmp 0x406bcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.tls___certificate_chain_policy_failed__0x_0X
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c17
add esp, 0x10
push dword [esp + 0x10]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
jmp 0x406bfb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.tls___get_certificate_chain_failed__0x_0X
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c17
add esp, 0x10
push dword [esp + 0x14]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
jmp 0x406c27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.tls___create_certificate_chain_engine_failed__0x_0X
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c17
add esp, 0x10
mov edi, dword [esp + 0x18]
jmp 0x406c2f
xor bl, bl
push edi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test bl, bl
jne 0x406c6c
lea ecx, [esi + 0x228]
xor eax, eax
cmp word [ecx], ax
jne 0x406c56
push str.tls___handshake_validation_failed
mov edx, 0xff
call fcn.00403df9
lea eax, [esi + 0xf84]
push eax
jmp 0x406e27
push str.tls___handshake_certificate_context_failed
jmp 0x406e16
lea ebx, [esi + 0xf84]
lea edi, [esi + 0xf9c]
xor eax, eax
push 0x194
push eax
lea eax, [esp + 0xe8]
push eax
call fcn.0041cc70
add esp, 0xc
lea eax, [esp + 0xe0]
push eax
push 0x6e
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x406dd3
lea edi, [esi + 0x980]
mov ecx, 0x1000
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov dword [esi + 0x97c], eax
cmp eax, ecx
ja 0x406d29
je 0x406d57
mov ecx, 0x200
cmp eax, ecx
ja 0x406d06
je 0x406cf2
push 0x40
mov ecx, eax
pop edx
sub ecx, edx
je 0x406cfc
sub ecx, edx
je 0x406cfc
sub ecx, edx
je 0x406cfc
sub ecx, edx
jne 0x406d73
push str.TLS_v1.1
jmp 0x406d8e
push str.TLS_v1.0
jmp 0x406d8e
cmp eax, 0x300
je 0x406cf2
cmp eax, 0x400
je 0x406d22
cmp eax, 0x800
je 0x406d22
cmp eax, 0xc00
jne 0x406d73
push str.TLS_v1.2
jmp 0x406d8e
mov ecx, 0x30000
cmp eax, ecx
ja 0x406d5e
je 0x406d50
cmp eax, 0x2000
je 0x406d57
cmp eax, 0x3000
je 0x406d57
cmp eax, 0x10000
je 0x406d50
cmp eax, 0x20000
jne 0x406d73
push str.DTLS_v1.0
jmp 0x406d8e
push str.TLS_v1.3
jmp 0x406d8e
cmp eax, 0x40000
je 0x406d89
cmp eax, 0x80000
je 0x406d89
cmp eax, 0xc0000
je 0x406d89
push eax
push 0x46ee18
push 0xff
push edi
call fcn.00403c17
add esp, 0x10
jmp 0x406d9a
push str.DTLS_v1.2
mov edx, 0xff
mov ecx, edi
call fcn.00403b99
lea eax, [esp + 0xe8]
mov edx, 0xff
push eax
mov ecx, edi
call fcn.00403b99
push 0x46ee20
mov edx, 0xff
mov ecx, edi
call fcn.00403b99
lea eax, [esp + 0x1f0]
mov edx, 0xff
push eax
mov ecx, edi
call fcn.00403b99
mov eax, dword [esp + 0x40]
mov dword [esi + 0xfc0], eax
mov eax, dword [esp + 0x44]
mov dword [esi + 0xfc4], eax
mov eax, dword [esp + 0x48]
push ebx
mov dword [esi + 0xfc8], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x4284]
mov byte [eax], 1
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x426c
ret 8
push str.tls___handshake_stream_size_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403df9
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x406945