Function at 0x14005ba50
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xe8]
sub rsp, 0x1e8
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rbp + 0xd0], rax
mov r14, r9
movzx r15d, r8b
mov rbx, rcx
mov r13, qword [rbp + 0x150]
mov rdi, qword [rbp + 0x158]
xor r12d, r12d
mov qword [r9], r12
mov qword [r13], r12
mov qword [rdi + 0x10], r12
cmp qword [rdi + 0x18], 8
jb 0x14005bab7
mov rax, qword [rdi]
jmp 0x14005baba
mov rax, rdi
mov word [rax], r12w
mov rcx, qword [rdx + 0x10]
test rcx, rcx
sete al
test al, al
jne 0x14005bb63
mov dword [rbp + 0xc0], r12d
mov qword [rsp + 0x60], r12
cmp qword [rdx + 0x18], 0x10
jb 0x14005bae6
mov rdx, qword [rdx]
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, ecx
call fcn.14005c6a0
test al, al
jne 0x14005bb6a
lea rdx, str.Failed_to_parse_key
lea rcx, [rbp - 0x50]
call fcn.14004a840
nop
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.14005c780
mov rbx, rax
cmp rdi, rax
je 0x14005bb4a
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140023400
mov rdx, rbx
mov rcx, rdi
call fcn.140022fc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x40]
call fcn.140023400
nop
lea rcx, [rbp - 0x50]
call fcn.140047e70
xor al, al
jmp 0x14005bffc
cmp qword [rbx + 8], r12
jne 0x14005bc75
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbx + 8]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14005bc75
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0xc0], eax
mov edx, eax
lea rcx, [rbp - 0x78]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_acquire_context:__1_x:__2_
lea rcx, [rbp - 0x50]
call fcn.14004a840
nop
lea rcx, [rbp + 0xc0]
mov qword [rsp + 0x40], rcx
lea rcx, [fcn.140005730]
mov qword [rsp + 0x48], rcx
lea rcx, [0x14005c7e0]
mov qword [rsp + 0x50], rcx
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.14004ba20
mov qword [rsp + 0x40], rbx
lea rcx, [fcn.140005730]
mov qword [rsp + 0x48], rcx
lea rcx, [0x14004baa0]
mov qword [rsp + 0x50], rcx
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.14004ba20
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.140023400
nop
lea rcx, [rbp - 0x50]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x78]
call fcn.140023400
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor al, al
jmp 0x14005bffc
mov dword [rbp + 0xc4], r12d
mov esi, shutdown
mov eax, 0x2b
test r15b, r15b
cmovne esi, eax
lea rax, [rbp + 0xc4]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
mov r9d, dword [rbp + 0xc0]
mov r15, qword [rsp + 0x60]
mov r8, r15
mov edx, esi
mov ecx, 0x10001
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x14005bd98
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0xc0], eax
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_decode_blob:__1_x:__2_
lea rcx, [rbp - 0x50]
call fcn.14004a840
nop
lea rcx, [rbp + 0xc0]
mov qword [rsp + 0x40], rcx
lea rcx, [fcn.140005730]
mov qword [rsp + 0x48], rcx
lea rcx, [0x14005c7e0]
mov qword [rsp + 0x50], rcx
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.14004ba20
mov qword [rsp + 0x40], rbx
lea rcx, [fcn.140005730]
mov qword [rsp + 0x48], rcx
lea rcx, [0x14004baa0]
mov qword [rsp + 0x50], rcx
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.14004ba20
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x78]
call fcn.140023400
nop
lea rcx, [rbp - 0x50]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.140023400
xor al, al
jmp 0x14005bffc
mov edx, dword [rbp + 0xc4]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
lea rax, [rbp + 0xc4]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
xor eax, eax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
mov r9d, dword [rbp + 0xc0]
mov r8, r15
mov rdx, rsi
mov ecx, 0x10001
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x14005be5c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0xc0], eax
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_decode_blob:__1_x:__2_
lea rcx, [rbp - 0x50]
call fcn.14004a840
nop
lea rdx, [rbp + 0xc0]
mov rcx, rax
call fcn.14005c7b0
mov rcx, rax
mov rdx, rbx
call fcn.14004bab0
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x78]
call fcn.140023400
nop
lea rcx, [rbp - 0x50]
call fcn.140047e70
nop
jmp 0x14005bd82
mov qword [rsp + 0x28], r14
xor esi, esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
mov r8d, dword [rbp + 0xc4]
mov rdx, r12
mov rcx, qword [rbx + 8]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x14005bf19
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0xc0], eax
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_import_key:__1_x:__2_
lea rcx, [rbp - 0x50]
call fcn.14004a840
nop
lea rdx, [rbp + 0xc0]
mov rcx, rax
call fcn.14005c7b0
mov rcx, rax
mov rdx, rbx
call fcn.14004bab0
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x78]
call fcn.140023400
nop
lea rcx, [rbp - 0x50]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.140023400
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14005bb63
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [rbp + 0xc8], esi
mov dword [rbp + 0xcc], 4
mov dword [rsp + 0x20], esi
lea r9, [rbp + 0xcc]
lea r8, [rbp + 0xc8]
mov edx, 8
mov rcx, qword [r14]
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
test eax, eax
jne 0x14005bff0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0xc0], eax
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_get_key_length:__1_x:__2_
lea rcx, [rbp - 0x50]
call fcn.14004a840
nop
lea rdx, [rbp + 0xc0]
mov rcx, rax
call fcn.14005c7b0
mov rcx, rax
mov rdx, rbx
call fcn.14004bab0
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x78]
call fcn.140023400
nop
lea rcx, [rbp - 0x50]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.140023400
mov rcx, qword [r14]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [r14], rsi
jmp 0x14005bb63
mov eax, dword [rbp + 0xc8]
mov qword [r13], rax
mov al, 1
mov rcx, qword [rbp + 0xd0]
xor rcx, rsp
call fcn.140062f80
add rsp, 0x1e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret