Function at 0x140040e20
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
xor r13d, r13d
mov r12, rcx
xor ecx, ecx
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
mov edi, r13d
mov esi, r13d
mov r14d, r13d
mov qword [rsp + 0x70], r13
mov ebx, r13d
mov r15, rdx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x30], r13
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov eax, r13d
cmp rcx, 0xffffffffffffffff
setne al
test eax, eax
je 0x1400411d8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [0x14005ac48], rbx
jne 0x140040fb0
lea rcx, str.crypt32.dll
xor edx, edx
call fcn.140040be0
mov qword [0x14005ac48], rax
test rax, rax
je 0x140040fb0
lea rdx, str.CryptMsgClose
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CertCloseStore
mov qword [0x14005ac50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CertFreeCertificateContext
mov qword [0x14005ac58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CertFindCertificateInStore
mov qword [0x14005ac60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CryptMsgGetParam
mov qword [0x14005ac68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CryptQueryObject
mov qword [0x14005ac70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CertGetNameStringA
mov qword [0x14005ac78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14005ac48]
lea rdx, str.CryptDecodeObject
mov qword [0x14005ac80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
mov qword [0x14005ac88], rax
jmp 0x140040fb7
mov rcx, qword [0x14005ac88]
cmp qword [0x14005ac50], rbx
je 0x1400411d4
cmp qword [0x14005ac58], rbx
je 0x1400411d4
cmp qword [0x14005ac60], rbx
je 0x1400411d4
cmp qword [0x14005ac68], rbx
je 0x1400411d4
cmp qword [0x14005ac70], rbx
je 0x1400411d4
mov rax, qword [0x14005ac78]
test rax, rax
je 0x1400411d4
cmp qword [0x14005ac80], rbx
je 0x1400411d4
test rcx, rcx
je 0x1400411d4
mov qword [rsp + 0x50], r13
lea rcx, [rsp + 0x68]
mov r9d, 2
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x60]
mov r8d, 0x400
mov qword [rsp + 0x40], rcx
lea rcx, [rbp + 0xa8]
mov rdx, r12
mov qword [rsp + 0x38], rcx
lea rcx, [rsp + 0x7c]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x28], rcx
lea ecx, [r9 - 1]
mov dword [rsp + 0x20], r13d
call rax
mov ebx, eax
test eax, eax
jne 0x140041082
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400411e3
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
lea rax, [rbp + 0xa0]
lea edx, [r9 + 6]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [0x14005ac70]
mov ebx, eax
test eax, eax
jne 0x1400410b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400411e3
mov edx, dword [rbp + 0xa0]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
jne 0x1400410d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400411e3
mov rcx, qword [rsp + 0x68]
xor r8d, r8d
lea rax, [rbp + 0xa0]
lea edx, [r8 + 6]
mov r9, rdi
mov qword [rsp + 0x20], rax
call qword [0x14005ac70]
mov ebx, eax
test eax, eax
jne 0x14004110a
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400411e3
movups xmm0, xmmword [rdi + 8]
mov rcx, qword [rsp + 0x60]
lea rax, [rbp - 0x80]
mov r9d, 0xb0000
xor r8d, r8d
mov edx, 0x10001
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rax
movaps xmmword [rbp - 0x50], xmm0
movups xmm0, xmmword [rdi + 0x18]
movups xmmword [rbp - 0x78], xmm0
call qword [0x14005ac68]
mov rsi, rax
test rax, rax
jne 0x140041154
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400411e3
test r15, r15
je 0x14004116e
mov rcx, rax
call fcn.14003f560
mov dword [r15], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400411e3
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.14003f430
mov r14, qword [rsp + 0x70]
test eax, eax
je 0x1400411e3
movups xmm0, xmmword [r14 + 8]
mov rcx, qword [rsp + 0x60]
lea rax, [rbp - 0x80]
mov r9d, 0xb0000
xor r8d, r8d
mov edx, 0x10001
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rax
movaps xmmword [rbp - 0x50], xmm0
movups xmm0, xmmword [r14 + 0x18]
movups xmmword [rbp - 0x78], xmm0
call qword [0x14005ac68]
mov rsi, rax
test rax, rax
jne 0x1400411cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400411e3
mov ebx, 1
jmp 0x1400411e3
xor eax, eax
jmp 0x140041227
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rsi, rsi
je 0x140041203
mov rcx, rsi
call qword [0x14005ac60]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140041215
xor edx, edx
call qword [0x14005ac58]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140041225
call qword [0x14005ac50]
mov eax, ebx
mov rbx, qword [rsp + 0x190]
add rsp, 0x150
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret