Function at 0x140378644
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 0x140378696
mov ebx, 0x80070057
jmp 0x140378991
lea rax, [rcx + 0x38]
mov qword [rbp - 0x18], rax
cmp qword [rax], r12
jne 0x1403786e0
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 0x1403786e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140378991
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x60]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140378991
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 0x14037874a
mov ebx, 0x8007000e
jmp 0x140378991
mov rax, qword [rsi]
mov rbx, qword [rax + 0x20]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov r15, qword [rbp - 0x28]
lea rdx, [rbp + 0x60]
mov r8, r15
mov rax, rbx
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140378991
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x38]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140378991
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 0x140378740
mov rax, qword [rsi]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov r12, qword [rbp - 0x20]
lea rdx, [rbp - 0x38]
mov r8, r12
mov rax, rbx
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x140378991
mov ecx, dword [rbp - 0x38]
lea r8, [rbp + 0x58]
dec ecx
xor r9d, r9d
mov rdx, r12
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140378991
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.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140378991
lea edx, [rax + 4]
lea rcx, [rbp - 0x34]
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x140378991
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.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140378991
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 0x140378740
mov ecx, dword [rbp + 0x60]
lea r8, [rbp + 0x58]
dec ecx
mov r9, rax
mov rdx, r15
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x140378991
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 0x140378930
mov ebx, 0x8007000e
mov r13, rax
jmp 0x140378991
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 eax, r13d
mov dword [rbx], 0x207
shl eax, 3
lea r8, [rbp + 0x58]
mov dword [rbx + 0xc], eax
mov r9, rdi
mov dword [rbx + 4], 0xa400
mov dword [rbx + 8], 0x32415352
mov dword [rbx + 0x10], r12d
mov ecx, dword [rbp + 0x60]
dec ecx
call fcn.14030a3ec
xor r12d, r12d
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
jne 0x1403789f7
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.140378fb8
mov ebx, eax
test eax, eax
jne 0x14037898d
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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 0x140378a85
mov ebx, 0x8007000e
jmp 0x14037898d
mov rax, qword [rsi]
mov rbx, qword [rax + 0x30]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r14
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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.14030a3ec
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
je 0x140378988
mov edx, r15d
mov rcx, rdi
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x14037898d
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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 0x140378a7b
mov rax, qword [rsi]
mov rbx, qword [rax + 0x38]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r14
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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.14030a3ec
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
je 0x140378988
mov edx, r15d
mov rcx, rdi
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x14037898d
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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 0x140378a7b
mov rax, qword [rsi]
mov rbx, qword [rax + 0x40]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r14
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, r14
dec ecx
mov r9, rdi
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
je 0x140378988
mov edx, r15d
mov rcx, rdi
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x14037898d
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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 0x140378a7b
mov rax, qword [rsi]
mov rbx, qword [rax + 0x48]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r14
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, r14
dec ecx
mov r9, rdi
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
je 0x140378988
mov edx, r15d
mov rcx, rdi
call fcn.140378fb8
mov ebx, eax
test eax, eax
jne 0x14037898d
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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 0x140378a7b
mov rax, qword [rsi]
mov rbx, qword [rax + 0x50]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r14
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
mov ecx, dword [rbp + 0x50]
lea r8, [rbp + 0x58]
add rdi, r12
mov rdx, r14
dec ecx
mov r9, rdi
call fcn.14030a3ec
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
je 0x140378988
mov edx, r15d
mov rcx, rdi
call fcn.140378fb8
xor r15d, r15d
mov ebx, eax
test eax, eax
jne 0x14037898d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rsi]
mov r14d, r15d
mov rbx, qword [rax + 0x58]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
xor r8d, r8d
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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 0x140378a7b
mov rax, qword [rsi]
mov rbx, qword [rax + 0x58]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp + 0x50]
mov r8, r14
mov rcx, rsi
call rax
mov ebx, eax
test eax, eax
jne 0x14037898d
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.14030a3ec
mov ebx, eax
test eax, eax
jne 0x14037898d
test rdi, rdi
je 0x140378988
mov edx, r13d
mov rcx, rdi
call fcn.140378fb8
mov r13, qword [rbp - 0x30]
mov ebx, eax
test eax, eax
jne 0x140378991
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 0x140378991
jmp 0x1403786c7