Function at 0x1002d6130
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r13d, r13d
mov rdi, rdx
mov r12, rcx
mov rsi, r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x50], r13
mov dword [rax + 0x10], r13d
mov dword [rax + 0x20], r13d
mov dword [rax - 0x68], r13d
mov dword [rax + 0x18], r13d
mov dword [rax - 0x64], r13d
cmp rdx, r13
jne 0x1002d61bb
mov ebx, 0x80070057
mov rbp, rsi
mov rcx, rbp
call fcn.10004c2e4
mov rcx, rsi
call fcn.10004c2e4
mov rcx, qword [rsp + 0x48]
call fcn.10004c2e4
mov rcx, qword [rsp + 0x50]
call fcn.10004c2e4
mov eax, ebx
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp qword [rcx + 0x38], r13
jne 0x1002d61fa
mov r9d, 0x18
xor r8d, r8d
xor edx, edx
add rcx, 0x38
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
cmp eax, r13d
jne 0x1002d61fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r13d
cmovle ebx, eax
jmp 0x1002d617a
mov rax, qword [rdi]
lea rdx, [rsp + 0xb8]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x20]
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov ecx, dword [rsp + 0xb8]
mov ebp, 2
mov rax, rbp
lea r14, [rbp - 3]
mul rcx
cmovo rax, r14
mov rcx, rax
call fcn.10004c2c0
mov rcx, rax
mov qword [rsp + 0x48], rax
cmp rax, r13
jne 0x1002d6252
mov ebx, 0x8007000e
jmp 0x1002d617a
mov rax, qword [rdi]
mov r8, rcx
lea rdx, [rsp + 0xb8]
mov rcx, rdi
call qword [rax + 0x20]
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov rax, qword [rdi]
lea rdx, [rsp + 0x30]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x28]
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov ecx, dword [rsp + 0x30]
mov rax, rbp
mul rcx
cmovo rax, r14
mov rcx, rax
call fcn.10004c2c0
mov rcx, rax
mov qword [rsp + 0x50], rax
cmp rax, r13
je 0x1002d6248
mov rax, qword [rdi]
mov r8, rcx
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [rax + 0x28]
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov ecx, dword [rsp + 0x30]
mov rbp, qword [rsp + 0x50]
lea r8, [rsp + 0xb0]
dec ecx
mov rdx, rbp
xor r9d, r9d
call fcn.1002264c8
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov eax, dword [rsp + 0xb0]
mov ecx, dword [rsp + 0x30]
lea r9, [rsp + 0x38]
sub r9, rax
lea r8, [rsp + 0xb0]
mov rdx, rbp
dec ecx
call fcn.1002264c8
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
lea rdx, [rsp + 0x34]
mov r8d, 4
mov rcx, r12
call fcn.1002d5350
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov eax, dword [rsp + 0x34]
mov rcx, qword [r12 + 0x20]
mov dword [r12 + 0x2c], eax
call fcn.10004c2e4
mov ecx, dword [rsp + 0xb8]
mov r14, qword [rsp + 0x48]
lea r8, [rsp + 0xb0]
dec ecx
xor r9d, r9d
mov rdx, r14
mov qword [r12 + 0x20], r13
call fcn.1002264c8
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov ecx, dword [rsp + 0xb0]
call fcn.10004c2c0
mov qword [r12 + 0x20], rax
cmp rax, r13
je 0x1002d6248
mov ecx, dword [rsp + 0xb8]
lea r8, [rsp + 0xb0]
mov r9, rax
dec ecx
mov rdx, r14
call fcn.1002264c8
mov ebx, eax
cmp eax, r13d
jne 0x1002d617a
mov r15d, dword [rsp + 0xb0]
mov r13d, r15d
mov dword [r12 + 0x28], r15d
shr r13d, 1
lea ecx, [r13 + r13*4 + 0x14]
lea eax, [rcx + r15*2]
mov ecx, eax
mov dword [rsp + 0x38], eax
mov ebx, eax
call fcn.10004c2c0
mov rbp, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1002d6408
mov ebx, 0x8007000e
jmp 0x1002d617d
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_memset
xor eax, eax
mov word [rbx + 2], ax
mov byte [rbx], 7
mov byte [rbx + 1], 2
mov dword [rbx + 4], 0xa400
mov dword [rbx + 8], 0x32415352
mov eax, r15d
shl eax, 3
lea rbp, [rbx + 0x14]
lea r8, [rsp + 0xb0]
mov dword [rbx + 0xc], eax
mov eax, dword [rsp + 0x34]
mov r9, rbp
mov dword [rbx + 0x10], eax
mov ecx, dword [rsp + 0xb8]
mov rdx, r14
dec ecx
call fcn.1002264c8
xor r14d, r14d
mov ebx, eax
cmp eax, r14d
jne 0x1002d6890
mov r8d, r15d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
mov ebx, eax
cmp eax, r14d
jne 0x1002d6890
xor ecx, ecx
call fcn.10004c2e4
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x30]
mov ebx, eax
cmp eax, r14d
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
lea eax, [r14 + 2]
mul rcx
lea rcx, [r14 - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.10004c2c0
mov rsi, rax
cmp rax, r14
je 0x1002d688b
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
mov r8, rsi
mov rcx, rdi
call qword [rax + 0x30]
mov ebx, eax
cmp eax, r14d
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
add rbp, r15
lea r8, [rsp + 0xb0]
mov r9, rbp
mov rdx, rsi
dec ecx
mov dword [rsp + 0xb0], r13d
mov r14, r15
call fcn.1002264c8
xor r11d, r11d
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov r8d, r13d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov rcx, rsi
call fcn.10004c2e4
xor eax, eax
lea rdx, [rsp + 0xa8]
mov rsi, rax
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x38]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
lea eax, [rsi + 2]
mul rcx
lea rcx, [rsi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.10004c2c0
mov rsi, rax
xor eax, eax
cmp rsi, rax
je 0x1002d688b
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
mov r8, rsi
mov rcx, rdi
call qword [rax + 0x38]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
shr r14, 1
lea r8, [rsp + 0xb0]
add rbp, r14
mov rdx, rsi
dec ecx
mov r9, rbp
call fcn.1002264c8
xor r11d, r11d
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov r8d, r13d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov rcx, rsi
call fcn.10004c2e4
xor eax, eax
lea rdx, [rsp + 0xa8]
mov rsi, rax
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x40]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
lea eax, [rsi + 2]
mul rcx
lea rcx, [rsi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.10004c2c0
mov rsi, rax
xor eax, eax
cmp rsi, rax
je 0x1002d688b
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
mov r8, rsi
mov rcx, rdi
call qword [rax + 0x40]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
add rbp, r14
lea r8, [rsp + 0xb0]
mov r9, rbp
mov rdx, rsi
dec ecx
call fcn.1002264c8
xor r11d, r11d
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov r8d, r13d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov rcx, rsi
call fcn.10004c2e4
xor eax, eax
lea rdx, [rsp + 0xa8]
mov rsi, rax
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x48]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
lea eax, [rsi + 2]
mul rcx
lea rcx, [rsi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.10004c2c0
mov rsi, rax
xor eax, eax
cmp rsi, rax
je 0x1002d688b
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
mov r8, rsi
mov rcx, rdi
call qword [rax + 0x48]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
add rbp, r14
lea r8, [rsp + 0xb0]
mov r9, rbp
mov rdx, rsi
dec ecx
call fcn.1002264c8
xor r11d, r11d
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov r8d, r13d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
mov ebx, eax
cmp eax, r11d
jne 0x1002d6890
mov rcx, rsi
call fcn.10004c2e4
xor eax, eax
lea rdx, [rsp + 0xa8]
mov rsi, rax
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
call qword [rax + 0x50]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
lea eax, [rsi + 2]
mul rcx
lea rcx, [rsi - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.10004c2c0
mov rsi, rax
xor eax, eax
cmp rsi, rax
je 0x1002d688b
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
mov r8, rsi
mov rcx, rdi
call qword [rax + 0x50]
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
add rbp, r14
lea r8, [rsp + 0xb0]
mov r9, rbp
mov rdx, rsi
dec ecx
call fcn.1002264c8
mov ebx, eax
xor eax, eax
cmp ebx, eax
jne 0x1002d6890
mov r8d, r13d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
xor r13d, r13d
mov ebx, eax
cmp eax, r13d
jne 0x1002d6890
mov rcx, rsi
call fcn.10004c2e4
mov r9, qword [rdi]
lea rdx, [rsp + 0xa8]
xor r8d, r8d
mov rcx, rdi
mov rsi, r13
call qword [r9 + 0x58]
mov ebx, eax
cmp eax, r13d
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
lea eax, [r13 + 2]
mul rcx
lea rcx, [r13 - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.10004c2c0
mov rsi, rax
cmp rax, r13
jne 0x1002d689a
mov ebx, 0x8007000e
mov rbp, qword [rsp + 0x40]
jmp 0x1002d617d
mov rax, qword [rdi]
lea rdx, [rsp + 0xa8]
mov r8, rsi
mov rcx, rdi
call qword [rax + 0x58]
mov ebx, eax
cmp eax, r13d
jne 0x1002d6890
mov ecx, dword [rsp + 0xa8]
add rbp, r14
lea r8, [rsp + 0xb0]
mov r9, rbp
mov rdx, rsi
dec ecx
mov dword [rsp + 0xb0], r15d
call fcn.1002264c8
mov ebx, eax
cmp eax, r13d
jne 0x1002d6890
mov r8d, r15d
mov rdx, rbp
mov rcx, r12
call fcn.1002d5350
mov rbp, qword [rsp + 0x40]
mov ebx, eax
cmp eax, r13d
jne 0x1002d617d
mov r8d, dword [rsp + 0x38]
mov rcx, qword [r12 + 0x38]
lea rax, [r12 + 0x30]
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov rdx, rbp
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
cmp eax, r13d
jne 0x1002d617d
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r13d
cmovle ebx, eax
jmp 0x1002d617d