Function at 0x140387308
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x68
xor r12d, r12d
mov r14, rdx
mov qword [rbp - 0x28], r12
mov rdi, rcx
mov qword [rbp - 0x20], r12
mov esi, r12d
mov dword [rbp + 0x50], r12d
mov r13d, r12d
mov dword [rbp + 0x60], r12d
mov dword [rbp - 0x38], r12d
mov dword [rbp + 0x58], r12d
mov dword [rbp - 0x34], r12d
test rdx, rdx
jne 0x14038735a
mov ebx, 0x80070057
jmp 0x1403876d8
lea rax, [rcx + 0x38]
mov qword [rbp - 0x18], rax
cmp qword [rax], r12
jne 0x1403873a4
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetElement
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1403873a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1403876d8
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x60]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov ecx, dword [rbp + 0x60]
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 qword [rbp - 0x28], rax
test rax, rax
jne 0x14038740e
mov ebx, 0x8007000e
jmp 0x1403876d8
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov r15, qword [rbp - 0x28]
lea rdx, [rbp + 0x60]
mov r8, r15
mov rax, rbx
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov rax, qword [r14]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x38]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov ecx, dword [rbp - 0x38]
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 qword [rbp - 0x20], rax
test rax, rax
je 0x140387404
mov rax, qword [r14]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov r12, qword [rbp - 0x20]
lea rdx, [rbp - 0x38]
mov r8, r12
mov rax, rbx
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov ecx, dword [rbp - 0x38]
lea r8, [rbp + 0x58]
dec ecx
xor r9d, r9d
mov rdx, r12
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov eax, dword [rbp + 0x58]
lea r9, [rbp - 0x30]
mov ecx, dword [rbp - 0x38]
lea r8, [rbp + 0x58]
sub r9, rax
mov rdx, r12
dec ecx
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d8
lea r8d, [rax + 4]
lea rdx, [rbp - 0x34]
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov r12d, dword [rbp - 0x34]
mov rbx, qword [rdi + 0x20]
mov dword [rdi + 0x2c], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [rbp + 0x60]
lea r8, [rbp + 0x58]
and qword [rdi + 0x20], rsi
xor r9d, r9d
dec ecx
mov rdx, r15
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov ebx, dword [rbp + 0x58]
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 0x140387404
mov ecx, dword [rbp + 0x60]
lea r8, [rbp + 0x58]
dec ecx
mov r9, rax
mov rdx, r15
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov r13d, dword [rbp + 0x58]
mov r15d, r13d
mov dword [rdi + 0x28], r13d
shr r15d, 1
lea eax, [r15 + 4]
lea ecx, [rax + rax*4]
lea eax, [rcx + r13*2]
mov dword [rbp - 0x34], eax
mov ebx, eax
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 [rbp - 0x30], rax
test rax, rax
jne 0x1403875f8
mov ebx, 0x8007000e
mov r13, rax
jmp 0x1403876d8
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_memset
mov rdx, qword [rbp - 0x28]
lea eax, [r13*8]
mov dword [rbx + 0xc], eax
lea rdi, [rbx + 0x14]
mov dword [rbx], 0x207
lea r8, [rbp + 0x58]
mov dword [rbx + 4], 0xa400
mov r9, rdi
mov dword [rbx + 8], 0x32415352
mov dword [rbx + 0x10], r12d
mov ecx, dword [rbp + 0x60]
dec ecx
call fcn.140315110
xor r12d, r12d
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r13d
mov rdx, rdi
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x1403876d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [r14]
mov rbx, qword [rax + 0x30]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
lea rax, [r12 - 1]
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 rsi, rax
test rax, rax
jne 0x14038773e
mov ebx, 0x8007000e
mov r13, qword [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp - 0x28]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp - 0x20]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rax, qword [r14]
mov rbx, qword [rax + 0x30]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, rsi
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r13
mov dword [rbp + 0x58], r15d
dec ecx
mov r9, rdi
mov rdx, rsi
mov r12, r13
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r15d
mov rdx, rdi
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x1403876d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov esi, eax
mov rax, qword [r14]
mov rbx, qword [rax + 0x38]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea eax, [rsi + 2]
mul rcx
mov rbx, rax
lea rax, [rsi - 1]
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 rsi, rax
test rax, rax
je 0x1403876cf
mov rax, qword [r14]
mov rbx, qword [rax + 0x38]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, rsi
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
shr r12, 1
mov rdx, rsi
add rdi, r12
dec ecx
mov r9, rdi
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r15d
mov rdx, rdi
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x1403876d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov esi, eax
mov rax, qword [r14]
mov rbx, qword [rax + 0x40]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea eax, [rsi + 2]
mul rcx
mov rbx, rax
lea rax, [rsi - 1]
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 rsi, rax
test rax, rax
je 0x1403876cf
mov rax, qword [r14]
mov rbx, qword [rax + 0x40]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, rsi
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, rsi
dec ecx
mov r9, rdi
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r15d
mov rdx, rdi
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x1403876d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov esi, eax
mov rax, qword [r14]
mov rbx, qword [rax + 0x48]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea eax, [rsi + 2]
mul rcx
mov rbx, rax
lea rax, [rsi - 1]
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 rsi, rax
test rax, rax
je 0x1403876cf
mov rax, qword [r14]
mov rbx, qword [rax + 0x48]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, rsi
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, rsi
dec ecx
mov r9, rdi
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r15d
mov rdx, rdi
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x1403876d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov esi, eax
mov rax, qword [r14]
mov rbx, qword [rax + 0x50]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea eax, [rsi + 2]
mul rcx
mov rbx, rax
lea rax, [rsi - 1]
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 rsi, rax
test rax, rax
je 0x1403876cf
mov rax, qword [r14]
mov rbx, qword [rax + 0x50]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, rsi
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, rsi
dec ecx
mov r9, rdi
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r15d
mov rdx, rdi
call fcn.140387c38
xor r15d, r15d
mov ebx, eax
test eax, eax
jne 0x1403876d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [r14]
mov esi, r15d
mov rbx, qword [rax + 0x58]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
lea rax, [r15 - 1]
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 rsi, rax
test rax, rax
je 0x1403876cf
mov rax, qword [r14]
mov rbx, qword [rax + 0x58]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, rsi
mov rcx, r14
call rax
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov dword [rbp + 0x58], r13d
dec ecx
mov r9, rdi
mov rdx, rsi
call fcn.140315110
mov ebx, eax
test eax, eax
jne 0x1403876d4
mov r8d, r13d
mov rdx, rdi
call fcn.140387c38
mov r13, qword [rbp - 0x30]
mov ebx, eax
test eax, eax
jne 0x1403876d8
mov rcx, qword [rbp - 0x18]
xor r9d, r9d
mov rax, qword [rbp + 0x48]
mov rdx, r13
mov r8d, dword [rbp - 0x34]
add rax, 0x30
mov qword [rsp + 0x28], rax
mov rcx, qword [rcx]
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1403876d8
jmp 0x14038738b