Function at 0x140332a54
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 r13d, r13d
mov rsi, rdx
mov qword [rbp - 0x28], r13
mov r14, rcx
mov qword [rbp - 0x20], r13
mov edi, r13d
mov dword [rbp + 0x50], r13d
mov dword [rbp + 0x60], r13d
mov dword [rbp - 0x38], r13d
mov dword [rbp + 0x58], r13d
mov dword [rbp - 0x34], r13d
test rdx, rdx
jne 0x140332ad6
mov ebx, 0x80070057
mov r14, rdi
mov rcx, r14
call fcn.1401bfc8c
mov rcx, rdi
call fcn.1401bfc8c
mov rcx, qword [rbp - 0x28]
call fcn.1401bfc8c
mov rcx, qword [rbp - 0x20]
call fcn.1401bfc8c
mov eax, ebx
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rax, [rcx + 0x38]
mov qword [rbp - 0x18], rax
cmp qword [rax], r13
jne 0x140332b21
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 0x140332b21
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14, rdi
mov ebx, eax
test eax, eax
jle 0x140332aa1
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140332aa1
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x60]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov ecx, dword [rbp + 0x60]
lea r12d, [rax + 2]
mov eax, r12d
mul rcx
lea rcx, [r12 - 3]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov qword [rbp - 0x28], rax
test rax, rax
jne 0x140332b78
mov ebx, 0x8007000e
jmp 0x140332a9e
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [0x1403358c8]
mov r15, qword [rbp - 0x28]
lea rdx, [rbp + 0x60]
mov r8, r15
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp - 0x38]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov ecx, dword [rbp - 0x38]
mov rax, r12
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov qword [rbp - 0x20], rax
test rax, rax
je 0x140332b6e
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403358c8]
mov r12, qword [rbp - 0x20]
lea rdx, [rbp - 0x38]
mov r8, r12
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov ecx, dword [rbp - 0x38]
lea r8, [rbp + 0x58]
dec ecx
xor r9d, r9d
mov rdx, r12
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140332a9e
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.1402d3444
mov ebx, eax
test eax, eax
jne 0x140332a9e
lea r8d, [rax + 4]
lea rdx, [rbp - 0x34]
call fcn.140334734
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov r12d, dword [rbp - 0x34]
mov rcx, qword [r14 + 0x20]
mov dword [r14 + 0x2c], r12d
call fcn.1401bfc8c
mov ecx, dword [rbp + 0x60]
lea r8, [rbp + 0x58]
dec ecx
mov qword [r14 + 0x20], r13
xor r9d, r9d
mov rdx, r15
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov ecx, dword [rbp + 0x58]
call fcn.14011ea0c
mov qword [r14 + 0x20], rax
test rax, rax
je 0x140332b6e
mov ecx, dword [rbp + 0x60]
lea r8, [rbp + 0x58]
dec ecx
mov r9, rax
mov rdx, r15
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140332a9e
mov r13d, dword [rbp + 0x58]
mov r15d, r13d
mov dword [r14 + 0x28], r13d
shr r15d, 1
lea eax, [r15 + 4]
lea ecx, [rax + rax*4]
lea eax, [rcx + r13*2]
mov ecx, eax
mov dword [rbp - 0x34], eax
mov ebx, eax
call fcn.14011ea0c
mov qword [rbp - 0x30], rax
mov r14, rax
test rax, rax
jne 0x140332d12
mov ebx, 0x8007000e
jmp 0x140332aa1
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rbx, rax
call fcn.14001ba6e
mov rdx, qword [rbp - 0x28]
lea r14, [rbx + 0x14]
mov dword [rbx], 0x207
lea r8, [rbp + 0x58]
mov dword [rbx + 4], 0xa400
mov eax, r13d
shl eax, 3
mov r9, r14
mov dword [rbx + 0xc], eax
mov dword [rbx + 8], 0x32415352
mov dword [rbx + 0x10], r12d
mov ecx, dword [rbp + 0x60]
dec ecx
call fcn.1402d3444
xor r12d, r12d
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r13d
mov rdx, r14
call fcn.140334734
mov ebx, eax
test eax, eax
jne 0x140333151
xor ecx, ecx
call fcn.1401bfc8c
mov rax, qword [rsi]
mov rbx, qword [rax + 0x30]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
lea rcx, [r12 - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov rdi, rax
test rax, rax
je 0x14033314c
mov rax, qword [rsi]
mov rbx, qword [rax + 0x30]
mov rcx, rbx
call qword [0x1403358c8]
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add r14, r13
mov dword [rbp + 0x58], r15d
dec ecx
mov r9, r14
mov rdx, rdi
mov r12, r13
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r15d
mov rdx, r14
call fcn.140334734
mov ebx, eax
test eax, eax
jne 0x140333151
mov rcx, rdi
call fcn.1401bfc8c
xor eax, eax
mov edi, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x38]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea eax, [rdi + 2]
mul rcx
lea rcx, [rdi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov rdi, rax
test rax, rax
je 0x14033314c
mov rax, qword [rsi]
mov rbx, qword [rax + 0x38]
mov rcx, rbx
call qword [0x1403358c8]
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
shr r12, 1
mov rdx, rdi
add r14, r12
dec ecx
mov r9, r14
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r15d
mov rdx, r14
call fcn.140334734
mov ebx, eax
test eax, eax
jne 0x140333151
mov rcx, rdi
call fcn.1401bfc8c
xor eax, eax
mov edi, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x40]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea eax, [rdi + 2]
mul rcx
lea rcx, [rdi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov rdi, rax
test rax, rax
je 0x14033314c
mov rax, qword [rsi]
mov rbx, qword [rax + 0x40]
mov rcx, rbx
call qword [0x1403358c8]
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add r14, r12
mov rdx, rdi
dec ecx
mov r9, r14
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r15d
mov rdx, r14
call fcn.140334734
mov ebx, eax
test eax, eax
jne 0x140333151
mov rcx, rdi
call fcn.1401bfc8c
xor eax, eax
mov edi, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x48]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea eax, [rdi + 2]
mul rcx
lea rcx, [rdi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov rdi, rax
test rax, rax
je 0x14033314c
mov rax, qword [rsi]
mov rbx, qword [rax + 0x48]
mov rcx, rbx
call qword [0x1403358c8]
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add r14, r12
mov rdx, rdi
dec ecx
mov r9, r14
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r15d
mov rdx, r14
call fcn.140334734
mov ebx, eax
test eax, eax
jne 0x140333151
mov rcx, rdi
call fcn.1401bfc8c
xor eax, eax
mov edi, eax
mov rax, qword [rsi]
mov rbx, qword [rax + 0x50]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea eax, [rdi + 2]
mul rcx
lea rcx, [rdi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov rdi, rax
test rax, rax
je 0x14033314c
mov rax, qword [rsi]
mov rbx, qword [rax + 0x50]
mov rcx, rbx
call qword [0x1403358c8]
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add r14, r12
mov rdx, rdi
dec ecx
mov r9, r14
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r15d
mov rdx, r14
call fcn.140334734
xor r15d, r15d
mov ebx, eax
test eax, eax
jne 0x140333151
mov rcx, rdi
call fcn.1401bfc8c
mov rcx, qword [rsi]
mov edi, r15d
mov rbx, qword [rcx + 0x58]
mov rcx, rbx
call qword [0x1403358c8]
xor r8d, r8d
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 2]
mul rcx
lea rcx, [r15 - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14011ea0c
mov rdi, rax
test rax, rax
jne 0x14033315a
mov ebx, 0x8007000e
mov r14, qword [rbp - 0x30]
jmp 0x140332aa1
mov rax, qword [rsi]
mov rbx, qword [rax + 0x58]
mov rcx, rbx
call qword [0x1403358c8]
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, rsi
call rbx
mov ebx, eax
test eax, eax
jne 0x140333151
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add r14, r12
mov dword [rbp + 0x58], r13d
dec ecx
mov r9, r14
mov rdx, rdi
call fcn.1402d3444
mov ebx, eax
test eax, eax
jne 0x140333151
mov r8d, r13d
mov rdx, r14
call fcn.140334734
mov r14, qword [rbp - 0x30]
mov ebx, eax
test eax, eax
jne 0x140332aa1
mov rcx, qword [rbp - 0x18]
xor r9d, r9d
mov rax, qword [rbp + 0x48]
mov rdx, r14
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 0x140332aa1
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140332b10