Function at 0x1400884fc
Capabilities:
Create new key via cryptacquirecontext
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x3a0
xor ebp, ebp
lea rax, [rax - 0x258]
mov rbx, rcx
lea edi, [rbp + 1]
mov qword [rax + 8], rbp
mov qword [rax + 0x18], rbp
mov qword [rax + 0x28], rbp
mov qword [rax + 0x38], rbp
mov dword [rax], edi
mov dword [rax + 0x10], edi
mov dword [rax + 0x20], edi
mov dword [rax + 0x30], edi
mov qword [rsp + 0x50], rax
mov eax, dword [rdx + 0x48]
mov r15, r8
mov rsi, rdx
lea rcx, [rsp + 0x2c8]
mov r8d, 0xd8
xor edx, edx
mov dword [rsp + 0x60], eax
mov r14d, ebp
mov r13d, ebp
mov dword [rsp + 0x48], ebp
mov dword [rsp + 0x64], ebp
mov dword [rsp + 0x68], ebp
mov qword [rsp + 0x2c0], rbp
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x88]
xor edx, edx
mov r8d, Ordinal_203
mov r12, rbp
call sub.msvcrt.dll_memset
cmp qword [rsi + 0x40], rbp
mov r8, qword [rsi + 0x10]
lea rax, [rsp + 0x2c0]
lea rdx, str.2.5.4.3
mov qword [rsp + 0x148], rax
lea rax, str.1.2.840.113549.1.1.5
lea rcx, [rsp + 0x1c0]
cmovne rax, qword [rsi + 0x40]
mov dword [rsp + 0x80], 2
mov dword [rsp + 0x140], 3
mov qword [rsp + 0x98], rax
call fcn.140087fa0
cmp eax, ebp
je 0x140088618
mov ecx, dword [rsp + 0x48]
lea rdx, [rsp + 0x1c0]
mov rax, rcx
add rax, rax
add ecx, edi
mov qword [rsp + rax*8 + 0x178], rdx
mov dword [rsp + 0x48], ecx
mov r8, qword [rsi + 0x18]
lea rdx, str.2.5.4.11
lea rcx, [rsp + 0x1e0]
call fcn.140087fa0
cmp eax, ebp
je 0x140088654
mov ecx, dword [rsp + 0x48]
lea rdx, [rsp + 0x1e0]
mov rax, rcx
add rax, rax
add ecx, edi
mov qword [rsp + rax*8 + 0x178], rdx
mov dword [rsp + 0x48], ecx
mov r8, qword [rsi + 0x20]
lea rdx, str.2.5.4.10
lea rcx, [rsp + 0x200]
call fcn.140087fa0
cmp eax, ebp
je 0x140088690
mov ecx, dword [rsp + 0x48]
lea rdx, [rsp + 0x200]
mov rax, rcx
add rax, rax
add ecx, edi
mov qword [rsp + rax*8 + 0x178], rdx
mov dword [rsp + 0x48], ecx
mov r8, qword [rsi + 0x28]
lea rdx, str.2.5.4.6
lea rcx, [rsp + 0x220]
call fcn.140087fa0
cmp eax, ebp
je 0x1400886cc
mov ecx, dword [rsp + 0x48]
lea rdx, [rsp + 0x220]
mov rax, rcx
add rax, rax
add ecx, edi
mov qword [rsp + rax*8 + 0x178], rdx
mov dword [rsp + 0x48], ecx
lea rdx, [rsp + 0xc8]
lea rcx, [rsp + 0xc0]
mov r9, r15
mov r8, rsi
mov qword [rsp + 0x20], rbp
call fcn.1400882c0
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x48]
mov ecx, 7
call fcn.140087c00
cmp eax, ebp
je 0x140088e06
lea rcx, [rsp + 0xd0]
call fcn.140088238
mov rdi, rax
cmp rax, rbp
je 0x140088738
lea rcx, str._s.cert__subject___:__s_n
mov rdx, rax
call fcn.14000c020
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbp, qword [rsi + 0x30]
mov eax, SQLAllocHandle
test rbp, rbp
je 0x1400887ae
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
dec rcx
mov dword [rsp + 0x88], ecx
test cl, 1
jne 0x14008877c
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x90]
mov rcx, rbp
call fcn.140012bfc
test eax, eax
jne 0x1400887fa
lea rcx, str.ERROR_makeSN___Unable_to_use__s_as_a_HEX_string_n
mov rdx, rbp
call fcn.14000c020
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SN_n
call fcn.14000c020
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140088e12
mov rdx, rax
mov ecx, 0x40
mov dword [rsp + 0x88], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x90], rax
test rax, rax
je 0x14008878f
mov edx, dword [rsp + 0x88]
mov rcx, rax
call sub.cryptdll.dll_CDGenerateRandomBits
xor ecx, ecx
test eax, eax
setns cl
test ecx, ecx
jne 0x1400887fa
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008878f
lea rcx, str._s.cert__serial____:
call fcn.14000c020
mov edx, dword [rsp + 0x88]
mov rcx, qword [rsp + 0x90]
xor r8d, r8d
call fcn.140012c94
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000c020
movzx edx, word [rsi + 0x38]
mov rcx, qword [rsp + 0x148]
mov word [rsp + 0x3d8], dx
lea rax, [rsp + 0x3d8]
lea r8, [rcx + 0x10]
mov qword [rsp + 0x158], rax
lea rax, str.2.5.29.15
mov dword [rcx + 8], 1
mov qword [rcx], rax
lea rdx, [rsp + 0x150]
mov rcx, rax
mov dword [rsp + 0x150], 2
mov dword [rsp + 0x160], 5
call fcn.140087c00
test eax, eax
je 0x140088de7
mov r8, qword [rsp + 0x148]
lea rcx, str.2.5.29.19
lea rdx, [rsp + 0x60]
mov qword [r8 + 0x20], rcx
mov eax, dword [rsp + 0x60]
add r8, 0x30
mov dword [r8 - 8], eax
call fcn.140087c00
test eax, eax
je 0x140088dc7
mov rdx, qword [rsi + 0x50]
mov edi, Ordinal_36
test rdx, rdx
je 0x1400888ff
mov ecx, dword [rsp + 0x140]
mov rax, qword [rsp + 0x148]
mov r8, rdi
shl rcx, 5
add rcx, rax
call sub.msvcrt.dll_memcpy
mov edx, dword [rsp + 0x140]
inc edx
mov dword [rsp + 0x140], edx
jmp 0x140088906
mov edx, dword [rsp + 0x140]
cmp qword [rsi + 0x58], r12
je 0x140088939
mov rax, qword [rsp + 0x148]
mov ecx, edx
mov rdx, qword [rsi + 0x58]
shl rcx, 5
mov r8, rdi
add rcx, rax
call sub.msvcrt.dll_memcpy
mov edx, dword [rsp + 0x140]
inc edx
mov dword [rsp + 0x140], edx
cmp qword [rsi + 0x60], r12
je 0x140088963
mov rax, qword [rsp + 0x148]
mov ecx, edx
mov rdx, qword [rsi + 0x60]
shl rcx, 5
mov r8, rdi
add rcx, rax
call sub.msvcrt.dll_memcpy
inc dword [rsp + 0x140]
mov rdx, qword [rsp + 0x98]
lea rcx, str._s.cert__algorithm_:__S
call fcn.14000c020
mov rdx, qword [rsp + 0x98]
mov r8d, 0x80000000
mov ecx, 1
call qword [sym.imp.CRYPT32.dll_CryptFindOIDInfo]
test rax, rax
je 0x1400889a5
mov rdx, qword [rax + 0x10]
lea rcx, [0x1400e83c8]
call fcn.14000c020
lea rcx, str._n_s.cert__validity__:
call fcn.14000c020
lea rcx, [rsp + 0xc0]
call fcn.140012dec
lea rcx, [0x1400f6e80]
call fcn.14000c020
lea rcx, [rsp + 0xc8]
call fcn.140012dec
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000c020
mov rdx, qword [rbx + 8]
lea rcx, str._s.key___provider__:__s_n
call fcn.14000c020
call fcn.140012e94
mov qword [rbx], rax
test rax, rax
je 0x140088da7
lea rcx, str._s.key___container_:__s_n
mov rdx, rax
call fcn.14000c020
mov r9d, dword [rbx + 0x10]
mov r8, qword [rbx + 8]
lea rcx, [rbx + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140088a88
mov rcx, qword [rbx + 0x40]
xor r9d, r9d
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], r12
lea edx, [r9 + 3]
xor r8d, r8d
call fcn.1400051f8
test eax, eax
je 0x140088a7c
mov r13d, dword [rsp + 0x5c]
and r13d, 1
je 0x140088a7c
mov r8, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x40]
and dword [rbx + 0x14], 0xffffffbf
and dword [rbx + 0x38], 0xfffffffe
mov edx, r13d
call fcn.1400880a4
mov rcx, qword [rbx + 0x40]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rbx + 0x14]
mov r9d, dword [rbx + 0x10]
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
or eax, 8
lea rcx, [rbx + 0x40]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140088d88
mov r8, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x40]
mov edx, r13d
call fcn.1400880a4
movzx edx, word [rbx + 0x3c]
lea rcx, str._s.key___gen___4hu_:
call fcn.14000c020
movzx r8d, word [rbx + 0x3c]
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x40]
shl r8d, 0x10
lea r9, [rsp + 0x70]
or r8d, dword [rbx + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140088d61
lea rcx, [0x1400f6ec8]
call fcn.14000c020
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x40]
call fcn.140087ff0
mov rbp, rax
test rax, rax
je 0x140088d54
lea rcx, [rsp + 0xe0]
mov rdx, rax
mov r8d, 0x30
call sub.msvcrt.dll_memcpy
mov rdi, qword [rsp + 0x148]
lea rax, [rsp + 0x150]
lea rcx, [rsp + 0x240]
mov qword [rsp + 0x1b8], rax
mov dword [rsp + 0x1b0], SQLAllocHandle
call sub.advapi32.dll_A_SHAInit
mov r8d, dword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
lea rcx, [rsp + 0x240]
call sub.advapi32.dll_A_SHAUpdate
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0x240]
call sub.advapi32.dll_A_SHAFinal
and dword [rdi + 0x48], r12d
lea rcx, str.2.5.29.14
lea r8, [rdi + 0x50]
lea rdx, [rsp + 0x1b0]
mov qword [rdi + 0x40], rcx
call fcn.140087c00
test eax, eax
je 0x140088d48
mov eax, dword [rsp + 0x140]
lea rcx, [rsp + 0xb0]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x30], rcx
shl rax, 5
lea r8, [rsp + 0x78]
add rax, qword [rsp + 0x148]
xor edx, edx
mov rcx, r15
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
call fcn.1400883bc
test eax, eax
je 0x140088c47
mov eax, dword [rsp + 0x140]
lea rcx, [rsp + 0xb0]
mov r12, rax
inc eax
shl r12, 5
mov dword [rsp + 0x140], eax
add r12, qword [rsp + 0x148]
call fcn.140088238
mov rdi, rax
test rax, rax
je 0x140088c58
lea rcx, str.__i.cert__subject__:__s_n
mov rdx, rax
call fcn.14000c020
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140088c58
movaps xmm0, xmmword [rsp + 0xd0]
movdqu xmmword [rsp + 0xb0], xmm0
lea rcx, str._s.cert__signature_:
call fcn.14000c020
mov rcx, qword [rsp + 0x78]
mov edx, dword [rsp + 0x40]
test rcx, rcx
jne 0x140088c79
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x40]
mov rax, qword [rsp + 0x3f8]
mov rdi, qword [rsp + 0x3f0]
lea r9, [rsp + 0x80]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x98]
mov r8d, 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140088130
mov r14d, eax
test eax, eax
je 0x140088d12
lea rcx, [0x1400f6ec8]
call fcn.14000c020
test r13d, r13d
je 0x140088d12
lea rcx, str._s.key___cert.assoc:
call fcn.14000c020
mov r8, qword [rdi]
mov rcx, qword [rsp + 0x70]
xor r9d, r9d
lea edx, [r9 + 0x1a]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140088cfe
lea rcx, [0x1400f6ec8]
call fcn.14000c020
jmp 0x140088d12
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptSetKeyParam_KP_CERTIFICATE___0x_08x__n
mov edx, eax
call fcn.14000c020
test r12, r12
je 0x140088d22
mov rcx, qword [r12 + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8, qword [rsp + 0x78]
mov edx, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x58]
call fcn.140088358
mov rcx, qword [rsp + 0x148]
add rcx, 0x58
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140088d54
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SKI_n
call fcn.14000c020
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140088d75
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptGenKey__0x_08x__n
mov edx, eax
call fcn.14000c020
test r14d, r14d
jne 0x140088db3
mov rcx, qword [rbx + 0x40]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x140088d9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptAcquireContext_CRYPT_NEWKEYSET___0x_08x__n
mov edx, eax
call fcn.14000c020
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140088db3
lea rcx, str.ERROR_generateCertificate___Unable_to_generate_a_container_name_n
call fcn.14000c020
mov rcx, qword [rsp + 0x148]
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140088dd3
lea rcx, str.ERROR_generateCertificate___Unable_to_create_BC2_n
call fcn.14000c020
mov rcx, qword [rsp + 0x148]
add rcx, 0x18
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140088df3
lea rcx, str.ERROR_generateCertificate___Unable_to_create_KU_n
call fcn.14000c020
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008879b
lea rcx, str.ERROR_generateCertificate___Unable_to_create_Subject_n
call fcn.14000c020
lea r11, [rsp + 0x3a0]
mov eax, r14d
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret