Function at 0x140166040
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, 0x178
movaps xmmword [rsp + 0x160], xmm6
mov rdi, rdx
mov qword [rsp + 0x68], rcx
lea rax, [rdx + 0x44]
mov qword [rsp + 0x120], rax
lea rbx, [rdx + 0x10]
lea rax, [rdx + 0xc0]
mov qword [rsp + 0xf8], rax
xorps xmm6, xmm6
movzx eax, byte [rdi + 0x40]
test rax, rax
jne 0x140166f17
movzx ebp, byte [rdi + 0x41]
movzx r12d, byte [rdi + 0x42]
movzx r13d, byte [rdi + 0x43]
movzx esi, byte [rdi + 0x44]
mov r14, qword [rdi + 0xb8]
mov rax, qword [rdi + 0xb0]
cmp r14, rax
jne 0x1401660e0
test bpl, bpl
je 0x1401660d1
cmp qword [rdi + 0x38], 0
je 0x140167041
cmp byte [rdi + 0x40], 0
je 0x140166177
or sil, r13b
jne 0x14016618d
jmp 0x140166180
mov r15d, r12d
xor r12d, r12d
nop word cs:[rax + rax]
sub rax, r14
jb 0x140167041
mov r8, qword [rdi + 0x38]
test r8, r8
je 0x140167041
mov r9, qword [rdi + 0xa0]
add r9, r14
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x70]
mov rdx, rbx
call fcn.1401d5bf0
mov rcx, qword [rsp + 0x70]
cmp rcx, 2
je 0x140166ed6
mov rax, qword [rsp + 0x78]
test rcx, rcx
jne 0x140166ee0
add r12, rax
add r14, rax
mov qword [rdi + 0xb8], r14
mov rax, qword [rdi + 0xb0]
cmp r14, rax
jne 0x1401660f0
test r12, r12
mov r12d, r15d
je 0x1401660b7
cmp byte [rdi + 0x40], 0
jne 0x1401660bc
mov byte [rdi + 0x41], 1
jmp 0x1401660bc
mov byte [rdi + 0x41], 0
or sil, r13b
jne 0x14016618d
cmp byte [rdi + 0x122], 0
je 0x140166798
test r12b, r12b
je 0x140166956
mov rsi, qword [rdi + 0x98]
mov r14, qword [rdi + 0xf8]
test r14, r14
je 0x140166319
xor r13d, r13d
lea rax, [rsi + rsi]
cmp rax, r14
cmova r14, rax
cmp r14, 0x401
mov eax, 0x400
cmovb r14, rax
mov r12, qword [rdi + 0x90]
sub r14, r12
jbe 0x14016621f
mov rax, qword [rdi + 0x88]
sub rax, r12
cmp rax, r14
jb 0x1401662d2
mov rbp, qword [rdi + 0x80]
lea rcx, [r12 + rbp]
cmp r14, 2
jb 0x140166212
lea r8, [r14 - 1]
xor edx, edx
call sub.msvcrt.dll_memset
add r12, r14
dec r12
add rbp, r12
mov rcx, rbp
mov byte [rcx], 0
inc r12
mov qword [rdi + 0x90], r12
sub r12, rsi
jb 0x140167041
mov rax, qword [rdi + 0x80]
add rax, rsi
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], r12
mov rdx, qword [rdi + 0x38]
test rdx, rdx
je 0x140167041
mov rcx, rbx
lea r8, [rsp + 0x70]
call fcn.1401d59a0
test rax, rax
movabs rax, 0xd00000003
cmovne rdx, rax
test rdx, rdx
jne 0x140166eeb
mov rax, qword [rsp + 0x80]
cmp rax, qword [rsp + 0x78]
ja 0x140167041
add rsi, rax
mov qword [rdi + 0x98], rsi
mov rcx, qword [rdi + 0xf8]
mov rdx, rcx
sub rdx, rax
mov r14d, 0
cmovae r14, rdx
mov qword [rdi + 0xf8], r14
test rax, rax
je 0x140166310
add r13, rax
cmp rcx, rax
ja 0x1401661b0
jmp 0x140166310
lea rcx, [rdi + 0x80]
mov rdx, r12
mov r8, r14
call fcn.140089e50
mov r12, qword [rdi + 0x90]
mov rbp, qword [rdi + 0x80]
lea rcx, [r12 + rbp]
cmp r14, 2
jae 0x1401661fb
jmp 0x140166212
test r13, r13
je 0x140166f46
movzx eax, byte [0x1402d9160]
mov rax, qword [0x1402d9150]
test rax, rax
jne 0x140166341
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x140167041
mov qword [0x1402d9150], rax
mov r8d, 0x20
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140167041
cmp rsi, qword [rdi + 0x90]
ja 0x140167041
mov r12, rax
mov rax, qword [rdi + 0x80]
mov dword [r12], esi
mov dword [r12 + 4], 2
mov qword [r12 + 8], rax
movups xmmword [r12 + 0x10], xmm6
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0xa8], 2
mov qword [rsp + 0xb0], 2
mov rdx, qword [rdi + 0x108]
test rdx, rdx
je 0x14016642d
mov r8, qword [rdi + 0x118]
lea rcx, [rsp + 0xc0]
call fcn.1401b6390
mov r15, qword [rsp + 0xc0]
test r15, r15
je 0x140166439
mov rsi, qword [rsp + 0xd0]
mov ebp, dword [rsp + 0xc8]
mov edx, 2
lea rcx, [rsp + 0xa0]
call fcn.14008a0c0
mov r12, qword [rsp + 0xa0]
mov r14, qword [rsp + 0xb0]
mov rax, r14
shl rax, 4
mov dword [r12 + rax], ebp
mov dword [r12 + rax + 4], 0x12
mov qword [r12 + rax + 8], rsi
inc r14
mov qword [rsp + 0xb0], r14
jmp 0x140166442
mov qword [rsp + 0xc0], 0
mov r14d, 2
xor r15d, r15d
mov dword [rsp + 0x128], 0
mov dword [rsp + 0x12c], r14d
mov qword [rsp + 0x130], r12
movabs rax, 0x200000000
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], 0
movabs rax, 0x1100000000
mov qword [rsp + 0x80], rax
lea rax, [rsp + 0x88]
movups xmmword [rax], xmm6
mov qword [rax + 0x10], 0
movabs rax, 0x300000000
mov qword [rsp + 0x150], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x158], rax
mov dword [rsp + 0xbc], 0
cmp byte [rdi + 0x122], 0
je 0x14016661c
cmp byte [rdi + 0x123], 0
mov edx, 0
mov rcx, qword [rsp + 0xf8]
cmove rdx, rcx
mov rax, qword [rdi + 0x58]
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0xe0], xmm0
lea rax, [rsp + 0xbc]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0xe0]
lea r8, [rsp + 0x128]
mov r9d, 0x1011c
call sub.secur32.dll_AcceptSecurityContext
mov r13d, eax
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x140166559
call sub.secur32.dll_FreeContextBuffer
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x14016656b
call sub.secur32.dll_FreeContextBuffer
cmp r13d, 0x80090318
je 0x1401666d0
test r13d, r13d
je 0x1401666fc
cmp r13d, 0x90312
jne 0x140166f5c
mov byte [rdi + 0x123], 0
cmp r14, 1
jbe 0x140167041
cmp dword [r12 + 0x14], 5
jne 0x1401667cf
mov rsi, qword [rdi + 0x98]
mov eax, dword [r12 + 0x10]
mov r13, rsi
sub r13, rax
jb 0x140167041
mov ebp, dword [rsp + 0x70]
mov r12, qword [rsp + 0x78]
test eax, eax
je 0x1401668d7
mov rax, qword [rdi + 0x90]
mov r14, rax
sub r14, r13
jb 0x140167041
mov qword [rdi + 0x90], 0
test r13, r13
je 0x1401668de
cmp rax, r13
je 0x1401668ea
mov rcx, qword [rdi + 0x80]
lea rdx, [rcx + r13]
mov r8, r14
call sub.msvcrt.dll_memmove
jmp 0x1401668e3
cmp byte [rdi + 0x120], 0
mov rax, qword [rdi + 0xd0]
mov r8d, 0
cmovne r8, rax
test rax, rax
cmove r8, rax
mov rax, qword [rdi + 0x58]
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0xe0], xmm0
lea rax, [rsp + 0xbc]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x128]
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 + 0xe0]
mov rdx, qword [rsp + 0xf8]
mov r9d, 0x9819c
call sub.secur32.dll_InitializeSecurityContextW
mov r13d, eax
mov rcx, qword [rsp + 0x88]
test rcx, rcx
jne 0x140166554
jmp 0x140166559
cmp r14, 1
jbe 0x140167041
mov eax, 1
cmp dword [r12 + 0x14], 4
jne 0x1401667ec
mov eax, dword [r12 + 0x10]
mov qword [rdi + 0xf8], rax
jmp 0x140166ac0
cmp r14, 1
jbe 0x140167041
cmp dword [r12 + 0x14], 5
jne 0x1401667f8
mov rsi, qword [rsp + 0x78]
test rsi, rsi
je 0x14016672f
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0xb8], eax
mov qword [rsp + 0x100], rsi
mov r13, qword [rdi + 0x98]
mov eax, dword [r12 + 0x10]
mov r12, r13
sub r12, rax
cmp r13, r12
jb 0x140167041
je 0x1401669d7
mov rax, qword [rdi + 0x90]
mov r14, rax
sub r14, r12
jb 0x140167041
mov qword [rdi + 0x90], 0
test r12, r12
je 0x1401669ce
cmp rax, r12
je 0x1401669d7
mov rcx, qword [rdi + 0x80]
lea rdx, [rcx + r12]
mov r8, r14
call sub.msvcrt.dll_memmove
jmp 0x140166a69
mov byte [rsp + 0x67], r13b
mov qword [rsp + 0x70], 0
mov rcx, qword [rsp + 0xf8]
mov edx, 0x53
lea r8, [rsp + 0x70]
call sub.secur32.dll_QueryContextAttributesW
test eax, eax
je 0x140166836
test r12b, r12b
jne 0x140166196
jmp 0x140166fea
mov rsi, qword [rdi + 0x98]
mov ebp, dword [rsp + 0x70]
mov eax, 1
mov r12, qword [rsp + 0x78]
mov r13, rsi
jmp 0x1401668ec
mov qword [rdi + 0xf8], rax
jmp 0x140166ac0
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x140166815
mov ecx, dword [rsp + 0x70]
mov dword [rsp + 0xb8], ecx
mov qword [rsp + 0x100], rax
mov qword [rdi + 0x98], 0
mov qword [rdi + 0xf8], 1
jne 0x1401669f6
jmp 0x140166ab2
mov r15, qword [rsp + 0x70]
mov rcx, qword [r15 + 0x20]
test rcx, rcx
je 0x140166b0f
call sub.crypt32.dll_CertDuplicateStore
mov rsi, rax
cmp qword [rdi], 0
je 0x1401668c8
mov rcx, qword [rdi + 8]
xor edx, edx
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
je 0x1401668c8
nop word cs:[rax + rax]
mov rbp, rax
mov rcx, rax
call sub.crypt32.dll_CertDuplicateCertificateContext
mov r14, rax
mov qword [rsp + 0x70], 0
mov rcx, rsi
mov rdx, rbp
mov r8d, 3
lea r9, [rsp + 0x70]
call sub.crypt32.dll_CertAddCertificateContextToStore
test eax, eax
je 0x140166f66
mov rcx, qword [rsp + 0x70]
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, qword [rdi + 8]
mov rdx, r14
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
jne 0x140166870
mov rcx, rsi
xor edx, edx
call sub.crypt32.dll_CertCloseStore
jmp 0x140166b1b
mov eax, 1
jmp 0x1401668ec
cmp rax, r13
je 0x1401668ea
mov qword [rdi + 0x90], r14
xor eax, eax
sub rsi, r13
mov qword [rdi + 0x98], rsi
mov qword [rdi + 0xf8], rax
test ebp, ebp
mov r14d, ebp
mov r13, r12
lea rax, str.combase.dll
cmove r13, rax
mov rax, qword [rdi + 0xa8]
mov rbp, qword [rdi + 0xb0]
sub rax, rbp
cmp rax, r14
jb 0x140166c4b
mov rcx, qword [rdi + 0xa0]
add rcx, rbp
mov rdx, r13
mov r8, r14
call sub.msvcrt.dll_memcpy
add rbp, r14
mov qword [rdi + 0xb0], rbp
mov rcx, r12
call sub.secur32.dll_FreeContextBuffer
jmp 0x140166ac0
mov al, 2
test r13b, r13b
jne 0x1401669a4
lea rcx, [rsp + 0x70]
mov rdx, qword [rsp + 0xf8]
call fcn.1401b6850
cmp dword [rsp + 0x70], 0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x110], rax
jne 0x140167045
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x10c], eax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x140], rax
mov al, 1
mov byte [rdi + 0x40], al
mov eax, dword [rsp + 0x10c]
mov dword [rdi + 0x44], eax
mov rax, qword [rsp + 0x110]
mov qword [rdi + 0x48], rax
mov rax, qword [rsp + 0x140]
mov qword [rdi + 0x50], rax
jmp 0x140166085
cmp rax, r12
jne 0x140166a69
xor eax, eax
sub r13, r12
sete al
mov qword [rdi + 0x98], r13
mov qword [rdi + 0xf8], rax
test rsi, rsi
je 0x140166a8f
mov eax, dword [rsp + 0xb8]
test eax, eax
mov r14d, eax
mov r12, qword [rsp + 0x100]
lea rax, str.combase.dll
cmove r12, rax
mov rax, qword [rdi + 0xa8]
mov r13, qword [rdi + 0xb0]
sub rax, r13
cmp rax, r14
jb 0x140166c69
mov rcx, qword [rdi + 0xa0]
add rcx, r13
mov rdx, r12
mov r8, r14
call sub.msvcrt.dll_memcpy
add r13, r14
mov qword [rdi + 0xb0], r13
mov rcx, qword [rsp + 0x100]
call sub.secur32.dll_FreeContextBuffer
mov r13, qword [rdi + 0x98]
test r13, r13
jne 0x140166a94
jmp 0x140166ab2
xor eax, eax
sub r13, r12
sete al
mov qword [rdi + 0x90], r14
mov qword [rdi + 0x98], r13
mov qword [rdi + 0xf8], rax
test rsi, rsi
jne 0x1401669f6
test r13, r13
je 0x140166ab2
lea rcx, [rsp + 0xe0]
mov rdx, rdi
call fcn.140167060
cmp byte [rsp + 0xe0], 0
jne 0x140166f95
cmp byte [rdi + 0x40], 0
jne 0x140166ac0
mov byte [rdi + 0x42], 0
nop dword [rax]
test r15, r15
je 0x140166ae5
mov r8, qword [rsp + 0xd0]
cmp r15, 0x11
jb 0x140166ad7
mov r8, qword [r8 - 8]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
cmp qword [rsp + 0xa8], 0
je 0x140166085
mov r8, qword [rsp + 0xa0]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x140166085
mov rsi, qword [rdi]
test rsi, rsi
je 0x140166b1b
mov rsi, qword [rdi + 8]
movaps xmmword [rsp + 0x70], xmm6
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x70], 0x20
mov dword [rsp + 0x78], 1
lea rax, [0x14029f0ee]
mov qword [rsp + 0xc0], rax
lea rax, str.1.3.6.1.4.1.311.10.3.3
mov qword [rsp + 0xc8], rax
lea rax, str.2.16.840.1.113730.4.1
mov qword [rsp + 0xd0], rax
mov dword [rsp + 0x80], 3
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0xa0], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xc0000001
xor ecx, ecx
mov rdx, r15
xor r8d, r8d
mov r9, rsi
call sub.crypt32.dll_CertGetCertificateChain
test eax, eax
je 0x140166ffc
mov rbp, qword [rsp + 0xa0]
mov esi, 0xf00
cmp qword [rdi], 0
je 0x140166da6
cmp dword [rbp + 0xc], 0
je 0x140166da6
mov byte [rsp + 0x66], r12b
mov rax, qword [rbp + 0x10]
mov r12, qword [rax]
mov rcx, rbp
call sub.crypt32.dll_CertDuplicateCertificateChain
mov r13, rax
cmp dword [rbp + 0xc], 2
jb 0x140166c87
mov esi, 1
nop word cs:[rax + rax]
mov rax, qword [rbp + 0x10]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call sub.crypt32.dll_CertDuplicateCertificateChain
mov r14, rax
mov rcx, r13
call sub.crypt32.dll_CertFreeCertificateChain
mov eax, dword [rbp + 0xc]
inc rsi
mov r13, r14
cmp rsi, rax
jb 0x140166c20
jmp 0x140166c8a
lea rcx, [rdi + 0xa0]
mov rdx, rbp
mov r8, r14
call fcn.140089e50
mov rbp, qword [rdi + 0xb0]
jmp 0x14016692a
lea rcx, [rdi + 0xa0]
mov rdx, r13
mov r8, r14
call fcn.140089e50
mov r13, qword [rdi + 0xb0]
jmp 0x140166a2f
mov r14, r13
mov rcx, rbp
call sub.crypt32.dll_CertDuplicateCertificateChain
mov qword [rsp + 0x138], rax
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateChain
xor r14d, r14d
mov qword [rsp + 0x118], r15
jmp 0x140166ccd
mov r14, qword [rsp + 0x148]
inc r14
mov rcx, r13
call sub.crypt32.dll_CertFreeCertificateContext
mov rbp, r15
mov r15, qword [rsp + 0x118]
mov eax, dword [r12 + 0xc]
mov esi, 0xf00
cmp r14, rax
jae 0x140166d93
mov rax, qword [r12 + 0x10]
test rax, rax
je 0x140166d93
mov r15, rbp
mov qword [rsp + 0x148], r14
mov rax, qword [rax + r14*8]
mov rcx, qword [rax + 8]
call sub.crypt32.dll_CertDuplicateCertificateContext
mov r13, rax
mov rcx, qword [rdi + 8]
xor edx, edx
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
je 0x140166caf
nop dword [rax]
mov r14, rax
mov rcx, rax
call sub.crypt32.dll_CertDuplicateCertificateContext
mov rbp, rax
mov r8d, dword [r14 + 0x10]
cmp r8d, dword [r13 + 0x10]
jne 0x140166d69
mov rdx, qword [r13 + 8]
mov rcx, qword [r14 + 8]
call sub.msvcrt.dll_memcmp
mov esi, eax
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateContext
test esi, esi
je 0x140166d73
mov rcx, qword [rdi + 8]
mov rdx, rbp
call sub.crypt32.dll_CertEnumCertificatesInStore
test rax, rax
jne 0x140166d20
jmp 0x140166caf
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateContext
jmp 0x140166d53
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, r13
call sub.crypt32.dll_CertFreeCertificateContext
mov esi, 0xf10
mov rbp, r15
mov r15, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x138]
call sub.crypt32.dll_CertFreeCertificateChain
movzx r12d, byte [rsp + 0x66]
lea rax, [rsp + 0xa8]
movups xmmword [rax], xmm6
movabs rax, 0x200000018
mov qword [rsp + 0xa0], rax
mov rax, qword [rdi + 0xd0]
test rax, rax
je 0x140166de0
cmp byte [rdi + 0x121], 0
jne 0x140166de0
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0xe0], 0x10
mov dword [rsp + 0xe4], esi
lea rax, [rsp + 0xa0]
mov qword [rsp + 0xe8], rax
movaps xmmword [rsp + 0xc0], xmm6
mov qword [rsp + 0xd0], 0
mov dword [rsp + 0xc0], 0x18
mov ecx, 4
mov rdx, rbp
lea r8, [rsp + 0xe0]
lea r9, [rsp + 0xc0]
call sub.crypt32.dll_CertVerifyCertificateChainPolicy
test eax, eax
je 0x14016700e
mov r13d, dword [rsp + 0xc4]
mov rax, qword [rdi + 0xe8]
test rax, rax
je 0x140166e9d
mov r8, qword [rdi + 0xf0]
mov rcx, qword [r8 + 0x10]
dec rcx
and rcx, 0xfffffffffffffff0
add rcx, rax
add rcx, 0x10
mov qword [rsp + 0x70], rbp
mov dword [rsp + 0x78], r13d
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x7c], rax
lea rdx, [rsp + 0x70]
call qword [r8 + 0x28]
test rax, rax
je 0x140166eae
jmp 0x140167028
test r13d, r13d
jne 0x140167016
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateChain
mov rcx, r15
call sub.crypt32.dll_CertFreeCertificateContext
cmp byte [rdi + 0x40], 0
movzx r13d, byte [rsp + 0x67]
jne 0x14016618d
mov rax, qword [rsp + 0x120]
mov byte [rax], 1
jmp 0x14016618d
movabs rax, 0xd00000003
mov rsi, qword [rsp + 0x68]
mov qword [rsi + 8], rax
jmp 0x140166ef4
mov rsi, qword [rsp + 0x68]
mov qword [rsi + 8], rdx
mov eax, 2
mov dword [rsi], eax
movaps xmm6, xmmword [rsp + 0x160]
add rsp, 0x178
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp eax, 1
jne 0x140166f3d
mov rcx, qword [rsp + 0x120]
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 0x140166ef9
xor eax, eax
mov rsi, qword [rsp + 0x68]
jmp 0x140166ef9
lea rdx, [0x14029f0cf]
mov r8d, 0x1f
mov cl, 0x25
call fcn.14016d3b0
jmp 0x140166ee0
shl r13, 0x20
or r13, 2
jmp 0x140166f9d
call sub.kernel32.dll_GetLastError
mov r13d, eax
shl r13, 0x20
or r13, 2
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, r14
call sub.crypt32.dll_CertFreeCertificateContext
mov rcx, rsi
xor edx, edx
call sub.crypt32.dll_CertCloseStore
jmp 0x14016702b
mov r13, qword [rsp + 0xe8]
test r15, r15
mov rsi, qword [rsp + 0x68]
je 0x140166fc7
mov r8, qword [rsp + 0xd0]
cmp r15, 0x11
jb 0x140166fb9
mov r8, qword [r8 - 8]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
cmp qword [rsp + 0xa8], 0
je 0x140167038
mov r8, qword [rsp + 0xa0]
mov rcx, qword [0x1402d9150]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x140167038
mov r13d, eax
shl r13, 0x20
or r13, 2
mov rsi, qword [rsp + 0x68]
jmp 0x140167038
call sub.kernel32.dll_GetLastError
mov r13d, eax
shl r13, 0x20
or r13, 2
jmp 0x14016702b
call sub.kernel32.dll_GetLastError
mov r13d, eax
shl r13, 0x20
or r13, 2
mov rcx, rbp
call sub.crypt32.dll_CertFreeCertificateChain
jmp 0x14016702b
mov r13, rax
mov rsi, qword [rsp + 0x68]
mov rcx, r15
call sub.crypt32.dll_CertFreeCertificateContext
mov qword [rsi + 8], r13
jmp 0x140166ef4
ud2
mov rsi, qword [rsp + 0x68]
mov rax, qword [rsp + 0x110]
jmp 0x140166ee5