Function at 0x1403582cc
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 rsi, rdx
mov qword [rbp - 0x28], r12
mov rdi, rcx
mov qword [rbp - 0x20], r12
mov r14d, 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 0x14035831e
mov ebx, 0x80070057
jmp 0x140358601
lea rax, [rcx + 0x38]
mov qword [rbp - 0x18], rax
cmp qword [rax], r12
jne 0x140358368
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 0x140358368
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140358601
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x60]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140358601
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 0x1403583cc
mov ebx, 0x8007000e
jmp 0x140358601
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [0x1403a2250]
mov r15, qword [rbp - 0x28]
lea rdx, [rbp + 0x60]
mov r8, r15
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140358601
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp - 0x38]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140358601
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 0x1403583c2
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403a2250]
mov r12, qword [rbp - 0x20]
lea rdx, [rbp - 0x38]
mov r8, r12
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140358601
mov ecx, dword [rbp - 0x38]
lea r8, [rbp + 0x58]
dec ecx
xor r9d, r9d
mov rdx, r12
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x140358601
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.1402f1e60
mov ebx, eax
test eax, eax
jne 0x140358601
lea edx, [rax + 4]
lea rcx, [rbp - 0x34]
call fcn.140358bd8
mov ebx, eax
test eax, eax
jne 0x140358601
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], r13
xor r9d, r9d
dec ecx
mov rdx, r15
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x140358601
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 0x1403583c2
mov ecx, dword [rbp + 0x60]
lea r8, [rbp + 0x58]
dec ecx
mov r9, rax
mov rdx, r15
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x140358601
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 0x1403585a0
mov ebx, 0x8007000e
mov r13, rax
jmp 0x140358601
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_memset
mov rdx, qword [rbp - 0x28]
lea rdi, [rbx + 0x14]
mov dword [rbx], 0x207
lea r8, [rbp + 0x58]
mov dword [rbx + 4], 0xa400
mov eax, r13d
shl eax, 3
mov r9, rdi
mov dword [rbx + 0xc], eax
mov dword [rbx + 8], 0x32415352
mov dword [rbx + 0x10], r12d
mov ecx, dword [rbp + 0x60]
dec ecx
call fcn.1402f1e60
xor r12d, r12d
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
jne 0x140358666
mov ebx, 0x80070057
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, r14
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 edx, r13d
mov rcx, rdi
call fcn.140358bd8
mov ebx, eax
test eax, eax
jne 0x1403585fd
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 [rsi]
mov rbx, qword [rax + 0x30]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
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 r14, rax
test rax, rax
jne 0x1403586ee
mov ebx, 0x8007000e
jmp 0x1403585fd
mov rax, qword [rsi]
mov rbx, qword [rax + 0x30]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r13
mov dword [rbp + 0x58], r15d
dec ecx
mov r9, rdi
mov rdx, r14
mov r12, r13
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
je 0x1403585f8
mov edx, r15d
mov rcx, rdi
call fcn.140358bd8
mov ebx, eax
test eax, eax
jne 0x1403585fd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov r14d, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x38]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
lea rax, [r14 - 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 r14, rax
test rax, rax
je 0x1403586e4
mov rax, qword [rsi]
mov rbx, qword [rax + 0x38]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
shr r12, 1
mov rdx, r14
add rdi, r12
dec ecx
mov r9, rdi
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
je 0x1403585f8
mov edx, r15d
mov rcx, rdi
call fcn.140358bd8
mov ebx, eax
test eax, eax
jne 0x1403585fd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov r14d, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x40]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
lea rax, [r14 - 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 r14, rax
test rax, rax
je 0x1403586e4
mov rax, qword [rsi]
mov rbx, qword [rax + 0x40]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, r14
dec ecx
mov r9, rdi
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
je 0x1403585f8
mov edx, r15d
mov rcx, rdi
call fcn.140358bd8
mov ebx, eax
test eax, eax
jne 0x1403585fd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov r14d, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x48]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
lea rax, [r14 - 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 r14, rax
test rax, rax
je 0x1403586e4
mov rax, qword [rsi]
mov rbx, qword [rax + 0x48]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, r14
dec ecx
mov r9, rdi
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
je 0x1403585f8
mov edx, r15d
mov rcx, rdi
call fcn.140358bd8
mov ebx, eax
test eax, eax
jne 0x1403585fd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov r14d, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x50]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
mov rbx, rax
lea rax, [r14 - 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 r14, rax
test rax, rax
je 0x1403586e4
mov rax, qword [rsi]
mov rbx, qword [rax + 0x50]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, r14
dec ecx
mov r9, rdi
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
je 0x1403585f8
mov edx, r15d
mov rcx, rdi
call fcn.140358bd8
xor r15d, r15d
mov ebx, eax
test eax, eax
jne 0x1403585fd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsi]
mov r14d, r15d
mov rbx, qword [rcx + 0x58]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
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 r14, rax
test rax, rax
je 0x1403586e4
mov rax, qword [rsi]
mov rbx, qword [rax + 0x58]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x1403585fd
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov dword [rbp + 0x58], r13d
dec ecx
mov r9, rdi
mov rdx, r14
call fcn.1402f1e60
mov ebx, eax
test eax, eax
jne 0x1403585fd
test rdi, rdi
je 0x1403585f8
mov edx, r13d
mov rcx, rdi
call fcn.140358bd8
mov r13, qword [rbp - 0x30]
mov ebx, eax
test eax, eax
jne 0x140358601
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 0x140358601
jmp 0x14035834f