Function at 0x140003fd0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 8], ecx
push rbx
push rbp
push rdi
push r15
sub rsp, 0x68
mov ebp, r8d
mov r15, rdx
xor ebx, ebx
call fcn.140012760
mov qword [rsp + 0x40], rax
mov rdi, rax
test rax, rax
je 0x1400042a2
mov qword [rsp + 0x60], r12
lea r9d, [rbx + 0x18]
mov r12, qword [rsp + 0xb8]
xor r8d, r8d
mov rcx, r12
mov dword [rsp + 0x20], 8
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004294
mov rcx, qword [r12]
lea r9, [rsp + 0x38]
lea edx, [rbx + 1]
mov qword [rsp + 0x38], rbx
mov r8d, 0x2000001
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140004277
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r8d, [rbx + 7]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140004277
mov edx, dword [rsp + 0x30]
lea ecx, [rbx + 0x40]
mov qword [rsp + 0x58], r13
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
test rax, rax
je 0x140004272
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r8d, [rbx + 7]
xor r9d, r9d
mov qword [rsp + 0x20], r13
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140004269
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x50], r14
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rsp + 0x38], rbx
xor edx, edx
mov edi, dword [r13 + 0xc]
shr edi, 3
mov eax, edi
mov dword [r13 + 0x10], 1
shr eax, 1
dec eax
lea r14d, [rdi + rdi]
mov r8d, eax
add r14, 0x14
mov esi, eax
add r14, r13
lea rcx, [r14 + 1]
mov byte [r14], 1
call fcn.14011adb0
mov eax, edi
mov r8d, esi
shr rax, 1
xor edx, edx
add r14, rax
lea rcx, [r14 + 1]
mov byte [r14], 1
call fcn.14011adb0
lea rcx, [r14 + 1]
mov byte [r14 + rdi], 1
add rcx, rdi
mov r8d, esi
xor edx, edx
call fcn.14011adb0
mov r8d, dword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov rcx, qword [r12]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov rdx, r13
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov r14, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x98]
test eax, eax
je 0x140004264
lea edx, [rbx + 0x4c]
mov dword [rsp + 0x30], Ordinal_79
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140004264
lea r9, [rdi + 8]
mov dword [rax], 0x201
mov dword [r9], 0xa400
mov edx, ebx
mov eax, dword [rsp + 0x90]
add r9, 4
mov dword [rdi + 4], eax
test ebp, ebp
je 0x1400041e9
mov r8, r9
nop word [rax + rax]
mov eax, ebp
lea r8, [r8 + 1]
sub eax, edx
inc edx
dec eax
movzx ecx, byte [rax + r15]
mov byte [r8 - 1], cl
cmp edx, ebp
jb 0x1400041d0
mov edx, dword [rsp + 0x30]
lea ecx, [rbp + 1]
mov eax, edx
add r9, rcx
sub rax, rbp
cmp rax, 0xf
je 0x140004223
mov rcx, rbx
cmp byte [rcx + r9], 0
jne 0x140004211
mov byte [rcx + r9], Ordinal_69
mov edx, dword [rsp + 0x30]
inc ebx
mov eax, edx
sub rax, rbp
mov ecx, ebx
sub rax, 0xf
cmp rcx, rax
jb 0x140004201
lea eax, [rdx - 2]
mov rdx, rdi
mov byte [rax + rdi], 2
mov rax, qword [rsp + 0xb0]
mov r9, qword [rsp + 0x38]
mov r8d, dword [rsp + 0x30]
mov rcx, qword [r12]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0xa8]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, qword [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r13, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140004287
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test ebx, ebx
jne 0x140004294
mov rcx, qword [r12]
call fcn.140003460
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r12, qword [rsp + 0x60]
mov eax, ebx
add rsp, 0x68
pop r15
pop rdi
pop rbp
pop rbx
ret