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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x348
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x1a0], 1
mov qword [rsp + 0x1a8], 0
mov dword [rsp + 0x1b0], 1
mov qword [rsp + 0x1b8], 0
mov dword [rsp + 0x1c0], 1
mov qword [rsp + 0x1c8], 0
mov dword [rsp + 0x1d0], 1
mov qword [rsp + 0x1d8], 0
mov dword [rsp + 0x50], 0
lea rax, [rsp + 0x1a0]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x368]
mov eax, dword [rax + 0x48]
mov dword [rsp + 0xb8], eax
mov dword [rsp + 0xbc], 0
mov dword [rsp + 0xc0], 0
lea rax, [rsp + 0x260]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WLDAP32.dll_Ordinal_224
rep stosb byte [rdi], al
mov qword [rsp + 0x80], 0
lea rax, [rsp + 0xd0]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WLDAP32.dll_Ordinal_208
rep stosb byte [rdi], al
mov dword [rsp + 0xd0], 2
mov dword [rsp + 0x190], 3
lea rax, [rsp + 0x260]
mov qword [rsp + 0x198], rax
mov rax, qword [rsp + 0x368]
cmp qword [rax + 0x40], 0
je 0x1400e5a45
mov rax, qword [rsp + 0x368]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0x88], rax
jmp 0x1400e5a54
lea rax, str.1.2.840.113549.1.1.5
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0xe8], rax
mov eax, Ordinal_36
imul rax, rax, 0
lea rax, [rsp + rax + 0x1e0]
mov rcx, qword [rsp + 0x368]
mov r8, qword [rcx + 0x10]
lea rdx, str.2.5.4.3
mov rcx, rax
call fcn.1400e4f60
test eax, eax
je 0x1400e5abf
mov eax, Ordinal_36
imul rax, rax, 0
lea rax, [rsp + rax + 0x1e0]
mov ecx, dword [rsp + 0x50]
imul rcx, rcx, 0x10
mov qword [rsp + rcx + 0x1a8], rax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, Ordinal_36
imul rax, rax, 1
lea rax, [rsp + rax + 0x1e0]
mov rcx, qword [rsp + 0x368]
mov r8, qword [rcx + 0x18]
lea rdx, str.2.5.4.11
mov rcx, rax
call fcn.1400e4f60
test eax, eax
je 0x1400e5b1a
mov eax, Ordinal_36
imul rax, rax, 1
lea rax, [rsp + rax + 0x1e0]
mov ecx, dword [rsp + 0x50]
imul rcx, rcx, 0x10
mov qword [rsp + rcx + 0x1a8], rax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, Ordinal_36
imul rax, rax, 2
lea rax, [rsp + rax + 0x1e0]
mov rcx, qword [rsp + 0x368]
mov r8, qword [rcx + 0x20]
lea rdx, str.2.5.4.10
mov rcx, rax
call fcn.1400e4f60
test eax, eax
je 0x1400e5b75
mov eax, Ordinal_36
imul rax, rax, 2
lea rax, [rsp + rax + 0x1e0]
mov ecx, dword [rsp + 0x50]
imul rcx, rcx, 0x10
mov qword [rsp + rcx + 0x1a8], rax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, Ordinal_36
imul rax, rax, 3
lea rax, [rsp + rax + 0x1e0]
mov rcx, qword [rsp + 0x368]
mov r8, qword [rcx + 0x28]
lea rdx, str.2.5.4.6
mov rcx, rax
call fcn.1400e4f60
test eax, eax
je 0x1400e5bd0
mov eax, Ordinal_36
imul rax, rax, 3
lea rax, [rsp + rax + 0x1e0]
mov ecx, dword [rsp + 0x50]
imul rcx, rcx, 0x10
mov qword [rsp + rcx + 0x1a8], rax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x378]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x370]
mov r8, qword [rsp + 0x368]
lea rdx, [rsp + 0x118]
lea rcx, [rsp + 0x110]
call fcn.1400e5480
lea r8, [rsp + 0x120]
lea rdx, [rsp + 0x50]
mov ecx, 7
call fcn.1400e4850
test eax, eax
je 0x1400e655a
lea rcx, [rsp + 0x120]
call fcn.1400e53d0
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1400e5c57
mov rdx, qword [rsp + 0x48]
lea rcx, str._s.cert__subject___:__s_n
call fcn.140013fd0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdx, [rsp + 0xd8]
mov rax, qword [rsp + 0x368]
mov rcx, qword [rax + 0x30]
call fcn.1400e5170
test eax, eax
je 0x1400e653e
lea rcx, str._s.cert__serial____:
call fcn.140013fd0
xor r8d, r8d
mov edx, dword [rsp + 0xd8]
mov rcx, qword [rsp + 0xe0]
call fcn.1400204a0
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.140013fd0
mov eax, Ordinal_36
imul rax, rax, 0
mov rcx, qword [rsp + 0x198]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x368]
movzx r8d, word [rcx + 0x38]
mov edx, 1
mov rcx, rax
call fcn.1400e4a70
test eax, eax
je 0x1400e6522
mov eax, Ordinal_36
imul rax, rax, 1
mov rcx, qword [rsp + 0x198]
add rcx, rax
mov rax, rcx
lea rdx, [rsp + 0xb8]
mov rcx, rax
call fcn.1400e4f10
test eax, eax
je 0x1400e64f5
mov rax, qword [rsp + 0x368]
cmp qword [rax + 0x50], 0
je 0x1400e5d5b
mov rax, qword [rsp + 0x368]
mov rax, qword [rax + 0x50]
mov ecx, dword [rsp + 0x190]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0x198]
lea rdi, [rdx + rcx]
mov rsi, rax
mov ecx, Ordinal_36
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x190]
inc eax
mov dword [rsp + 0x190], eax
mov rax, qword [rsp + 0x368]
cmp qword [rax + 0x58], 0
je 0x1400e5da7
mov rax, qword [rsp + 0x368]
mov rax, qword [rax + 0x58]
mov ecx, dword [rsp + 0x190]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0x198]
lea rdi, [rdx + rcx]
mov rsi, rax
mov ecx, Ordinal_36
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x190]
inc eax
mov dword [rsp + 0x190], eax
mov rax, qword [rsp + 0x368]
cmp qword [rax + 0x60], 0
je 0x1400e5df3
mov rax, qword [rsp + 0x368]
mov rax, qword [rax + 0x60]
mov ecx, dword [rsp + 0x190]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0x198]
lea rdi, [rdx + rcx]
mov rsi, rax
mov ecx, Ordinal_36
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x190]
inc eax
mov dword [rsp + 0x190], eax
mov rdx, qword [rsp + 0xe8]
lea rcx, str._s.cert__algorithm_:__S
call fcn.140013fd0
mov r8d, 0x80000000
mov rdx, qword [rsp + 0xe8]
mov ecx, 1
call qword [sym.imp.CRYPT32.dll_CryptFindOIDInfo]
mov qword [rsp + 0x90], rax
cmp qword [rsp + 0x90], 0
je 0x1400e5e4b
mov rax, qword [rsp + 0x90]
mov rdx, qword [rax + 0x10]
lea rcx, [0x140187228]
call fcn.140013fd0
lea rcx, str._n_s.cert__validity__:
call fcn.140013fd0
lea rcx, [rsp + 0x110]
call fcn.1400206b0
lea rcx, [0x140195b60]
call fcn.140013fd0
lea rcx, [rsp + 0x118]
call fcn.1400206b0
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.140013fd0
mov rax, qword [rsp + 0x360]
mov rdx, qword [rax + 8]
lea rcx, str._s.key___provider__:__s_n
call fcn.140013fd0
call fcn.140020790
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x360]
mov rcx, qword [rsp + 0x98]
mov qword [rax], rcx
cmp qword [rsp + 0x98], 0
je 0x1400e64c8
mov rax, qword [rsp + 0x360]
mov rdx, qword [rax]
lea rcx, str._s.key___container_:__s_n
call fcn.140013fd0
mov rax, qword [rsp + 0x360]
add rax, 0x40
mov dword [rsp + 0x20], 0xf0000040
mov rcx, qword [rsp + 0x360]
mov r9d, dword [rcx + 0x10]
mov rcx, qword [rsp + 0x360]
mov r8, qword [rcx + 8]
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400e5fd2
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 3
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call fcn.1400084b0
test eax, eax
je 0x1400e5f64
mov eax, dword [rsp + 0x70]
and eax, 1
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
je 0x1400e5fbe
mov rax, qword [rsp + 0x360]
mov eax, dword [rax + 0x14]
and eax, 0xffffffbf
mov rcx, qword [rsp + 0x360]
mov dword [rcx + 0x14], eax
mov rax, qword [rsp + 0x360]
mov eax, dword [rax + 0x38]
and eax, 0xfffffffe
mov rcx, qword [rsp + 0x360]
mov dword [rcx + 0x38], eax
mov rax, qword [rsp + 0x360]
mov r8, qword [rax + 0x30]
mov edx, dword [rsp + 0x44]
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call fcn.1400e50c0
xor edx, edx
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rax, qword [rsp + 0x360]
mov eax, dword [rax + 0x14]
or eax, 8
mov rcx, qword [rsp + 0x360]
add rcx, 0x40
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x360]
mov r9d, dword [rax + 0x10]
mov rax, qword [rsp + 0x360]
mov r8, qword [rax + 8]
mov rax, qword [rsp + 0x360]
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400e649a
mov rax, qword [rsp + 0x360]
mov r8, qword [rax + 0x30]
mov edx, dword [rsp + 0x44]
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call fcn.1400e50c0
mov rax, qword [rsp + 0x360]
movzx eax, word [rax + 0x3c]
mov edx, eax
lea rcx, str._s.key___gen___4hu_:
call fcn.140013fd0
mov rax, qword [rsp + 0x360]
movzx eax, word [rax + 0x3c]
shl eax, 0x10
mov rcx, qword [rsp + 0x360]
mov ecx, dword [rcx + 0x38]
or ecx, eax
mov eax, ecx
lea r9, [rsp + 0xb0]
mov r8d, eax
mov rax, qword [rsp + 0x360]
mov edx, dword [rax + 0x28]
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x1400e6469
lea rcx, [0x140195ba8]
call fcn.140013fd0
mov rax, qword [rsp + 0x360]
mov edx, dword [rax + 0x28]
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call fcn.1400e4ff0
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x1400e6459
lea rax, [rsp + reloc.WLDAP32.dll_Ordinal_304]
mov rdi, rax
mov rsi, qword [rsp + 0x78]
mov ecx, 0x30
rep movsb byte [rdi], byte [rsi]
mov eax, Ordinal_36
imul rax, rax, 2
mov rcx, qword [rsp + 0x198]
add rcx, rax
mov rax, rcx
mov rdx, qword [rsp + 0x78]
mov rcx, rax
call fcn.1400e4c10
test eax, eax
je 0x1400e644d
mov eax, dword [rsp + 0x190]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x198]
add rcx, rax
mov rax, rcx
lea rcx, [rsp + 0x100]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x68]
mov rdx, qword [rsp + 0x378]
mov rcx, qword [rsp + 0x370]
call fcn.1400e56a0
test eax, eax
je 0x1400e61e7
mov eax, dword [rsp + 0x190]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x198]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x190]
inc eax
mov dword [rsp + 0x190], eax
lea rcx, [rsp + 0x100]
call fcn.1400e53d0
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1400e61e5
mov rdx, qword [rsp + 0x48]
lea rcx, str.__i.cert__subject__:__s_n
call fcn.140013fd0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e6204
lea rax, [rsp + 0x100]
lea rcx, [rsp + 0x120]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
lea rcx, str._s.cert__signature_:
call fcn.140013fd0
cmp qword [rsp + 0x68], 0
je 0x1400e6222
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x60], eax
jmp 0x1400e6231
mov rax, qword [rsp + 0x360]
mov eax, dword [rax + 0x28]
mov dword [rsp + 0x60], eax
cmp qword [rsp + 0x68], 0
je 0x1400e6248
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xa0], rax
jmp 0x1400e625c
mov rax, qword [rsp + 0x360]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x388]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x380]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xe8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xd0]
mov r8d, 2
mov edx, dword [rsp + 0x60]
mov rcx, qword [rsp + 0xa0]
call fcn.1400e5260
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1400e63fd
lea rcx, [0x140195ba8]
call fcn.140013fd0
cmp dword [rsp + 0x44], 0
je 0x1400e6317
lea rcx, str._s.key___cert.assoc:
call fcn.140013fd0
xor r9d, r9d
mov rax, qword [rsp + 0x380]
mov r8, qword [rax]
mov edx, reloc.WLDAP32.dll_Ordinal_26
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400e6303
lea rcx, [0x140195ba8]
call fcn.140013fd0
jmp 0x1400e6317
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_generateCertificate___CryptSetKeyParam_KP_CERTIFICATE___0x_08x__n
call fcn.140013fd0
cmp qword [rsp + 0x390], 0
je 0x1400e63fd
mov rax, qword [rsp + 0x390]
mov rcx, qword [rsp + 0x360]
mov rcx, qword [rcx + 0x40]
mov qword [rax], rcx
mov rax, qword [rsp + 0x390]
mov rcx, qword [rsp + 0x360]
mov ecx, dword [rcx + 0x28]
mov dword [rax + 8], ecx
mov rax, qword [rsp + 0x390]
mov rcx, qword [rsp + 0x110]
mov qword [rax + 0xc], rcx
mov rax, qword [rsp + 0x390]
mov rcx, qword [rsp + 0x118]
mov qword [rax + 0x14], rcx
mov rax, qword [rsp + 0x390]
mov ecx, dword [rsp + 0x120]
mov dword [rax + 0x20], ecx
mov rax, qword [rsp + 0x390]
mov eax, dword [rax + 0x20]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0x390]
mov rcx, qword [rsp + 0xa8]
mov qword [rax + 0x28], rcx
cmp qword [rsp + 0xa8], 0
je 0x1400e63f5
mov rax, qword [rsp + 0x390]
mov eax, dword [rax + 0x20]
mov r8d, eax
mov rdx, qword [rsp + 0x128]
mov rax, qword [rsp + 0x390]
mov rcx, qword [rax + 0x28]
call fcn.140161160
jmp 0x1400e63fd
mov dword [rsp + 0x40], 0
cmp qword [rsp + 0x80], 0
je 0x1400e641a
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8, qword [rsp + 0x68]
mov edx, dword [rsp + 0x64]
mov ecx, dword [rsp + 0x74]
call fcn.1400e5600
mov eax, Ordinal_36
imul rax, rax, 2
mov rcx, qword [rsp + 0x198]
lea rax, [rcx + rax + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e6459
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SKI_n
call fcn.140013fd0
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1400e647d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_generateCertificate___CryptGenKey__0x_08x__n
call fcn.140013fd0
cmp dword [rsp + 0x40], 0
jne 0x1400e6498
xor edx, edx
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x1400e64ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_generateCertificate___CryptAcquireContext_CRYPT_NEWKEYSET___0x_08x__n
call fcn.140013fd0
cmp dword [rsp + 0x40], 0
jne 0x1400e64c6
mov rax, qword [rsp + 0x360]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e64d4
lea rcx, str.ERROR_generateCertificate___Unable_to_generate_a_container_name_n
call fcn.140013fd0
mov eax, Ordinal_36
imul rax, rax, 1
mov rcx, qword [rsp + 0x198]
lea rax, [rcx + rax + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e6501
lea rcx, str.ERROR_generateCertificate___Unable_to_create_BC2_n
call fcn.140013fd0
mov eax, Ordinal_36
imul rax, rax, 0
mov rcx, qword [rsp + 0x198]
lea rax, [rcx + rax + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e652e
lea rcx, str.ERROR_generateCertificate___Unable_to_create_KU_n
call fcn.140013fd0
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e654a
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SN_n
call fcn.140013fd0
mov rcx, qword [rsp + 0x128]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400e6566
lea rcx, str.ERROR_generateCertificate___Unable_to_create_Subject_n
call fcn.140013fd0
mov eax, dword [rsp + 0x40]
add rsp, 0x348
pop rdi
pop rsi
ret