Function at 0x140086c6c
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2d8]
sub rsp, 0x3a0
xor r15d, r15d
mov rdi, rcx
mov rsi, r8
lea eax, [r15 + 1]
mov rbx, rdx
lea rcx, [rbp + 0x1c8]
mov dword [rbp + 0x70], eax
mov dword [rbp + 0x80], eax
mov dword [rbp + 0x90], eax
mov dword [rbp + 0xa0], eax
lea rax, [rbp + 0x70]
mov r8d, 0xd8
mov qword [rsp + 0x48], rax
mov eax, dword [rdx + 0x48]
xor edx, edx
mov r13d, r15d
mov r12d, r15d
mov qword [rbp + 0x78], r15
mov dword [rsp + 0x58], eax
mov qword [rbp + 0x88], r15
mov qword [rbp + 0x98], r15
mov qword [rbp + 0xa8], r15
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x5c], r15
mov qword [rbp + 0x1c0], r15
call fcn.1400c8410
lea rcx, [rbp - 0x78]
xor edx, edx
mov r8d, Ordinal_203
mov r14d, r15d
call fcn.1400c8410
cmp qword [rbx + 0x40], r15
mov r8, qword [rbx + 0x10]
lea rax, [rbp + 0x1c0]
lea rdx, str.2.5.4.3
lea rcx, [rbp + 0xc0]
mov qword [rbp + 0x48], rax
lea rax, str.1.2.840.113549.1.1.5
mov dword [rbp - 0x80], 2
cmovne rax, qword [rbx + 0x40]
mov dword [rbp + 0x40], 3
mov qword [rbp - 0x68], rax
call fcn.140086714
test eax, eax
je 0x140086d84
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0xc0]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x78], rdx
mov dword [rsp + 0x40], ecx
mov r8, qword [rbx + 0x18]
lea rdx, str.2.5.4.11
lea rcx, [rbp + 0xe0]
call fcn.140086714
test eax, eax
je 0x140086dba
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0xe0]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x78], rdx
mov dword [rsp + 0x40], ecx
mov r8, qword [rbx + 0x20]
lea rdx, str.2.5.4.10
lea rcx, [rbp + 0x100]
call fcn.140086714
test eax, eax
je 0x140086df0
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0x100]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x78], rdx
mov dword [rsp + 0x40], ecx
mov r8, qword [rbx + 0x28]
lea rdx, str.2.5.4.6
lea rcx, [rbp + 0x120]
call fcn.140086714
test eax, eax
je 0x140086e26
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0x120]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x78], rdx
mov dword [rsp + 0x40], ecx
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x40]
mov r9, rsi
mov r8, rbx
call fcn.140086a30
lea r8, [rbp - 0x30]
lea rdx, [rsp + 0x40]
mov ecx, 7
call fcn.14008638c
test eax, eax
je 0x1400874bd
lea rcx, [rbp - 0x30]
call fcn.1400869ac
mov rsi, rax
test rax, rax
je 0x140086e7d
lea rcx, str._s.cert__subject___:__s_n
mov rdx, rax
call fcn.14000bf0c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, qword [rbx + 0x30]
mov eax, SQLAllocHandle
test rsi, rsi
je 0x140086ee3
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], r15w
jne 0x140086e8f
mov dword [rbp - 0x78], eax
test al, 1
jne 0x140086eb2
lea r8, [rbp - 0x78]
lea rdx, [rbp - 0x70]
mov rcx, rsi
call fcn.140012af0
jmp 0x140086eb5
mov eax, r15d
test eax, eax
jne 0x140086f21
lea rcx, str.ERROR_makeSN___Unable_to_use__s_as_a_HEX_string_n
mov rdx, rsi
call fcn.14000bf0c
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SN_n
call fcn.14000bf0c
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400874c9
mov rdx, rax
mov ecx, 0x40
mov dword [rbp - 0x78], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x70], rax
test rax, rax
je 0x140086ec8
mov edx, dword [rbp - 0x78]
mov rcx, rax
call qword [sym.imp.cryptdll.dll_CDGenerateRandomBits]
mov ecx, r15d
test eax, eax
setns cl
test ecx, ecx
jne 0x140086f21
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140086ec8
lea rcx, str._s.cert__serial____:
call fcn.14000bf0c
mov edx, dword [rbp - 0x78]
mov rcx, qword [rbp - 0x70]
xor r8d, r8d
call fcn.140012b94
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000bf0c
movzx eax, word [rbx + 0x38]
mov rcx, qword [rbp + 0x48]
mov word [rbp + 0x2f8], ax
lea rax, [rbp + 0x2f8]
lea r8, [rcx + 0x10]
mov qword [rbp + 0x58], rax
lea rax, str.2.5.29.15
mov esi, 1
mov qword [rcx], rax
mov dword [rcx + 8], esi
lea rdx, [rbp + 0x50]
mov rcx, rax
mov dword [rbp + 0x50], 2
mov dword [rbp + 0x60], 5
call fcn.14008638c
test eax, eax
je 0x1400874a2
mov r8, qword [rbp + 0x48]
lea rcx, str.2.5.29.19
lea rdx, [rsp + 0x58]
mov qword [r8 + 0x20], rcx
mov eax, dword [rsp + 0x58]
add r8, 0x30
mov dword [r8 - 8], eax
call fcn.14008638c
test eax, eax
je 0x140087486
mov r8, qword [rbx + 0x50]
test r8, r8
je 0x140087007
mov edx, dword [rbp + 0x40]
mov rax, qword [r8]
mov rcx, qword [rbp + 0x48]
shl rdx, 5
mov qword [rdx + rcx], rax
mov rax, qword [r8 + 8]
mov qword [rdx + rcx + 8], rax
mov rax, qword [r8 + 0x10]
mov qword [rdx + rcx + 0x10], rax
mov rax, qword [r8 + 0x18]
mov qword [rdx + rcx + 0x18], rax
mov eax, dword [rbp + 0x40]
add eax, esi
mov dword [rbp + 0x40], eax
jmp 0x14008700a
mov eax, dword [rbp + 0x40]
mov r8, qword [rbx + 0x58]
test r8, r8
je 0x140087047
mov rcx, qword [rbp + 0x48]
mov edx, eax
mov rax, qword [r8]
shl rdx, 5
mov qword [rdx + rcx], rax
mov rax, qword [r8 + 8]
mov qword [rdx + rcx + 8], rax
mov rax, qword [r8 + 0x10]
mov qword [rdx + rcx + 0x10], rax
mov rax, qword [r8 + 0x18]
mov qword [rdx + rcx + 0x18], rax
mov eax, dword [rbp + 0x40]
add eax, esi
mov dword [rbp + 0x40], eax
mov r8, qword [rbx + 0x60]
test r8, r8
je 0x14008707f
mov rcx, qword [rbp + 0x48]
mov edx, eax
mov rax, qword [r8]
shl rdx, 5
mov qword [rdx + rcx], rax
mov rax, qword [r8 + 8]
mov qword [rdx + rcx + 8], rax
mov rax, qword [r8 + 0x10]
mov qword [rdx + rcx + 0x10], rax
mov rax, qword [r8 + 0x18]
mov qword [rdx + rcx + 0x18], rax
add dword [rbp + 0x40], esi
mov rdx, qword [rbp - 0x68]
lea rcx, str._s.cert__algorithm_:__S
call fcn.14000bf0c
mov rdx, qword [rbp - 0x68]
mov r8d, 0x80000000
mov ecx, esi
call qword [sym.imp.CRYPT32.dll_CryptFindOIDInfo]
test rax, rax
je 0x1400870b6
mov rdx, qword [rax + 0x10]
lea rcx, [0x1400f5268]
call fcn.14000bf0c
lea rcx, str._n_s.cert__validity__:
call fcn.14000bf0c
lea rcx, [rbp - 0x40]
call fcn.140012cec
lea rcx, [0x140103d80]
call fcn.14000bf0c
lea rcx, [rbp - 0x38]
call fcn.140012cec
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000bf0c
mov rdx, qword [rdi + 8]
lea rcx, str._s.key___provider__:__s_n
call fcn.14000bf0c
call fcn.140012d94
mov qword [rdi], rax
test rax, rax
je 0x14008746a
lea rcx, str._s.key___container_:__s_n
mov rdx, rax
call fcn.14000bf0c
mov r9d, dword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea rsi, [rdi + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 0xf0000040
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14008718d
mov rcx, qword [rsi]
xor r9d, r9d
lea rax, [rbp + 0x310]
lea edx, [r9 + 3]
mov qword [rsp + 0x28], rax
call fcn.140005094
test eax, eax
je 0x140087182
mov r12d, dword [rbp + 0x310]
and r12d, 1
je 0x140087182
mov r8, qword [rdi + 0x30]
mov rcx, qword [rsi]
and dword [rdi + 0x14], 0xffffffbf
and dword [rdi + 0x38], 0xfffffffe
mov edx, r12d
call fcn.140086818
mov rcx, qword [rsi]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rdi + 0x14]
mov r9d, dword [rdi + 0x10]
mov r8, qword [rdi + 8]
mov rdx, qword [rdi]
or eax, 8
mov rcx, rsi
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14008744b
mov r8, qword [rdi + 0x30]
mov rcx, qword [rsi]
mov edx, r12d
call fcn.140086818
movzx edx, word [rdi + 0x3c]
lea rcx, str._s.key___gen___4hu_:
call fcn.14000bf0c
movzx r8d, word [rdi + 0x3c]
mov edx, dword [rdi + 0x28]
mov rcx, qword [rsi]
shl r8d, 0x10
lea r9, [rsp + 0x68]
or r8d, dword [rdi + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140087425
lea rcx, [0x140103dc8]
call fcn.14000bf0c
mov edx, dword [rdi + 0x28]
mov rcx, qword [rsi]
call fcn.140086764
mov r15, rax
test rax, rax
je 0x140087418
movups xmm0, xmmword [rax]
mov rbx, qword [rbp + 0x48]
lea rcx, [rbp + 0x140]
mov dword [rbp + 0xb0], Ordinal_26
movaps xmmword [rbp - 0x20], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp - 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
lea rax, [rbp + 0x50]
mov qword [rbp + 0xb8], rax
movaps xmmword [rbp], xmm0
call qword [sym.imp.advapi32.dll_A_SHAInit]
mov r8d, dword [r15 + 0x18]
mov rdx, qword [r15 + 0x20]
lea rcx, [rbp + 0x140]
call qword [sym.imp.advapi32.dll_A_SHAUpdate]
lea rdx, [rbp + 0x50]
lea rcx, [rbp + 0x140]
call qword [sym.imp.advapi32.dll_A_SHAFinal]
lea rcx, str.2.5.29.14
lea r8, [rbx + 0x50]
lea rdx, [rbp + 0xb0]
xor r15d, r15d
mov qword [rbx + 0x40], rcx
mov dword [rbx + 0x48], r15d
call fcn.14008638c
test eax, eax
je 0x14008740c
mov eax, dword [rbp + 0x40]
lea rcx, [rbp - 0x50]
lea r9, [rbp + 0x2e8]
mov qword [rsp + 0x30], rcx
mov rcx, qword [rbp + 0x2f0]
shl rax, 5
add rax, qword [rbp + 0x48]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call fcn.140086b2c
test eax, eax
je 0x140087325
mov eax, dword [rbp + 0x40]
lea rcx, [rbp - 0x50]
mov r14d, eax
inc eax
shl r14, 5
mov dword [rbp + 0x40], eax
add r14, qword [rbp + 0x48]
call fcn.1400869ac
mov rbx, rax
test rax, rax
je 0x14008732e
lea rcx, str.__i.cert__subject__:__s_n
mov rdx, rax
call fcn.14000bf0c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008732e
movaps xmm0, xmmword [rbp - 0x30]
movdqu xmmword [rbp - 0x50], xmm0
lea rcx, str._s.cert__signature_:
call fcn.14000bf0c
mov rcx, qword [rsp + 0x70]
mov edx, dword [rbp + 0x2e8]
test rcx, rcx
jne 0x140087350
mov edx, dword [rdi + 0x28]
mov rcx, qword [rsi]
mov rax, qword [rbp + 0x308]
mov rbx, qword [rbp + 0x300]
lea r9, [rbp - 0x80]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x68]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call fcn.1400868a4
mov r13d, eax
test eax, eax
je 0x1400873d9
lea rcx, [0x140103dc8]
call fcn.14000bf0c
test r12d, r12d
je 0x1400873d9
lea rcx, str._s.key___cert.assoc:
call fcn.14000bf0c
mov r8, qword [rbx]
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
lea edx, [r9 + 0x1a]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400873c5
lea rcx, [0x140103dc8]
call fcn.14000bf0c
jmp 0x1400873d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptSetKeyParam_KP_CERTIFICATE___0x_08x__n
mov edx, eax
call fcn.14000bf0c
test r14, r14
je 0x1400873e8
mov rcx, qword [r14 + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8, qword [rsp + 0x70]
mov edx, dword [rbp + 0x2e8]
mov ecx, dword [rsp + 0x50]
call fcn.140086ac8
mov rcx, qword [rbp + 0x48]
add rcx, 0x58
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140087418
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SKI_n
call fcn.14000bf0c
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140087439
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptGenKey__0x_08x__n
mov edx, eax
call fcn.14000bf0c
test r13d, r13d
jne 0x140087476
mov rcx, qword [rsi]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x14008745f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptAcquireContext_CRYPT_NEWKEYSET___0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140087476
lea rcx, str.ERROR_generateCertificate___Unable_to_generate_a_container_name_n
call fcn.14000bf0c
mov rcx, qword [rbp + 0x48]
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140087492
lea rcx, str.ERROR_generateCertificate___Unable_to_create_BC2_n
call fcn.14000bf0c
mov rcx, qword [rbp + 0x48]
add rcx, 0x18
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400874ae
lea rcx, str.ERROR_generateCertificate___Unable_to_create_KU_n
call fcn.14000bf0c
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140086ed4
lea rcx, str.ERROR_generateCertificate___Unable_to_create_Subject_n
call fcn.14000bf0c
mov eax, r13d
mov rbx, qword [rsp + 0x3e0]
add rsp, 0x3a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret