Function at 0x14002ad48
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov r11, rsp
push r13
push r14
push r15
sub rsp, 0x320
mov qword [r11 - 0x2a8], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov rax, qword [0x140078790]
xor rax, rsp
mov qword [rsp + 0x310], rax
mov rsi, rcx
xor r8d, r8d
lea rdx, str.CDPAgentCerts::_CreateDPAgentRootCertificate
lea rcx, [r11 - 0x198]
call fcn.14002de00
nop
lea rdx, [0x14004f108]
lea rcx, [rsp + 0xc8]
call fcn.140003374
nop
mov dword [rsp + 0x20], 0x20
mov edi, 0x18
mov r9d, edi
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov rdx, qword [rax + 0x10]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14002ade1
call fcn.140007048
mov ebx, eax
jmp 0x14002ade3
xor ebx, ebx
mov rcx, qword [rsp + 0xd8]
test rcx, rcx
je 0x14002adfe
call fcn.140009640
and qword [rsp + 0xd8], 0
xor edx, edx
lea rcx, [rsp + 0x1a0]
test ebx, ebx
js 0x14002ae30
lea r8, str.Already_created.
call fcn.140030824
nop
lea rcx, [rsp + 0x1a0]
call fcn.14002e7a8
mov eax, 1
jmp 0x14002b30f
lea r8, str.Key_set_is_not_exists__lets_verify_we_dont_have_any_old_cert_there...
call fcn.140030824
call fcn.140008dbc
lea rdx, [0x14004f108]
lea rcx, [rsp + 0xe0]
call fcn.140003374
nop
mov dword [rsp + 0x20], 0x28
mov r9d, edi
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov rdx, qword [rax + 0x10]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14002ae80
call fcn.140007048
jmp 0x14002ae82
xor eax, eax
mov dword [rsp + 0x30], eax
test eax, eax
jns 0x14002ae92
mov ecx, eax
call fcn.140032390
nop
mov rcx, qword [rsp + 0xf0]
test rcx, rcx
je 0x14002aead
call fcn.140009640
and qword [rsp + 0xf0], 0
and qword [rsp + 0x60], 0
lea r9, [rsp + 0x60]
xor r8d, r8d
lea r15d, [r8 + 2]
mov edx, r15d
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x14002aef6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0x1fff0000
je 0x14002aee3
mov ecx, eax
call fcn.140032390
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.140032390
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
and qword [rsp + 0x58], 0
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.14000ab64
lea rax, vtable.ATL::CAccessToken.0
mov qword [rsp + 0x70], rax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
and qword [rsp + 0x88], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x68]
mov r13d, 8
mov edx, r13d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14002af7b
lea rcx, [rsp + 0x70]
mov rax, qword [rsp + 0x70]
call qword [rax + VariantCopy]
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x210]
call fcn.140003f94
nop
xor r9d, r9d
lea ebx, [r9 + 1]
mov r8d, ebx
lea rdx, [rsp + 0x210]
lea rcx, [rsp + 0x70]
call fcn.1400023ac
mov r14d, 0xf003f
mov r8d, r14d
lea rdx, [rsp + 0x218]
lea rcx, [rsp + 0x50]
call fcn.140005ef4
mov rdi, qword [rsp + 0x38]
test eax, eax
js 0x14002afe5
xor r9d, r9d
mov r8, qword [rsp + 0x50]
mov edx, ebx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x14002afe5
call fcn.140007048
mov r9d, ebx
mov r8, rdi
mov edx, r13d
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
test eax, eax
jne 0x14002b000
call fcn.140007048
mov r9d, r15d
mov r8, rdi
mov edx, r13d
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
test eax, eax
jne 0x14002b01b
call fcn.140007048
lea rcx, [rsp + 0x290]
call fcn.140006c44
nop
mov r8d, r14d
lea rdx, [rsp + 0x298]
lea rcx, [rsp + 0x50]
call fcn.140005ef4
mov r15, qword [rsp + 0x50]
mov r14, qword [rsp + 0x38]
test eax, eax
js 0x14002b066
xor r9d, r9d
mov r8, r15
mov edx, ebx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x14002b066
call fcn.140007048
mov r9d, 4
mov r8, r14
mov edx, r13d
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
test eax, eax
jne 0x14002b084
call fcn.140007048
lea rcx, [rsp + 0xa0]
call fcn.140002fd4
nop
lea r8, [0x140056978]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x148]
call fcn.1400022d8
nop
lea r8, str.Altus_Local_client_Certificate_Authority
mov rdx, rax
lea rcx, [rsp + 0x120]
call fcn.140002268
nop
lea r8, [0x140056970]
mov rdx, rax
lea rcx, [rsp + 0xf8]
call fcn.140002268
mov rdi, rax
lea rax, [rsp + 0xa0]
cmp rax, rdi
je 0x14002b111
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0xa0]
call fcn.140011b58
mov rdx, rdi
lea rcx, [rsp + 0xa0]
call fcn.1400111b0
nop
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0xf8]
call fcn.140011b58
nop
mov r13d, 0x10
mov r8d, r13d
mov rdx, rbx
mov rcx, qword [rsp + 0xf8]
call fcn.140011434
and qword [rsp + 0xf8], 0
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0x120]
call fcn.140011b58
nop
mov r8d, r13d
mov rdx, rbx
mov rcx, qword [rsp + 0x120]
call fcn.140011434
and qword [rsp + 0x120], 0
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0x148]
call fcn.140011b58
nop
mov r8d, r13d
mov rdx, rbx
mov rcx, qword [rsp + 0x148]
call fcn.140011434
and qword [rsp + 0x148], 0
lea r8, str.OCrossmatch
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x170]
call fcn.1400022d8
mov rdi, rax
lea rax, [rsp + 0xa0]
cmp rax, rdi
je 0x14002b1f3
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0xa0]
call fcn.140011b58
mov rdx, rdi
lea rcx, [rsp + 0xa0]
call fcn.1400111b0
nop
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0x170]
call fcn.140011b58
nop
mov r8, r13
mov rdx, rbx
mov rcx, qword [rsp + 0x170]
call fcn.140011434
and qword [rsp + 0x170], 0
lea r8, [rsp + 0xa8]
cmp qword [rsp + 0xc0], 8
cmovae r8, qword [rsp + 0xa8]
mov byte [rsp + 0x20], 0
lea r9, str.Altus_Local_root
mov edx, 2
mov rcx, qword [rsi]
call fcn.1400265d8
mov edi, eax
mov dword [rsp + 0x30], eax
xor r8d, r8d
mov dl, bl
lea rcx, [rsp + 0xa0]
call fcn.140011b58
nop
mov r8, r13
mov rdx, rbx
mov rcx, qword [rsp + 0xa0]
call fcn.140011434
and qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x290]
call fcn.14000501c
nop
lea rcx, [rsp + 0x210]
call fcn.14000501c
nop
lea rcx, [rsp + 0x70]
call fcn.140004880
nop
xor edx, edx
mov rcx, r14
call fcn.1400331f8
mov rcx, qword [rsp + 0x40]
call fcn.140037ab4
mov rcx, qword [rsp + 0x48]
call fcn.140037ab4
mov rcx, r15
call fcn.140037ab4
mov rcx, qword [rsp + 0x58]
call fcn.140037ab4
nop
jmp 0x14002b2e8
mov r8d, edi
lea rdx, [0x14004ee5e]
lea rcx, [rsp + 0x1a0]
call fcn.140030b9c
nop
lea rcx, [rsp + 0x1a0]
call fcn.14002e7a8
mov eax, edi
mov rcx, qword [rsp + 0x310]
xor rcx, rsp
call fcn.140033cb0
lea r11, [rsp + 0x320]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret