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

Disassembly:
mov eax, 0x426c
call fcn.0041b500
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 + 0xb9c]
lea ebx, [esi + 0xb74]
mov dword [esp + 0x30], eax
xor ecx, ecx
mov eax, dword [esi + 0xba0]
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 + 0xb8c]
push eax
lea eax, [esi + 0xb94]
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 0x406317
cmp edi, 0x90312
je 0x406317
cmp edi, 0x80090318
je 0x4067b3
lea ecx, [esi + 0x228]
mov edx, 0xff
cmp edi, 0x80090308
jne 0x406310
push 0x469bd4
jmp 0x406384
push str.tls___handshake_failed
jmp 0x406384
cmp dword [esp + 0x38], 5
jne 0x40634d
mov edx, dword [esp + 0x34]
test edx, edx
je 0x40634d
mov eax, dword [esi + 0xba0]
mov ecx, dword [esi + 0xb9c]
sub eax, edx
push edx
add eax, ecx
push eax
push ecx
call fcn.0041be70
mov eax, dword [esp + 0x40]
add esp, 0xc
mov dword [esi + 0xba0], eax
jmp 0x406354
and dword [esi + 0xba0], 0
cmp dword [esp + 0x1c], 0
jbe 0x406390
push 0
push dword [esp + 0x20]
lea eax, [esp + 0x280]
mov ecx, esi
push eax
call fcn.00405f92
test al, al
jne 0x406390
push str.tls___handshake_send_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403b43
xor al, al
jmp 0x4067b5
test edi, edi
jne 0x4067b3
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 + 0xb8c]
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x4067c2
cmp dword [esp + 0x48], eax
je 0x4067c2
cmp dword [esp + 0x4c], 4
ja 0x4067c2
push 0x720
push eax
lea ebp, [esi + 0x450]
push ebp
call fcn.0041c3f0
add esp, 0xc
cmp byte [esi + 0xb70], 0
je 0x40662a
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 0x406614
mov edi, dword [esp + 0x18]
test edi, edi
je 0x406614
cmp dword [esp + 0x4280], eax
je 0x4065e6
push 0x720
push eax
push ebp
call fcn.0041c3f0
add esp, 0xc
cmp byte [esi + 0xb70], 0
jne 0x40644c
mov bl, 1
jmp 0x4065e8
push 0x30
lea eax, [esp + 0xb4]
xor bl, bl
push 0
push eax
call fcn.0041c3f0
and dword [esp + 0x20], 0
lea eax, [edi + 0x10]
add esp, 0xc
mov dword [esp + 0xb0], 0x30
cmp dword [eax], 0
je 0x40648c
mov dword [esp + 0xc0], 1
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 0x4065e0
xor eax, eax
mov dword [esp + 0x78], 0x10
inc eax
mov dword [esp + 0x84], 0x48c1e0
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 0x4065d6
mov eax, dword [esp + 0x4280]
xorps xmm0, xmm0
and dword [esp + 0x90], 0
and dword [esp + 0x70], 0
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 + 0x98], 0x10
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 0x4065cb
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x406593
cmp eax, 0x800b0109
je 0x406593
cmp eax, 0x800b010f
je 0x406593
cmp eax, 0x800b0101
jne 0x4065cb
mov ecx, dword [esp + 0x10]
mov bl, 1
cmp dword [ecx + 0xc], 0
jbe 0x4065cf
mov eax, dword [ecx + 0x10]
mov eax, dword [eax]
cmp dword [eax + 0xc], 0
jbe 0x4065cf
push dword [eax + 0xc]
mov ecx, esi
push dword [eax + 0x10]
call fcn.00406159
test al, al
jne 0x4065cb
push 0x720
push 0
push ebp
call fcn.0041c3f0
add esp, 0xc
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
push dword [esp + 0x14]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
mov edi, dword [esp + 0x18]
jmp 0x4065e8
xor bl, bl
push edi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test bl, bl
jne 0x40661e
push str.tls___handshake_validation_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403b43
lea eax, [esi + 0xb74]
push eax
jmp 0x4067d8
push str.tls___handshake_certificate_context_failed
jmp 0x4067c7
lea ebx, [esi + 0xb74]
lea edi, [esi + 0xb8c]
push 0x194
lea eax, [esp + 0xe4]
push 0
push eax
call fcn.0041c3f0
add esp, 0xc
lea eax, [esp + 0xe0]
push eax
push 0x6e
push edi
call dword [sym.imp.Secur32.dll_QueryContextAttributesW]
test eax, eax
jne 0x406784
lea edi, [esi + 0x970]
mov ecx, 0x1000
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov dword [esi + 0x96c], eax
cmp eax, ecx
ja 0x4066da
je 0x406708
mov ecx, 0x200
cmp eax, ecx
ja 0x4066b7
je 0x4066a3
push 0x40
mov ecx, eax
pop edx
sub ecx, edx
je 0x4066ad
sub ecx, edx
je 0x4066ad
sub ecx, edx
je 0x4066ad
sub ecx, edx
jne 0x406724
push str.TLS_v1.1
jmp 0x40673f
push str.TLS_v1.0
jmp 0x40673f
cmp eax, 0x300
je 0x4066a3
cmp eax, 0x400
je 0x4066d3
cmp eax, 0x800
je 0x4066d3
cmp eax, 0xc00
jne 0x406724
push str.TLS_v1.2
jmp 0x40673f
mov ecx, 0x30000
cmp eax, ecx
ja 0x40670f
je 0x406701
cmp eax, 0x2000
je 0x406708
cmp eax, 0x3000
je 0x406708
cmp eax, 0x10000
je 0x406701
cmp eax, 0x20000
jne 0x406724
push str.DTLS_v1.0
jmp 0x40673f
push str.TLS_v1.3
jmp 0x40673f
cmp eax, 0x40000
je 0x40673a
cmp eax, 0x80000
je 0x40673a
cmp eax, 0xc0000
je 0x40673a
push eax
push 0x469bc8
push 0xff
push edi
call fcn.0040397c
add esp, 0x10
jmp 0x40674b
push str.DTLS_v1.2
mov edx, 0xff
mov ecx, edi
call fcn.004038fe
lea eax, [esp + 0xe8]
mov edx, 0xff
push eax
mov ecx, edi
call fcn.004038fe
push 0x469bd0
mov edx, 0xff
mov ecx, edi
call fcn.004038fe
lea eax, [esp + 0x1f0]
mov edx, 0xff
push eax
mov ecx, edi
call fcn.004038fe
mov eax, dword [esp + 0x40]
mov dword [esi + 0xbb0], eax
mov eax, dword [esp + 0x44]
mov dword [esi + 0xbb4], eax
mov eax, dword [esp + 0x48]
push ebx
mov dword [esi + 0xbb8], 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.00403b43
push ebx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
jmp 0x406389