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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x1c8
movaps xmmword [rsp + 0x1b0], xmm7
movaps xmmword [rsp + 0x1a0], xmm6
mov r15, rdx
mov qword [rsp + 0x68], rcx
lea rax, [rdx + 0xe4]
mov qword [rsp + 0x168], rax
lea rax, [rdx + 8]
mov qword [rsp + 0xe8], rax
lea rax, [rdx + 0x20]
mov qword [rsp + 0x170], rax
lea rdi, [rsp + 0xf0]
lea rax, [rdx + 0xa0]
mov qword [rsp + 0x178], rax
xorps xmm6, xmm6
movaps xmm7, xmmword [0x1400988c0]
movzx eax, byte [r15 + 0xe0]
test rax, rax
jne 0x14001fa2f
mov sil, byte [r15 + 0xe1]
mov r14b, byte [r15 + 0xe2]
mov r13b, byte [r15 + 0xe3]
mov bl, byte [r15 + 0xe4]
mov rcx, rdi
mov rdx, r15
call fcn.14001fed9
cmp dword [rsp + 0xf0], 1
je 0x14001fa57
cmp qword [rsp + 0xf8], 0
jne 0x14001ee08
test sil, sil
je 0x14001ee1a
cmp byte [r15 + 0xe0], 0
jne 0x14001ee1a
mov byte [r15 + 0xe1], 0
or bl, r13b
jne 0x14001ee2d
cmp byte [r15 + 0xfa], 0
je 0x14001f301
test r14b, r14b
je 0x14001f481
cmp qword [r15 + 0x58], 0
mov r12d, 0
je 0x14001ee6b
mov rcx, rdi
mov rdx, r15
call fcn.14001fd5d
cmp dword [rsp + 0xf0], 1
je 0x14001fa57
cmp qword [rsp + 0xf8], 0
je 0x14001faa2
mov rsi, qword [r15 + 0x98]
mov ecx, 0x20
mov edx, 8
call fcn.14000bb90
test rax, rax
je 0x14001fbaa
cmp qword [r15 + 0x90], rsi
jb 0x14001fb8f
mov rbp, rax
mov rax, qword [r15 + 0x80]
mov ecx, esi
bts rcx, 0x21
mov qword [rbp + 8], rax
mov qword [rbp], rcx
movups xmmword [rbp + 0x10], xmm6
mov qword [rsp + 0xa0], rbp
movups xmmword [rsp + 0xa8], xmm7
mov rdx, qword [r15 + 0xc8]
test rdx, rdx
je 0x14001ef59
mov r8, qword [r15 + 0xd8]
lea rcx, [rsp + 0xb8]
call fcn.140082ca7
mov r14, qword [rsp + 0xc0]
test r14, r14
je 0x14001ef65
mov edi, dword [rsp + 0xb8]
movabs rax, 0x1200000000
or rdi, rax
mov rbx, qword [rsp + 0xc8]
mov edx, 2
lea rcx, [rsp + 0xa0]
call fcn.14004aeb5
mov rbp, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0xb0]
mov rax, rsi
shl rax, 4
mov qword [rbp + rax + 8], rbx
mov qword [rbp + rax], rdi
lea rdi, [rsp + 0xf0]
inc rsi
mov qword [rsp + 0xb0], rsi
jmp 0x14001ef6d
mov qword [rsp + 0xc0], 0
mov esi, 2
xor r14d, r14d
mov rax, rsi
shl rax, 0x20
mov qword [rsp + 0x188], rbp
mov qword [rsp + 0x180], rax
mov qword [rsp + 0xf8], r12
movabs rax, 0x200000000
mov qword [rsp + 0xf0], rax
movups xmmword [rsp + 0x108], xmm6
movabs rax, 0x1100000000
mov qword [rsp + 0x100], rax
mov qword [rsp + 0x118], r12
mov qword [rsp + 0x98], rdi
movabs rax, 0x300000000
mov qword [rsp + 0x90], rax
mov dword [rsp + 0xdc], 0
cmp byte [r15 + 0xfa], 0
je 0x14001f05e
cmp byte [r15 + 0xfb], 0
mov edx, 0
mov rcx, qword [rsp + 0xe8]
cmove rdx, rcx
mov rax, qword [r15]
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm0
lea rax, [rsp + 0xdc]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0x70]
lea r8, [rsp + 0x180]
mov r9d, 0x1011c
call sub.secur32.dll_AcceptSecurityContext
jmp 0x14001f0dc
mov rax, qword [r15 + 0x28]
cmp byte [r15 + 0xf8], 0
mov r8, rax
cmove r8, r12
test rax, rax
cmove r8, rax
mov rax, qword [r15]
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x58], r12
lea rax, [rsp + 0xdc]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], r12d
lea rax, [rsp + 0x180]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
lea rcx, [rsp + 0x70]
mov rdx, qword [rsp + 0xe8]
mov r9d, 0x9819c
call sub.secur32.dll_InitializeSecurityContextW
mov ebx, eax
xor edi, edi
mov rcx, qword [rsp + rdi + 0x108]
test rcx, rcx
je 0x14001f0f2
call sub.secur32.dll_FreeContextBuffer
add rdi, 0x10
cmp rdi, 0x20
jne 0x14001f0e0
cmp ebx, 0x80090318
je 0x14001f19c
test ebx, ebx
lea rdi, [rsp + 0xf0]
je 0x14001f1cd
cmp ebx, 0x90312
jne 0x14001f29f
mov byte [r15 + 0xfb], 0
cmp rsi, 1
jbe 0x14001fb8f
cmp dword [rbp + 0x14], 5
mov rdx, qword [r15 + 0x98]
jne 0x14001f149
mov eax, dword [rbp + 0x10]
sub rdx, rax
mov rbp, qword [rsp + 0xd0]
mov esi, dword [rsp + 0xf0]
mov rbx, qword [rsp + 0xf8]
mov rcx, r15
call fcn.14001fe6a
xor eax, eax
cmp qword [r15 + 0x98], 0
sete al
mov qword [r15 + 0x58], rax
add rsi, rbx
mov rcx, qword [rsp + 0x178]
mov rdx, rbx
mov r8, rsi
call fcn.140016677
mov rcx, rbx
call sub.secur32.dll_FreeContextBuffer
jmp 0x14001f384
cmp rsi, 1
lea rdi, [rsp + 0xf0]
jbe 0x14001fb8f
mov eax, 1
cmp dword [rbp + 0x14], 4
jne 0x14001f1bc
mov eax, dword [rbp + 0x10]
mov qword [r15 + 0x58], rax
mov rbp, qword [rsp + 0xd0]
jmp 0x14001f384
cmp rsi, 1
jbe 0x14001fb8f
cmp dword [rbp + 0x14], 5
mov rdx, qword [r15 + 0x98]
jne 0x14001f1ea
mov eax, dword [rbp + 0x10]
sub rdx, rax
mov rbp, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xf8]
test rsi, rsi
je 0x14001f20d
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x164], eax
mov rcx, r15
call fcn.14001fe6a
mov rax, qword [r15 + 0x98]
xor ecx, ecx
test rax, rax
sete cl
mov qword [r15 + 0x58], rcx
test rsi, rsi
cmovne rbp, rsi
je 0x14001f25b
mov r8d, dword [rsp + 0x164]
add r8, rbp
mov rcx, qword [rsp + 0x178]
mov rdx, rbp
call fcn.140016677
mov rcx, rbp
call sub.secur32.dll_FreeContextBuffer
mov rax, qword [r15 + 0x98]
test rax, rax
je 0x14001f372
lea rcx, [rsp + 0x70]
mov rdx, r15
call fcn.14001fbbb
cmp byte [rsp + 0x70], 1
jne 0x14001f372
mov qword [rsp + 0xd0], rbp
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
mov rbx, rsi
shr rbx, 8
shld rsi, rbp, 0x38
jmp 0x14001f2a9
mov esi, ebx
shl rsi, 0x18
xor ebx, ebx
xor ebp, ebp
test r14, r14
je 0x14001f2ce
mov r8, qword [rsp + 0xc8]
cmp r14, 0x11
jb 0x14001f2c0
mov r8, qword [r8 - 8]
mov rcx, qword [0x140443578]
xor edx, edx
call sub.kernel32.dll_HeapFree
movabs rax, 0xfffffffffffffff
test qword [rsp + 0xa8], rax
je 0x14001f3de
mov r8, qword [rsp + 0xa0]
mov rcx, qword [0x140443578]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x14001f3de
mov qword [rsp + 0x70], 0
mov rcx, qword [rsp + 0xe8]
mov edx, 0x53
lea r8, [rsp + 0x70]
call sub.secur32.dll_QueryContextAttributesW
mov rsi, rax
shl rsi, 0x20
test eax, eax
jne 0x14001f331
mov rsi, qword [rsp + 0x70]
je 0x14001f3ed
mov qword [rsp + 0xf8], rsi
mov qword [rsp + 0x100], 0
mov qword [rsp + 0xf0], 1
test r14b, r14b
je 0x14001fb0d
lea rcx, [rsp + 0xf8]
call fcn.140001eb0
jmp 0x14001ee36
cmp byte [r15 + 0xe0], 0
jne 0x14001f384
mov byte [r15 + 0xe2], 0
test r14, r14
je 0x14001f3a9
mov r8, qword [rsp + 0xc8]
cmp r14, 0x11
jb 0x14001f39b
mov r8, qword [r8 - 8]
mov rcx, qword [0x140443578]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov qword [rsp + 0xd0], rbp
movabs rax, 0xfffffffffffffff
test qword [rsp + 0xa8], rax
je 0x14001f3db
mov r8, qword [rsp + 0xa0]
mov rcx, qword [0x140443578]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov bpl, 4
cmp bpl, 4
je 0x14001edb2
jmp 0x14001fa80
mov r12, qword [rsi + 0x20]
test r12, r12
mov qword [rsp + 0x158], rsi
je 0x14001f520
mov rcx, r12
call sub.crypt32.dll_CertDuplicateStore
mov rbp, rax
cmp dword [r15 + 0x18], 1
jne 0x14001f54e
mov rax, qword [rsp + 0x170]
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0xf8], 0
mov rcx, rdi
call fcn.14008242b
test rax, rax
je 0x14001f531
mov rbx, rdx
mov qword [rsp + 0x70], 0
mov rcx, rbp
mov r8d, 3
lea r9, [rsp + 0x70]
call sub.crypt32.dll_CertAddCertificateContextToStore
cmp eax, 1
jne 0x14001fac8
mov rcx, qword [rsp + 0x70]
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, rbx
call sub.crypt32.dll_CertFreeCertificateContext
jmp 0x14001f434
mov al, 2
test r13b, r13b
jne 0x14001f4e8
movaps xmmword [rsp + 0xf0], xmm6
mov dword [rsp + 0x100], 0
mov rcx, qword [rsp + 0xe8]
mov edx, 4
mov r8, rdi
call sub.secur32.dll_QueryContextAttributesW
test eax, eax
jne 0x14001fb93
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x160], eax
mov rax, qword [rsp + 0xfc]
mov qword [rsp + 0x190], rax
mov rax, qword [rsp + 0xf4]
mov qword [rsp + 0x198], rax
mov al, 1
mov byte [r15 + 0xe0], al
mov eax, dword [rsp + 0x160]
mov dword [r15 + 0xe4], eax
mov rax, qword [rsp + 0x198]
mov qword [r15 + 0xe8], rax
mov rax, qword [rsp + 0x190]
mov qword [r15 + 0xf0], rax
jmp 0x14001edb2
cmp dword [r15 + 0x18], 1
jne 0x14001f52d
mov rbp, qword [r15 + 0x20]
jmp 0x14001f558
xor ebp, ebp
jmp 0x14001f558
cmp qword [rsp + 0xf8], 0
je 0x14001f549
mov rcx, qword [rsp + 0x100]
call sub.crypt32.dll_CertFreeCertificateContext
test r12, r12
je 0x14001f558
mov rcx, rbp
xor edx, edx
call sub.crypt32.dll_CertCloseStore
movaps xmmword [rsp + 0xf0], xmm6
movaps xmmword [rsp + 0x140], xmm6
movaps xmmword [rsp + 0x130], xmm6
movaps xmmword [rsp + 0x120], xmm6
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x100], xmm6
mov dword [rsp + 0xf0], 0x60
mov dword [rsp + 0xf8], 1
lea rax, [0x140443498]
mov qword [rsp + 0x90], rax
mov rax, qword [0x1404434b0]
cmp rax, 3
jne 0x14001f969
mov rax, qword [rsp + 0x90]
mov rsi, qword [rax]
lea rax, [0x1404434b8]
mov qword [rsp + 0x90], rax
mov rax, qword [0x1404434d0]
cmp rax, 3
jne 0x14001f9ab
mov rax, qword [rsp + 0x90]
mov rbx, qword [rax]
lea rax, [0x1404434d8]
mov qword [rsp + 0x90], rax
mov rax, qword [0x1404434f0]
cmp rax, 3
jne 0x14001f9ed
mov rax, qword [rsp + 0x90]
mov rax, qword [rax]
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x100], 3
lea rax, [rsp + 0x70]
mov qword [rsp + 0x108], rax
xor eax, eax
mov qword [rsp + 0xb8], rax
lea rcx, [rsp + 0xb8]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 0xc0000001
xor ecx, ecx
mov rdx, qword [rsp + 0x158]
xor r8d, r8d
mov r9, rbp
call sub.crypt32.dll_CertGetCertificateChain
cmp eax, 1
jne 0x14001fb17
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0x180], rax
mov esi, 0xf00
cmp dword [r15 + 0x18], 1
jne 0x14001f7dd
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x180]
call fcn.140082353
mov esi, 0xf00
cmp dword [rsp + 0x70], 1
jne 0x14001f7dd
movups xmm0, xmmword [rsp + 0x78]
movaps xmmword [rsp + 0xa0], xmm0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], 0
lea rcx, [rsp + 0xb8]
call fcn.1400823e6
mov rbp, rdx
cmp rax, 1
jne 0x14001f7be
mov rax, qword [rsp + 0x170]
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0xf8], 0
mov rcx, rdi
call fcn.14008242b
mov rbx, rax
mov rsi, rdx
cmp rax, 1
jne 0x14001f780
mov r8d, dword [rsi + 0x10]
cmp r8d, dword [rbp + 0x10]
jne 0x14001f776
mov rcx, qword [rsi + 8]
mov rdx, qword [rbp + 8]
call fcn.140093840
mov r12d, eax
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
test r12d, r12d
jne 0x14001f739
jmp 0x14001f78d
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
jmp 0x14001f739
test rbx, rbx
je 0x14001f78d
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
cmp qword [rsp + 0xf8], 0
je 0x14001f7a5
mov rcx, qword [rsp + 0x100]
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
cmp rbx, 1
jne 0x14001f703
mov esi, 0xf10
jmp 0x14001f7d0
mov esi, 0xf00
test rax, rax
je 0x14001f7d0
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, qword [rsp + 0xa8]
call fcn.140092440
lea rax, [rsp + 0xc0]
movups xmmword [rax], xmm6
movabs rax, 0x200000018
mov qword [rsp + 0xb8], rax
mov rax, qword [r15 + 0x28]
test rax, rax
je 0x14001f815
cmp byte [r15 + 0xf9], 0
jne 0x14001f815
mov qword [rsp + 0xc8], rax
mov qword [rsp + 0x90], 0x10
mov dword [rsp + 0x94], esi
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x98], rax
movaps xmmword [rsp + 0x70], xmm6
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x70], 0x18
mov ecx, 4
mov rdx, qword [rsp + 0xe0]
lea r8, [rsp + 0x90]
lea r9, [rsp + 0x70]
call sub.crypt32.dll_CertVerifyCertificateChainPolicy
test eax, eax
je 0x14001fb28
mov ebp, dword [rsp + 0x74]
test ebp, ebp
je 0x14001f89d
mov rax, rbp
shl rax, 0x20
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0xa8], 0
jmp 0x14001f8a5
mov byte [rsp + 0xa0], 4
mov rbx, qword [r15 + 0x40]
test rbx, rbx
je 0x14001f906
mov rax, qword [r15 + 0x48]
mov rcx, qword [rax + 0x10]
add rcx, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rbx
mov rdx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0xe0]
mov qword [rsp + 0xf0], rsi
mov dword [rsp + 0xf8], ebp
mov qword [rsp + 0xfc], rdx
mov rdx, rdi
call qword [rax + 0x28]
mov rsi, rax
mov r12, rdx
test ebp, ebp
je 0x14001f902
lea rcx, [rsp + 0xa0]
call fcn.140001eb0
xor eax, eax
jmp 0x14001f918
mov rsi, qword [rsp + 0xa0]
mov r12, qword [rsp + 0xa8]
mov al, 1
cmp sil, 4
jne 0x14001fb39
test rbx, rbx
jne 0x14001f934
mov rcx, qword [rsp + 0xe0]
call fcn.140092440
mov rcx, qword [rsp + 0x158]
call sub.crypt32.dll_CertFreeCertificateContext
xor eax, eax
test al, al
jne 0x14001ee2d
cmp byte [r15 + 0xe0], 0
jne 0x14001ee2d
mov rax, qword [rsp + 0x168]
mov byte [rax], 1
jmp 0x14001ee2d
lea rax, [rsp + 0x90]
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0xb8], rax
lea rcx, [0x1404434b0]
xor edx, edx
lea r8, [rsp + 0xb8]
lea r9, [0x14043d320]
call fcn.140096ca7
jmp 0x14001f5be
lea rax, [rsp + 0x90]
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0xb8], rax
lea rcx, [0x1404434d0]
xor edx, edx
lea r8, [rsp + 0xb8]
lea r9, [0x14043d348]
call fcn.140096ca7
jmp 0x14001f5e9
lea rax, [rsp + 0x90]
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0xb8], rax
lea rcx, [0x1404434f0]
xor edx, edx
lea r8, [rsp + 0xb8]
lea r9, [0x14043d370]
call fcn.140096ca7
jmp 0x14001f614
cmp eax, 1
jne 0x14001fa6d
mov rcx, qword [rsp + 0x168]
mov eax, dword [rcx + 0x10]
mov rdi, qword [rsp + 0x68]
mov dword [rdi + 0x18], eax
movups xmm0, xmmword [rcx]
movups xmmword [rdi + 8], xmm0
mov dword [rdi + 4], 1
jmp 0x14001fa79
movups xmm0, xmmword [rsp + 0xf8]
mov rdi, qword [rsp + 0x68]
movups xmmword [rdi + 8], xmm0
jmp 0x14001fb64
mov rdi, qword [rsp + 0x68]
mov dword [rdi + 4], 0
xor eax, eax
jmp 0x14001fb69
movzx eax, bpl
shld rbx, rsi, 8
shl rsi, 8
or rsi, rax
mov rdi, qword [rsp + 0x68]
mov qword [rdi + 0x10], rbx
mov qword [rdi + 8], rsi
jmp 0x14001fb64
lea rdx, [0x1403ea913]
mov r8d, 0x1f
mov cl, 0x25
call fcn.1400831ac
mov rdi, qword [rsp + 0x68]
mov qword [rdi + 0x10], rdx
mov qword [rdi + 8], rax
jmp 0x14001fb64
call qword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
mov rcx, rbx
call sub.crypt32.dll_CertFreeCertificateContext
cmp qword [rsp + 0xf8], 0
je 0x14001faf0
mov rcx, qword [rsp + 0x100]
call sub.crypt32.dll_CertFreeCertificateContext
shl rsi, 0x20
test r12, r12
mov rdi, qword [rsp + 0x68]
je 0x14001fb08
mov rcx, rbp
xor edx, edx
call sub.crypt32.dll_CertCloseStore
xor r12d, r12d
jmp 0x14001fb4f
xor r12d, r12d
mov rdi, qword [rsp + 0x68]
jmp 0x14001fb5c
call qword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
shl rsi, 0x20
xor r12d, r12d
jmp 0x14001fb4a
call qword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
shl rsi, 0x20
mov al, 1
xor r12d, r12d
test al, al
je 0x14001fb4a
mov rcx, qword [rsp + 0xe0]
call fcn.140092440
mov rdi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x158]
call sub.crypt32.dll_CertFreeCertificateContext
mov qword [rdi + 8], rsi
mov qword [rdi + 0x10], r12
mov eax, 1
mov dword [rdi], eax
movaps xmm6, xmmword [rsp + 0x1a0]
movaps xmm7, xmmword [rsp + 0x1b0]
add rsp, 0x1c8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2
shl rax, 0x20
mov rdi, qword [rsp + 0x68]
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], 0
jmp 0x14001fb64
mov ecx, 0x20
mov edx, 8
call fcn.1400949bf
ud2