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

Disassembly:
mov eax, 0x426c
call fcn.0041cf30
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 + 0x1374]
lea ebx, [esi + 0x134c]
mov dword [esp + 0x30], eax
xor ecx, ecx
mov eax, dword [esi + 0x1378]
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 + 0x1364]
push eax
lea eax, [esi + 0x136c]
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 0x406a0b
cmp edi, 0x90312
je 0x406a0b
cmp edi, 0x80090318
je 0x406f3c
add esi, 0x228
cmp edi, 0x80090308
jne 0x4069e6
push 0x46ee44
mov ecx, esi
jmp 0x406a75
cmp edi, 0x80090326
jne 0x4069f5
push str.tls___invalid_message
jmp 0x4069df
push edi
push str.tls___handshake_failed__0x_X
push 0xff
push esi
call fcn.00403ccb
add esp, 0x10
jmp 0x406a7f
cmp dword [esp + 0x38], 5
jne 0x406a43
mov edx, dword [esp + 0x34]
test edx, edx
je 0x406a43
mov eax, dword [esi + 0x1378]
mov ecx, dword [esi + 0x1374]
sub eax, edx
push edx
add eax, ecx
push eax
push ecx
call fcn.0041d880
mov eax, dword [esp + 0x40]
add esp, 0xc
mov dword [esi + 0x1378], eax
xor eax, eax
jmp 0x406a4b
xor eax, eax
mov dword [esi + 0x1378], eax
cmp dword [esp + 0x1c], 0
jbe 0x406a86
push eax
push dword [esp + 0x20]
lea eax, [esp + 0x280]
mov ecx, esi
push eax
call fcn.0040661e
test al, al
jne 0x406a86
push str.tls___handshake_send_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403ead
xor al, al
jmp 0x406f3e
test edi, edi
jne 0x406f3c
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 + 0x1364]
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x406f4b
cmp dword [esp + 0x48], eax
je 0x406f4b
cmp dword [esp + 0x4c], 4
ja 0x406f4b
push 0xb20
push eax
lea ebp, [esi + 0x828]
push ebp
call fcn.0041de00
add esp, 0xc
cmp byte [esi + 0x1348], 0
je 0x406db2
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 0x406d9c
mov edi, dword [esp + 0x18]
test edi, edi
je 0x406d9c
cmp dword [esp + 0x4280], eax
je 0x406d67
push 0xb20
push eax
push ebp
call fcn.0041de00
add esp, 0xc
cmp byte [esi + 0x1348], 0
jne 0x406b42
mov bl, 1
jmp 0x406d69
xor eax, eax
push 0x30
push eax
mov bl, al
lea eax, [esp + 0xb8]
push eax
call fcn.0041de00
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 0x406b89
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 0x406d41
cmp dword [esp + 0x14], 0
je 0x406d41
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 0x406d15
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 0x406ce9
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x406caa
cmp eax, 0x800b0109
je 0x406caa
cmp eax, 0x800b010f
je 0x406caa
cmp eax, 0x800b0101
je 0x406caa
cmp eax, 0x80096004
je 0x406caa
push eax
push str.tls___certificate_error__0x_0X
jmp 0x406cf5
mov eax, dword [esp + 0x10]
mov bl, 1
cmp dword [eax + 0xc], 0
jbe 0x406d09
mov eax, dword [eax + 0x10]
test eax, eax
je 0x406d09
mov eax, dword [eax]
cmp dword [eax + 0xc], 0
jbe 0x406d09
push dword [eax + 0xc]
mov ecx, esi
push dword [eax + 0x10]
push edi
call fcn.004067e5
test al, al
jne 0x406d09
push 0xb20
push 0
push ebp
call fcn.0041de00
add esp, 0xc
jmp 0x406d09
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.00403ccb
add esp, 0x10
push dword [esp + 0x10]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
jmp 0x406d35
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.00403ccb
add esp, 0x10
push dword [esp + 0x14]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
jmp 0x406d61
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.00403ccb
add esp, 0x10
mov edi, dword [esp + 0x18]
jmp 0x406d69
xor bl, bl
push edi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test bl, bl
jne 0x406da6
lea ecx, [esi + 0x228]
xor eax, eax
cmp word [ecx], ax
jne 0x406d90
push str.tls___handshake_validation_failed
mov edx, 0xff
call fcn.00403ead
lea eax, [esi + 0x134c]
push eax
jmp 0x406f61
push str.tls___handshake_certificate_context_failed
jmp 0x406f50
lea ebx, [esi + 0x134c]
lea edi, [esi + 0x1364]
xor eax, eax
push 0x194
push eax
lea eax, [esp + 0xe8]
push eax
call fcn.0041de00
add esp, 0xc
lea eax, [esp + 0xe0]
push eax
push 0x6e
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x406f0d
lea edi, [esi + 0xd48]
mov ecx, 0x1000
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov dword [esi + 0xd44], eax
cmp eax, ecx
ja 0x406e63
je 0x406e91
mov ecx, 0x200
cmp eax, ecx
ja 0x406e40
je 0x406e2c
push 0x40
mov ecx, eax
pop edx
sub ecx, edx
je 0x406e36
sub ecx, edx
je 0x406e36
sub ecx, edx
je 0x406e36
sub ecx, edx
jne 0x406ead
push str.TLS_v1.1
jmp 0x406ec8
push str.TLS_v1.0
jmp 0x406ec8
cmp eax, 0x300
je 0x406e2c
cmp eax, 0x400
je 0x406e5c
cmp eax, 0x800
je 0x406e5c
cmp eax, 0xc00
jne 0x406ead
push str.TLS_v1.2
jmp 0x406ec8
mov ecx, 0x30000
cmp eax, ecx
ja 0x406e98
je 0x406e8a
cmp eax, 0x2000
je 0x406e91
cmp eax, 0x3000
je 0x406e91
cmp eax, 0x10000
je 0x406e8a
cmp eax, 0x20000
jne 0x406ead
push str.DTLS_v1.0
jmp 0x406ec8
push str.TLS_v1.3
jmp 0x406ec8
cmp eax, 0x40000
je 0x406ec3
cmp eax, 0x80000
je 0x406ec3
cmp eax, 0xc0000
je 0x406ec3
push eax
push 0x46ee38
push 0xff
push edi
call fcn.00403ccb
add esp, 0x10
jmp 0x406ed4
push str.DTLS_v1.2
mov edx, 0xff
mov ecx, edi
call fcn.00403c4d
lea eax, [esp + 0xe8]
mov edx, 0xff
push eax
mov ecx, edi
call fcn.00403c4d
push 0x46ee40
mov edx, 0xff
mov ecx, edi
call fcn.00403c4d
lea eax, [esp + 0x1f0]
mov edx, 0xff
push eax
mov ecx, edi
call fcn.00403c4d
mov eax, dword [esp + 0x40]
mov dword [esi + 0x1388], eax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x138c], eax
mov eax, dword [esp + 0x48]
push ebx
mov dword [esi + 0x1390], 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.00403ead
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x406a7f