Function at 0x140005dc8
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov dword [rbp + 0x20], r8d
mov dword [rbp + 0x28], r9d
mov dword [rbp - 4], 0
mov dword [rbp - 0x34], 0
call fcn.140005a80
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x1400061a7
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp + 0x38]
mov dword [rsp + 0x20], 8
mov r9d, 0x18
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
call rax
test eax, eax
je 0x140006197
mov qword [rbp - 0x40], 0
mov rax, qword [rbp + 0x38]
mov rax, qword [rax]
lea rdx, [rbp - 0x40]
mov r9, rdx
mov r8d, 0x2000001
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptGenKey]
call rax
test eax, eax
je 0x140006169
mov rax, qword [rbp - 0x40]
lea rdx, [rbp - 0x34]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 7
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptExportKey]
call rax
test eax, eax
je 0x140006169
mov eax, dword [rbp - 0x34]
mov eax, eax
mov rdx, rax
mov ecx, 0x40
mov rax, qword [sym.imp.KERNEL32.dll_LocalAlloc]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x140006169
mov rax, qword [rbp - 0x40]
lea rdx, [rbp - 0x34]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rbp - 0x18]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 7
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptExportKey]
call rax
test eax, eax
je 0x140006159
mov rax, qword [rbp - 0x40]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
mov qword [rbp - 0x40], 0
mov rax, qword [rbp - 0x18]
add rax, 8
mov eax, dword [rax + 4]
shr eax, 3
mov dword [rbp - 0x1c], eax
mov rax, qword [rbp - 0x18]
add rax, 8
mov dword [rax + 8], 1
mov rax, qword [rbp - 0x18]
add rax, 0x14
mov qword [rbp - 0x28], rax
mov eax, dword [rbp - 0x1c]
add eax, eax
mov eax, eax
add qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov byte [rax], 1
mov eax, dword [rbp - 0x1c]
shr eax, 1
sub eax, 1
mov edx, eax
mov rax, qword [rbp - 0x28]
add rax, 1
mov r8, rdx
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
mov eax, dword [rbp - 0x1c]
shr eax, 1
mov eax, eax
add qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov byte [rax], 1
mov eax, dword [rbp - 0x1c]
shr eax, 1
sub eax, 1
mov edx, eax
mov rax, qword [rbp - 0x28]
add rax, 1
mov r8, rdx
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
mov eax, dword [rbp - 0x1c]
add qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov byte [rax], 1
mov eax, dword [rbp - 0x1c]
shr eax, 1
sub eax, 1
mov edx, eax
mov rax, qword [rbp - 0x28]
add rax, 1
mov r8, rdx
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
mov r8d, dword [rbp - 0x34]
mov rax, qword [rbp + 0x38]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x18]
lea rcx, [rbp - 0x40]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptImportKey]
call rax
test eax, eax
je 0x140006159
mov dword [rbp - 0x34], 0x4c
mov eax, dword [rbp - 0x34]
mov eax, eax
mov rdx, rax
mov ecx, 0x40
mov rax, qword [sym.imp.KERNEL32.dll_LocalAlloc]
call rax
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
je 0x140006159
mov rax, qword [rbp - 0x30]
mov byte [rax], 1
mov rax, qword [rbp - 0x30]
mov byte [rax + 1], 2
mov rax, qword [rbp - 0x30]
mov word [rax + 2], 0
mov rax, qword [rbp - 0x30]
mov edx, dword [rbp + 0x10]
mov dword [rax + 4], edx
mov rax, qword [rbp - 0x30]
add rax, 8
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov dword [rax], 0xa400
add qword [rbp - 0x28], 4
mov dword [rbp - 8], 0
jmp 0x1400060af
mov eax, dword [rbp + 0x20]
sub eax, dword [rbp - 8]
sub eax, 1
mov edx, eax
mov rax, qword [rbp + 0x18]
add rax, rdx
mov ecx, dword [rbp - 8]
mov rdx, qword [rbp - 0x28]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
add dword [rbp - 8], 1
mov eax, dword [rbp - 8]
cmp eax, dword [rbp + 0x20]
jb 0x14000608a
mov eax, dword [rbp + 0x20]
add eax, 1
mov eax, eax
add qword [rbp - 0x28], rax
mov dword [rbp - 8], 0
jmp 0x1400060ee
mov edx, dword [rbp - 8]
mov rax, qword [rbp - 0x28]
add rax, rdx
movzx eax, byte [rax]
test al, al
jne 0x1400060ea
mov edx, dword [rbp - 8]
mov rax, qword [rbp - 0x28]
add rax, rdx
mov byte [rax], 0x42
add dword [rbp - 8], 1
mov edx, dword [rbp - 8]
mov eax, dword [rbp - 0x34]
mov ecx, eax
mov eax, dword [rbp + 0x20]
sub rcx, rax
lea rax, [rcx - 0xf]
cmp rdx, rax
jb 0x1400060cc
mov eax, dword [rbp - 0x34]
sub eax, 2
mov edx, eax
mov rax, qword [rbp - 0x30]
add rax, rdx
mov byte [rax], 2
mov r9, qword [rbp - 0x40]
mov r8d, dword [rbp - 0x34]
mov rax, qword [rbp + 0x38]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x30]
mov rcx, qword [rbp + 0x30]
mov qword [rsp + 0x28], rcx
mov ecx, dword [rbp + 0x28]
mov dword [rsp + 0x20], ecx
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptImportKey]
call rax
mov dword [rbp - 4], eax
mov rax, qword [rbp - 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LocalFree]
call rax
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LocalFree]
call rax
mov rax, qword [rbp - 0x40]
test rax, rax
je 0x140006182
mov rax, qword [rbp - 0x40]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
cmp dword [rbp - 4], 0
jne 0x140006197
mov rax, qword [rbp + 0x38]
mov rax, qword [rax]
mov rcx, rax
call fcn.140005c83
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LocalFree]
call rax
mov eax, dword [rbp - 4]
add rsp, 0x70
pop rbp
ret