Function at 0x140164740
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, 0x198
movaps xmmword [rsp + 0x180], xmm6
mov rdi, rdx
mov qword [rsp + 0x68], rcx
movabs r15, 0xd00000003
lea rax, [rdx + 0x144]
mov qword [rsp + 0x130], rax
lea rbx, [rdx + 0x10]
lea rax, [rdx + 0x1c0]
mov qword [rsp + 0x108], rax
lea rax, [rdx + 0x18]
mov qword [rsp + 0x138], rax
lea r12, [rsp + 0x80]
xorps xmm6, xmm6
movzx eax, byte [rdi + 0x140]
test rax, rax
jne 0x1401657d1
movzx ebp, byte [rdi + 0x141]
movzx eax, byte [rdi + 0x142]
mov byte [rsp + 0x70], al
movzx r13d, byte [rdi + 0x143]
movzx esi, byte [rdi + 0x144]
mov r14, qword [rdi + 0x1b8]
mov rax, qword [rdi + 0x1b0]
cmp r14, rax
jne 0x140164840
test bpl, bpl
je 0x14016482b
mov rdx, qword [rdi + 0x138]
test rdx, rdx
je 0x140165911
cmp dword [rbx], 2
je 0x14016481e
mov rcx, rbx
call fcn.1401686a0
test rax, rax
jne 0x140165819
test rdx, rdx
jne 0x140165816
cmp byte [rdi + 0x140], 0
je 0x14016491c
or sil, r13b
jne 0x140164935
jmp 0x140164928
xor r15d, r15d
nop word cs:[rax + rax]
sub rax, r14
jb 0x140165911
mov r8, qword [rdi + 0x138]
test r8, r8
je 0x140165911
mov r9, qword [rdi + 0x1a0]
add r9, r14
cmp dword [rbx], 2
jne 0x1401648a0
mov qword [rsp + 0x20], rax
mov rcx, r12
mov rdx, qword [rsp + 0x138]
call fcn.1401d5bf0
mov rcx, qword [rsp + 0x80]
cmp rcx, 2
jne 0x1401648c2
jmp 0x140165790
mov qword [rsp + 0x20], rax
mov rcx, r12
mov rdx, rbx
call fcn.140168c10
mov rcx, qword [rsp + 0x80]
cmp rcx, 2
je 0x140165790
mov rax, qword [rsp + 0x88]
test rcx, rcx
jne 0x14016579a
add r15, rax
add r14, rax
mov qword [rdi + 0x1b8], r14
mov rax, qword [rdi + 0x1b0]
cmp r14, rax
jne 0x140164850
test r15, r15
movabs r15, 0xd00000003
je 0x1401647ea
cmp byte [rdi + 0x140], 0
jne 0x1401647ef
mov byte [rdi + 0x141], 1
jmp 0x1401647ef
mov byte [rdi + 0x141], 0
or sil, r13b
jne 0x140164935
cmp byte [rdi + 0x222], 0
je 0x140164f81
cmp byte [rsp + 0x70], 0
je 0x14016517b
mov rbp, qword [rdi + 0x198]
mov rsi, qword [rdi + 0x1f8]
test rsi, rsi
je 0x140164af9
xor r13d, r13d
nop word [rax + rax]
lea rax, [rbp*2]
cmp rax, rsi
cmova rsi, rax
cmp rsi, 0x401
mov eax, 0x400
cmovb rsi, rax
mov r14, qword [rdi + 0x190]
sub rsi, r14
jbe 0x1401649dd
mov rax, qword [rdi + 0x188]
sub rax, r14
cmp rax, rsi
jb 0x140164abb
mov r15, qword [rdi + 0x180]
lea rcx, [r15 + r14]
cmp rsi, 2
jb 0x1401649c6
lea r8, [rsi - 1]
xor edx, edx
call sub.msvcrt.dll_memset
add r14, rsi
dec r14
add r15, r14
mov rcx, r15
movabs r15, 0xd00000003
mov byte [rcx], 0
inc r14
mov qword [rdi + 0x190], r14
sub r14, rbp
jb 0x140165911
mov rax, qword [rdi + 0x180]
add rax, rbp
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], r14
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], r14
mov rdx, qword [rdi + 0x138]
test rdx, rdx
je 0x140165911
cmp dword [rbx], 2
jne 0x140164a50
mov rcx, qword [rsp + 0x138]
mov r8, r12
call fcn.1401d59a0
test rax, rax
cmovne rdx, r15
test rdx, rdx
je 0x140164a6b
jmp 0x1401657a5
mov rcx, rbx
mov r8, r12
call fcn.140169860
test rax, rax
cmovne rdx, r15
test rdx, rdx
jne 0x1401657a5
mov rax, qword [rsp + 0x90]
cmp rax, qword [rsp + 0x88]
ja 0x140165911
add rbp, rax
mov qword [rdi + 0x198], rbp
mov rcx, qword [rdi + 0x1f8]
mov rdx, rcx
sub rdx, rax
mov esi, 0
cmovae rsi, rdx
mov qword [rdi + 0x1f8], rsi
test rax, rax
je 0x140164af0
add r13, rax
cmp rcx, rax
ja 0x140164960
jmp 0x140164af0
lea rcx, [rdi + 0x180]
mov rdx, r14
mov r8, rsi
call fcn.140089e50
mov r14, qword [rdi + 0x190]
mov r15, qword [rdi + 0x180]
lea rcx, [r15 + r14]
cmp rsi, 2
jae 0x1401649af
jmp 0x1401649c6
test r13, r13
je 0x140165800
movzx eax, byte [0x1402d9160]
mov rax, qword [0x1402d9150]
test rax, rax
jne 0x140164b21
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x140165911
mov qword [0x1402d9150], rax
mov r8d, 0x20
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140165911
cmp rbp, qword [rdi + 0x190]
ja 0x140165911
mov r13, rax
mov r14, r15
mov r15, r12
mov rax, qword [rdi + 0x180]
mov dword [r13], ebp
mov dword [r13 + 4], 2
mov qword [r13 + 8], rax
movups xmmword [r13 + 0x10], xmm6
mov qword [rsp + 0xb0], r13
mov qword [rsp + 0xb8], 2
mov qword [rsp + 0xc0], 2
mov rdx, qword [rdi + 0x208]
test rdx, rdx
je 0x140164c1f
mov r8, qword [rdi + 0x218]
lea rcx, [rsp + 0xd0]
call fcn.1401b6390
mov r12, qword [rsp + 0xd0]
test r12, r12
je 0x140164c2b
mov qword [rsp + 0x70], r12
mov r12, qword [rsp + 0xe0]
mov ebp, dword [rsp + 0xd8]
mov edx, 2
lea rcx, [rsp + 0xb0]
call fcn.14008a0c0
mov r13, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xc0]
mov rax, rsi
shl rax, 4
mov dword [r13 + rax], ebp
mov dword [r13 + rax + 4], 0x12
mov qword [r13 + rax + 8], r12
mov r12, qword [rsp + 0x70]
inc rsi
mov qword [rsp + 0xc0], rsi
jmp 0x140164c33
mov qword [rsp + 0xd0], 0
mov esi, 2
xor r12d, r12d
mov dword [rsp + 0x140], 0
mov dword [rsp + 0x144], esi
mov qword [rsp + 0x148], r13
movabs rax, 0x200000000
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], 0
movabs rax, 0x1100000000
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0x98]
movups xmmword [rax], xmm6
mov qword [rax + 0x10], 0
movabs rax, 0x300000000
mov qword [rsp + 0x170], rax
mov qword [rsp + 0x178], r15
mov dword [rsp + 0xcc], 0
cmp byte [rdi + 0x222], 0
je 0x140164d39
cmp byte [rdi + 0x223], 0
mov edx, 0
mov rcx, qword [rsp + 0x108]
cmove rdx, rcx
mov rax, qword [rdi + 0x158]
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0xf0], xmm0
lea rax, [rsp + 0xcc]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x170]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0xf0]
lea r8, [rsp + 0x140]
mov r9d, 0x1011c
call sub.secur32.dll_AcceptSecurityContext
jmp 0x140164dd7
cmp byte [rdi + 0x220], 0
mov rax, qword [rdi + 0x1d0]
mov r8d, 0
cmovne r8, rax
test rax, rax
cmove r8, rax
mov rax, qword [rdi + 0x158]
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0xf0], xmm0
lea rax, [rsp + 0xcc]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x170]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x140]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0xf0]
mov rdx, qword [rsp + 0x108]
mov r9d, 0x9819c
call sub.secur32.dll_InitializeSecurityContextW
mov ebp, eax
mov r15, r14
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x140164dee
call sub.secur32.dll_FreeContextBuffer
mov rcx, qword [rsp + 0xa8]
test rcx, rcx
je 0x140164e00
call sub.secur32.dll_FreeContextBuffer
cmp ebp, 0x80090318
je 0x140164eb7
test ebp, ebp
mov qword [rsp + 0x70], r12
je 0x140164ee1
cmp ebp, 0x90312
jne 0x140165824
mov byte [rdi + 0x223], 0
cmp rsi, 1
jbe 0x140165911
cmp dword [r13 + 0x14], 5
jne 0x140164fba
mov r15, qword [rdi + 0x198]
mov eax, dword [r13 + 0x10]
mov r14, r15
sub r14, rax
jb 0x140165911
mov ebp, dword [rsp + 0x80]
mov r13, qword [rsp + 0x88]
test eax, eax
je 0x1401650f3
mov rax, qword [rdi + 0x190]
mov rsi, rax
sub rsi, r14
jb 0x140165911
mov qword [rdi + 0x190], 0
test r14, r14
je 0x1401650fa
cmp rax, r14
je 0x140165106
mov rcx, qword [rdi + 0x180]
lea rdx, [rcx + r14]
mov r8, rsi
call sub.msvcrt.dll_memmove
jmp 0x1401650ff
cmp rsi, 1
jbe 0x140165911
mov eax, 1
cmp dword [r13 + 0x14], 4
jne 0x140164fdd
mov eax, dword [r13 + 0x10]
mov qword [rdi + 0x1f8], rax
jmp 0x1401652e5
cmp rsi, 1
jbe 0x140165911
cmp dword [r13 + 0x14], 5
jne 0x140164fe9
mov r15, qword [rsp + 0x88]
test r15, r15
je 0x140164f19
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0xc8], eax
mov qword [rsp + 0x118], r15
mov r14, qword [rdi + 0x198]
mov eax, dword [r13 + 0x10]
mov r13, r14
sub r13, rax
cmp r14, r13
jb 0x140165911
je 0x14016520b
mov rax, qword [rdi + 0x190]
mov rsi, rax
sub rsi, r13
jb 0x140165911
mov qword [rdi + 0x190], 0
test r13, r13
je 0x140165206
cmp rax, r13
je 0x14016520b
mov rcx, qword [rdi + 0x180]
lea rdx, [rcx + r13]
mov r8, rsi
call sub.msvcrt.dll_memmove
jmp 0x140165215
mov qword [rsp + 0x80], 0
mov rcx, qword [rsp + 0x108]
mov edx, 0x53
mov r8, r12
call sub.secur32.dll_QueryContextAttributesW
test eax, eax
je 0x14016502d
cmp byte [rsp + 0x70], 0
jne 0x140164940
jmp 0x1401658b6
mov r15, qword [rdi + 0x198]
mov ebp, dword [rsp + 0x80]
mov eax, 1
mov r13, qword [rsp + 0x88]
mov r14, r15
jmp 0x140165108
mov qword [rdi + 0x1f8], rax
jmp 0x1401652e5
mov rax, qword [rsp + 0x88]
test rax, rax
je 0x14016500c
mov ecx, dword [rsp + 0x80]
mov dword [rsp + 0xc8], ecx
mov qword [rsp + 0x118], rax
mov qword [rdi + 0x198], 0
mov qword [rdi + 0x1f8], 1
jne 0x140165241
jmp 0x1401652cf
mov byte [rsp + 0x67], r13b
mov rsi, qword [rsp + 0x80]
mov rcx, qword [rsi + 0x20]
test rcx, rcx
mov qword [rsp + 0x110], rsi
je 0x140165338
call sub.crypt32.dll_CertDuplicateStore
mov r13, rax
cmp qword [rdi], 0
je 0x140165364
mov rcx, qword [rdi + 8]
xor edx, edx
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
je 0x1401650dc
nop word cs:[rax + rax]
mov r14, rax
mov rcx, rax
call sub.crypt32.dll_CertDuplicateCertificateContext
mov rsi, rax
mov qword [rsp + 0x80], 0
mov rcx, r13
mov rdx, r14
mov r8d, 3
mov r9, r12
call sub.crypt32.dll_CertAddCertificateContextToStore
test eax, eax
je 0x14016582e
mov rcx, qword [rsp + 0x80]
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, qword [rdi + 8]
mov rdx, rsi
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
jne 0x140165080
mov rcx, r13
xor edx, edx
call sub.crypt32.dll_CertCloseStore
mov rsi, qword [rsp + 0x110]
jmp 0x14016536e
mov eax, 1
jmp 0x140165108
cmp rax, r14
je 0x140165106
mov qword [rdi + 0x190], rsi
xor eax, eax
sub r15, r14
mov qword [rdi + 0x198], r15
mov qword [rdi + 0x1f8], rax
test ebp, ebp
mov esi, ebp
mov r14, r13
lea rax, str.combase.dll
cmove r14, rax
mov rax, qword [rdi + 0x1a8]
mov rbp, qword [rdi + 0x1b0]
sub rax, rbp
cmp rax, rsi
jb 0x140165346
movabs r15, 0xd00000003
mov rcx, qword [rdi + 0x1a0]
add rcx, rbp
mov rdx, r14
mov r8, rsi
call sub.msvcrt.dll_memcpy
add rbp, rsi
mov qword [rdi + 0x1b0], rbp
mov rcx, r13
call sub.secur32.dll_FreeContextBuffer
jmp 0x1401652e0
mov al, 2
test r13b, r13b
jne 0x1401651d0
mov rcx, r12
mov rdx, qword [rsp + 0x108]
call fcn.1401b6850
cmp dword [rsp + 0x80], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x128], rax
jne 0x140165915
mov eax, dword [rsp + 0x84]
mov dword [rsp + 0x124], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x158], rax
mov al, 1
mov byte [rdi + 0x140], al
mov eax, dword [rsp + 0x124]
mov dword [rdi + 0x144], eax
mov rax, qword [rsp + 0x128]
mov qword [rdi + 0x148], rax
mov rax, qword [rsp + 0x158]
mov qword [rdi + 0x150], rax
jmp 0x1401647a6
cmp rax, r13
jne 0x140165215
xor eax, eax
sub r14, r13
sete al
jmp 0x140165224
xor eax, eax
sub r14, r13
sete al
mov qword [rdi + 0x190], rsi
mov qword [rdi + 0x198], r14
mov qword [rdi + 0x1f8], rax
test r15, r15
movabs r15, 0xd00000003
je 0x1401652ac
mov eax, dword [rsp + 0xc8]
test eax, eax
mov esi, eax
mov r14, qword [rsp + 0x118]
lea rax, str.combase.dll
cmove r14, rax
mov rax, qword [rdi + 0x1a8]
mov r13, qword [rdi + 0x1b0]
sub rax, r13
cmp rax, rsi
jb 0x1401654b8
mov rcx, qword [rdi + 0x1a0]
add rcx, r13
mov rdx, r14
mov r8, rsi
call sub.msvcrt.dll_memcpy
add r13, rsi
mov qword [rdi + 0x1b0], r13
mov rcx, qword [rsp + 0x118]
call sub.secur32.dll_FreeContextBuffer
mov r14, qword [rdi + 0x198]
test r14, r14
je 0x1401652cf
lea rcx, [rsp + 0xf0]
mov rdx, rdi
call fcn.140165ac0
cmp byte [rsp + 0xf0], 0
jne 0x14016585c
cmp byte [rdi + 0x140], 0
jne 0x1401652e0
mov byte [rdi + 0x142], 0
nop
mov r12, qword [rsp + 0x70]
test r12, r12
je 0x14016530a
mov r8, qword [rsp + 0xe0]
cmp r12, 0x11
jb 0x1401652fc
mov r8, qword [r8 - 8]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
cmp qword [rsp + 0xb8], 0
je 0x14016532b
mov r8, qword [rsp + 0xb0]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
lea r12, [rsp + 0x80]
jmp 0x1401647a6
mov r13, qword [rdi]
test r13, r13
je 0x14016536e
mov r13, qword [rdi + 8]
jmp 0x14016536e
lea rcx, [rdi + 0x1a0]
mov rdx, rbp
mov r8, rsi
call fcn.140089e50
mov rbp, qword [rdi + 0x1b0]
jmp 0x140165145
mov rcx, r13
xor edx, edx
call sub.crypt32.dll_CertCloseStore
movaps xmmword [rsp + 0x80], xmm6
mov qword [rsp + 0x90], 0
mov dword [rsp + 0x80], 0x20
mov dword [rsp + 0x88], 1
lea rax, [0x14029f0ee]
mov qword [rsp + 0xd0], rax
lea rax, str.1.3.6.1.4.1.311.10.3.3
mov qword [rsp + 0xd8], rax
lea rax, str.2.16.840.1.113730.4.1
mov qword [rsp + 0xe0], rax
mov dword [rsp + 0x90], 3
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xb0], 0
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x20], r12
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xc0000001
xor ecx, ecx
mov rdx, rsi
xor r8d, r8d
mov r9, r13
call sub.crypt32.dll_CertGetCertificateChain
test eax, eax
je 0x1401658c7
mov rdx, qword [rsp + 0xb0]
mov esi, 0xf00
cmp qword [rdi], 0
mov qword [rsp + 0x78], rdx
je 0x1401654ad
cmp dword [rdx + 0xc], 0
movzx r13d, byte [rsp + 0x67]
je 0x14016563d
mov rax, qword [rdx + 0x10]
mov rbp, qword [rax]
mov rcx, rdx
call sub.crypt32.dll_CertDuplicateCertificateChain
mov rcx, qword [rsp + 0x78]
mov r14, rax
cmp dword [rcx + 0xc], 2
jb 0x1401654d6
mov r15d, 1
nop word cs:[rax + rax]
mov rax, qword [rcx + 0x10]
mov rbp, qword [rax + r15*8]
call sub.crypt32.dll_CertDuplicateCertificateChain
mov rsi, rax
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateChain
mov rcx, qword [rsp + 0x78]
mov eax, dword [rcx + 0xc]
inc r15
mov r14, rsi
cmp r15, rax
jb 0x140165480
jmp 0x1401654d9
movzx r13d, byte [rsp + 0x67]
jmp 0x14016563d
lea rcx, [rdi + 0x1a0]
mov rdx, r13
mov r8, rsi
call fcn.140089e50
mov r13, qword [rdi + 0x1b0]
jmp 0x140165279
mov rsi, r14
mov qword [rsp + 0x160], rbp
call sub.crypt32.dll_CertDuplicateCertificateChain
mov qword [rsp + 0x150], rax
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateChain
mov rdx, qword [rsp + 0x78]
xor r14d, r14d
movabs r15, 0xd00000003
jmp 0x140165522
mov r14, qword [rsp + 0x168]
inc r14
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x160]
mov eax, dword [rcx + 0xc]
mov esi, 0xf00
cmp r14, rax
jae 0x14016562a
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14016562a
mov qword [rsp + 0x168], r14
mov rax, qword [rax + r14*8]
mov rcx, qword [rax + 8]
call sub.crypt32.dll_CertDuplicateCertificateContext
mov rbp, rax
mov rcx, qword [rdi + 8]
xor edx, edx
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
je 0x14016550a
mov rsi, rax
mov rcx, rax
call sub.crypt32.dll_CertDuplicateCertificateContext
mov r14, rax
mov r8d, dword [rsi + 0x10]
cmp r8d, dword [rbp + 0x10]
jne 0x1401655b0
mov rdx, qword [rbp + 8]
mov rcx, qword [rsi + 8]
call sub.msvcrt.dll_memcmp
mov dword [rsp + 0x120], eax
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
cmp dword [rsp + 0x120], 0
jne 0x1401655c0
jmp 0x140165610
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
nop dword [rax + rax]
mov rcx, qword [rdi + 8]
mov rdx, r14
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
je 0x14016550a
mov rsi, rax
mov rcx, rax
call sub.crypt32.dll_CertDuplicateCertificateContext
mov r14, rax
mov r8d, dword [rsi + 0x10]
cmp r8d, dword [rbp + 0x10]
jne 0x1401655b0
mov rdx, qword [rbp + 8]
mov rcx, qword [rsi + 8]
call sub.msvcrt.dll_memcmp
mov r13d, eax
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
test r13d, r13d
movzx r13d, byte [rsp + 0x67]
jne 0x1401655c0
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
mov esi, 0xf10
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x150]
mov r14, rdx
call sub.crypt32.dll_CertFreeCertificateChain
mov rdx, r14
lea rax, [rsp + 0xb8]
movups xmmword [rax], xmm6
movabs rax, 0x200000018
mov qword [rsp + 0xb0], rax
mov rax, qword [rdi + 0x1d0]
test rax, rax
je 0x140165677
cmp byte [rdi + 0x221], 0
jne 0x140165677
mov qword [rsp + 0xc0], rax
mov dword [rsp + 0xf0], 0x10
mov dword [rsp + 0xf4], esi
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xf8], rax
movaps xmmword [rsp + 0xd0], xmm6
mov qword [rsp + 0xe0], 0
mov dword [rsp + 0xd0], 0x18
mov ecx, 4
lea r8, [rsp + 0xf0]
lea r9, [rsp + 0xd0]
call sub.crypt32.dll_CertVerifyCertificateChainPolicy
test eax, eax
je 0x1401658d8
mov ebp, dword [rsp + 0xd4]
mov rax, qword [rdi + 0x1e8]
test rax, rax
mov rsi, qword [rsp + 0x110]
je 0x140165759
mov r8, qword [rdi + 0x1f0]
mov rcx, qword [r8 + 0x10]
dec rcx
and rcx, 0xfffffffffffffff0
add rcx, rax
add rcx, 0x10
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x88], ebp
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x8c], rax
mov rdx, r12
call qword [r8 + 0x28]
test rax, rax
jne 0x1401658f3
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
cmp byte [rdi + 0x140], 0
jne 0x140164935
jmp 0x140165780
test ebp, ebp
jne 0x1401658df
mov rcx, qword [rsp + 0x78]
call sub.crypt32.dll_CertFreeCertificateChain
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
cmp byte [rdi + 0x140], 0
jne 0x140164935
mov rax, qword [rsp + 0x130]
mov byte [rax], 1
jmp 0x140164935
movabs rax, 0xd00000003
mov rsi, qword [rsp + 0x68]
mov qword [rsi + 8], rax
jmp 0x1401657ae
mov rsi, qword [rsp + 0x68]
mov qword [rsi + 8], rdx
mov eax, 2
mov dword [rsi], eax
movaps xmm6, xmmword [rsp + 0x180]
add rsp, 0x198
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp eax, 1
jne 0x1401657f7
mov rcx, qword [rsp + 0x130]
mov eax, dword [rcx + 0x10]
mov rsi, qword [rsp + 0x68]
mov dword [rsi + 0x14], eax
movups xmm0, xmmword [rcx]
movups xmmword [rsi + 4], xmm0
mov eax, 1
jmp 0x1401657b3
xor eax, eax
mov rsi, qword [rsp + 0x68]
jmp 0x1401657b3
lea rdx, [0x14029f0cf]
mov r8d, 0x1f
mov cl, 0x25
call fcn.14016d3b0
jmp 0x14016579a
mov r15, rdx
mov rsi, qword [rsp + 0x68]
mov qword [rsi + 8], r15
jmp 0x1401657ae
shl rbp, 0x20
or rbp, 2
jmp 0x140165869
call sub.kernel32.dll_GetLastError
mov ebp, eax
shl rbp, 0x20
or rbp, 2
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, rsi
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, r13
xor edx, edx
call sub.crypt32.dll_CertCloseStore
jmp 0x1401658f6
mov rbp, qword [rsp + 0xf8]
mov r12, qword [rsp + 0x70]
test r12, r12
mov rsi, qword [rsp + 0x68]
je 0x140165893
mov r8, qword [rsp + 0xe0]
cmp r12, 0x11
jb 0x140165885
mov r8, qword [r8 - 8]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
cmp qword [rsp + 0xb8], 0
je 0x140165908
mov r8, qword [rsp + 0xb0]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x140165908
mov ebp, eax
shl rbp, 0x20
or rbp, 2
mov rsi, qword [rsp + 0x68]
jmp 0x140165908
call sub.kernel32.dll_GetLastError
mov ebp, eax
shl rbp, 0x20
or rbp, 2
jmp 0x1401658f6
call sub.kernel32.dll_GetLastError
mov ebp, eax
shl rbp, 0x20
or rbp, 2
mov rcx, qword [rsp + 0x78]
call sub.crypt32.dll_CertFreeCertificateChain
jmp 0x1401658f6
mov rbp, rax
mov rsi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x110]
call sub.crypt32.dll_CertFreeCertificateContext
mov qword [rsi + 8], rbp
jmp 0x1401657ae
ud2
mov rsi, qword [rsp + 0x68]
mov rax, qword [rsp + 0x128]
jmp 0x14016579f