Function at 0x140379928
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
xor r13d, r13d
mov rsi, rdx
mov dword [rbp + 0x48], r13d
mov rdi, rcx
mov dword [rbp - 0x10], r13d
mov r15d, r13d
mov dword [rbp + 0x58], r13d
mov r12d, r13d
mov dword [rbp + 0x50], r13d
mov r14d, r13d
test rdx, rdx
jne 0x140379970
mov ebx, 0x80070057
jmp 0x140379cbe
mov rbx, qword [rcx + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rdi + 0x10]
mov qword [rdi + 0x20], r13
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rdi + 0x30]
mov qword [rdi + 0x10], r13
mov dword [rdi + 0x18], r13d
test rcx, rcx
je 0x1403799bf
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rdi + 0x30], r13
cmp qword [rdi + 0x38], r13
jne 0x140379a03
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetElement
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
lea rcx, [rdi + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140379a03
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140379cbe
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
mov rax, 0xffffffffffffffff
cmovo rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
jne 0x140379a6c
mov ebx, 0x8007000e
jmp 0x140379cbe
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r15
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x58]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov ecx, dword [rbp + 0x58]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
mov rax, 0xffffffffffffffff
cmovo rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
test rax, rax
je 0x140379a62
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x58]
mov r8, r12
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov ecx, dword [rbp + 0x58]
lea r8, [rbp + 0x48]
dec ecx
xor r9d, r9d
mov rdx, r12
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140379cbe
cmp dword [rbp + 0x48], 4
jbe 0x140379b55
mov ebx, 0x80049e2e
jmp 0x140379cbe
mov eax, dword [rbp + 0x48]
lea r9, [rbp - 0xc]
mov ecx, dword [rbp + 0x58]
lea r8, [rbp + 0x48]
sub r9, rax
mov rdx, r12
dec ecx
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140379cbe
lea edx, [rax + 4]
lea rcx, [rbp - 0x10]
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x48]
mov eax, dword [rbp - 0x10]
dec ecx
xor r9d, r9d
mov dword [rdi + 0x2c], eax
mov rdx, r15
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov ebx, dword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x140379a62
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x48]
dec ecx
mov r9, rax
mov rdx, r15
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov esi, dword [rbp + 0x48]
mov dword [rdi + 0x28], esi
lea ebx, [rsi + 0x14]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x140379a62
mov r8d, ebx
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov eax, esi
mov dword [r14], 0x206
shl eax, 3
lea r13, [r14 + 0x14]
mov dword [r14 + 0xc], eax
lea r8, [rbp + 0x48]
mov eax, dword [rbp - 0x10]
mov r9, r13
mov dword [r14 + 0x10], eax
mov rdx, r15
mov dword [r14 + 4], 0xa400
mov dword [r14 + 8], 0x31415352
mov ecx, dword [rbp + 0x50]
dec ecx
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140379cbe
test r13, r13
je 0x140379966
mov edx, esi
mov rcx, r13
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x140379cbe
mov rcx, qword [rdi + 0x38]
lea rax, [rdi + 0x30]
mov qword [rsp + 0x28], rax
lea r8d, [rsi + 0x14]
xor r9d, r9d
mov dword [rsp + 0x20], 0x40
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x1403799ea
mov dword [rdi + 0xc], 5
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret