Function at 0x180057a94
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 - 0x2c8]
sub rsp, 0x390
xor r12d, r12d
mov rdi, rcx
mov rsi, r8
lea eax, [r12 + 1]
mov rbx, rdx
lea rcx, [rbp + 0x1b8]
mov dword [rbp + 0x60], eax
mov dword [rbp + 0x70], eax
mov dword [rbp + 0x80], eax
mov dword [rbp + 0x90], eax
lea rax, [rbp + 0x60]
mov r8d, 0xd8
mov qword [rsp + 0x40], rax
mov eax, dword [rdx + 0x48]
xor edx, edx
mov r14d, r12d
mov r15d, r12d
mov qword [rbp + 0x68], r12
mov dword [rsp + 0x50], eax
mov qword [rbp + 0x78], r12
mov qword [rbp + 0x88], r12
mov qword [rbp + 0x98], r12
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x54], r12
mov qword [rbp + 0x1b0], r12
call fcn.180079090
lea rcx, [rbp - 0x68]
xor edx, edx
mov r8d, Ordinal_203
mov r13d, r12d
call fcn.180079090
cmp qword [rbx + 0x40], r12
mov r8, qword [rbx + 0x10]
lea rax, [rbp + 0x1b0]
lea rdx, str.2.5.4.3
lea rcx, [rbp + 0xb0]
mov qword [rbp + 0x58], rax
lea rax, str.1.2.840.113549.1.1.5
mov dword [rbp - 0x70], 2
cmovne rax, qword [rbx + 0x40]
mov dword [rbp + 0x50], 3
mov qword [rbp - 0x58], rax
call fcn.180057540
test eax, eax
je 0x180057ba7
mov ecx, dword [rsp + 0x38]
lea rdx, [rbp + 0xb0]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x68], rdx
mov dword [rsp + 0x38], ecx
mov r8, qword [rbx + 0x18]
lea rdx, str.2.5.4.11
lea rcx, [rbp + 0xd0]
call fcn.180057540
test eax, eax
je 0x180057bdd
mov ecx, dword [rsp + 0x38]
lea rdx, [rbp + 0xd0]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x68], rdx
mov dword [rsp + 0x38], ecx
mov r8, qword [rbx + 0x20]
lea rdx, str.2.5.4.10
lea rcx, [rbp + 0xf0]
call fcn.180057540
test eax, eax
je 0x180057c13
mov ecx, dword [rsp + 0x38]
lea rdx, [rbp + 0xf0]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x68], rdx
mov dword [rsp + 0x38], ecx
mov r8, qword [rbx + 0x28]
lea rdx, str.2.5.4.6
lea rcx, [rbp + 0x110]
call fcn.180057540
test eax, eax
je 0x180057c49
mov ecx, dword [rsp + 0x38]
lea rdx, [rbp + 0x110]
mov eax, ecx
add rax, rax
inc ecx
mov qword [rbp + rax*8 + 0x68], rdx
mov dword [rsp + 0x38], ecx
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
mov r9, rsi
mov r8, rbx
call fcn.180057860
lea r8, [rbp - 0x20]
lea rdx, [rsp + 0x38]
mov ecx, 7
call fcn.1800571a4
test eax, eax
je 0x180058299
xor r9d, r9d
lea rdx, [rbp - 0x20]
mov dword [rsp + 0x20], r12d
lea r8d, [r9 + 3]
lea ecx, [r9 + 1]
call qword [sym.imp.CRYPT32.dll_CertNameToStrW]
test eax, eax
je 0x180057ca5
lea rcx, [rbp - 0x20]
mov edx, eax
call fcn.1800577f4
mov rsi, rax
jmp 0x180057ca8
mov rsi, r12
test rsi, rsi
je 0x180057cc5
lea rcx, str._s.cert__subject___:__s_n
mov rdx, rsi
call fcn.180008f6c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbx + 0x30]
lea rdx, [rbp - 0x68]
call fcn.180057644
test eax, eax
je 0x180058281
lea rcx, str._s.cert__serial____:
call fcn.180008f6c
mov edx, dword [rbp - 0x68]
mov rcx, qword [rbp - 0x60]
xor r8d, r8d
call fcn.18000e574
lea rcx, [0x1800964e8]
call fcn.180008f6c
mov rcx, qword [rbp + 0x58]
movzx r11d, word [rbx + 0x38]
mov word [rbp + 0x2d8], r11w
lea rax, [rbp + 0x2d8]
lea r8, [rcx + 0x10]
mov qword [rsp + 0x78], rax
lea rax, str.2.5.29.15
mov esi, 1
mov qword [rcx], rax
mov dword [rcx + 8], esi
lea rdx, [rsp + 0x70]
mov rcx, rax
mov dword [rsp + 0x70], 2
mov dword [rbp - 0x80], 5
call fcn.1800571a4
test eax, eax
je 0x180058269
mov r8, qword [rbp + 0x58]
lea rcx, str.2.5.29.19
lea rdx, [rsp + 0x50]
mov qword [r8 + 0x20], rcx
mov eax, dword [rsp + 0x50]
add r8, 0x30
mov dword [r8 - 8], eax
call fcn.1800571a4
test eax, eax
je 0x18005824d
mov rdx, qword [rbx + 0x50]
test rdx, rdx
je 0x180057daf
mov ecx, dword [rbp + 0x50]
lea r8d, [rsi + 0x1f]
shl rcx, 5
add rcx, qword [rbp + 0x58]
call fcn.180076230
mov r11d, dword [rbp + 0x50]
add r11d, esi
mov dword [rbp + 0x50], r11d
jmp 0x180057db3
mov r11d, dword [rbp + 0x50]
mov rdx, qword [rbx + 0x58]
test rdx, rdx
je 0x180057ddd
mov ecx, r11d
mov r8d, Ordinal_36
shl rcx, 5
add rcx, qword [rbp + 0x58]
call fcn.180076230
mov r11d, dword [rbp + 0x50]
add r11d, esi
mov dword [rbp + 0x50], r11d
mov rdx, qword [rbx + 0x60]
test rdx, rdx
je 0x180057dff
mov ecx, r11d
mov r8d, Ordinal_36
shl rcx, 5
add rcx, qword [rbp + 0x58]
call fcn.180076230
add dword [rbp + 0x50], esi
mov rdx, qword [rbp - 0x58]
lea rcx, str._s.cert__algorithm_:__S_n
call fcn.180008f6c
lea rcx, str._s.cert__validity__:
call fcn.180008f6c
lea rcx, [rbp - 0x30]
call fcn.18000e6cc
lea rcx, str.___
call fcn.180008f6c
lea rcx, [rbp - 0x28]
call fcn.18000e6cc
lea rcx, [0x1800964e8]
call fcn.180008f6c
mov rdx, qword [rdi + 8]
lea rcx, str._s.key___provider__:__s_n
call fcn.180008f6c
call fcn.18000e774
mov qword [rdi], rax
test rax, rax
je 0x180058231
lea rcx, str._s.key___container_:__s_n
mov rdx, rax
call fcn.180008f6c
mov r9d, dword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea rcx, [rdi + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x180057f0f
mov rcx, qword [rdi + 0x40]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x4c]
mov edx, 3
mov dword [rsp + 0x30], 4
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
test eax, eax
je 0x180057f03
mov r15d, dword [rsp + 0x4c]
and r15d, esi
je 0x180057f03
mov r8, qword [rdi + 0x30]
and dword [rdi + 0x14], 0xffffffbf
and dword [rdi + 0x38], 0xfffffffe
test r8, r8
je 0x180057f03
mov rcx, qword [rdi + 0x40]
xor r9d, r9d
lea edx, [r9 + 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
test eax, eax
jne 0x180057f03
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_makePin___CryptSetProvParam_PP_KEYEXCHANGE_PIN___0x_08x__n
mov edx, eax
call fcn.180008f6c
mov rcx, qword [rdi + 0x40]
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
lea rcx, [rdi + 0x40]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x180058212
mov r8, qword [rdi + 0x30]
test r15d, r15d
je 0x180057f6d
test r8, r8
je 0x180057f6d
mov rcx, qword [rdi + 0x40]
xor r9d, r9d
lea edx, [r9 + 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
test eax, eax
jne 0x180057f6d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_makePin___CryptSetProvParam_PP_KEYEXCHANGE_PIN___0x_08x__n
mov edx, eax
call fcn.180008f6c
movzx edx, word [rdi + 0x3c]
lea rcx, str._s.key___gen___4hu_:
call fcn.180008f6c
movzx r8d, word [rdi + 0x3c]
mov edx, dword [rdi + 0x28]
mov rcx, qword [rdi + 0x40]
shl r8d, 0x10
lea r9, [rsp + 0x60]
or r8d, dword [rdi + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x1800581eb
lea rcx, [0x1800a69b0]
call fcn.180008f6c
mov edx, dword [rdi + 0x28]
mov rcx, qword [rdi + 0x40]
call fcn.180057590
mov r12, rax
test rax, rax
je 0x1800581de
movups xmm0, xmmword [rax]
mov rbx, qword [rbp + 0x58]
lea rcx, [rbp + reloc.WLDAP32.dll_Ordinal_304]
mov dword [rbp + 0xa0], Ordinal_26
movaps xmmword [rbp - 0x10], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp], xmm1
movups xmm0, xmmword [rax + 0x20]
lea rax, [rsp + 0x70]
mov qword [rbp + 0xa8], rax
movaps xmmword [rbp + 0x10], xmm0
call qword [sym.imp.advapi32.dll_A_SHAInit]
mov r8d, dword [r12 + 0x18]
mov rdx, qword [r12 + 0x20]
lea rcx, [rbp + reloc.WLDAP32.dll_Ordinal_304]
call qword [sym.imp.advapi32.dll_A_SHAUpdate]
lea rdx, [rsp + 0x70]
lea rcx, [rbp + reloc.WLDAP32.dll_Ordinal_304]
call qword [sym.imp.advapi32.dll_A_SHAFinal]
lea rcx, str.2.5.29.14
lea r8, [rbx + 0x50]
lea rdx, [rbp + 0xa0]
xor r12d, r12d
mov qword [rbx + 0x40], rcx
mov dword [rbx + 0x48], r12d
call fcn.1800571a4
test eax, eax
je 0x1800581d2
mov eax, dword [rbp + 0x50]
lea rcx, [rbp - 0x40]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rbp + 0x2e0]
shl rax, 5
add rax, qword [rbp + 0x58]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x20], rax
call fcn.18005795c
test eax, eax
je 0x1800580f3
mov eax, dword [rbp + 0x50]
lea r8d, [r12 + 3]
lea rdx, [rbp - 0x40]
mov r13d, eax
inc eax
xor r9d, r9d
shl r13, 5
mov ecx, esi
mov dword [rsp + 0x20], r12d
add r13, qword [rbp + 0x58]
mov dword [rbp + 0x50], eax
call qword [sym.imp.CRYPT32.dll_CertNameToStrW]
test eax, eax
je 0x1800580d1
lea rcx, [rbp - 0x40]
mov edx, eax
call fcn.1800577f4
mov rbx, rax
jmp 0x1800580d4
mov rbx, r12
test rbx, rbx
je 0x1800580fc
lea rcx, str.__i.cert__subject__:__s_n
mov rdx, rbx
call fcn.180008f6c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1800580fc
movaps xmm0, xmmword [rbp - 0x20]
movdqu xmmword [rbp - 0x40], xmm0
lea rcx, str._s.cert__signature_:
call fcn.180008f6c
mov rcx, qword [rsp + 0x68]
mov edx, dword [rsp + 0x30]
test rcx, rcx
jne 0x18005811d
mov edx, dword [rdi + 0x28]
mov rcx, qword [rdi + 0x40]
mov rax, qword [rbp + 0x2f0]
mov rbx, qword [rbp + 0x2e8]
lea r9, [rbp - 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rbp - 0x70]
mov qword [rsp + 0x20], rbx
call fcn.1800576f0
mov r14d, eax
test eax, eax
je 0x1800581a1
lea rcx, [0x1800a69b0]
call fcn.180008f6c
test r15d, r15d
je 0x1800581a1
lea rcx, str._s.key___cert.assoc:
call fcn.180008f6c
mov r8, qword [rbx]
mov rcx, qword [rsp + 0x60]
xor r9d, r9d
lea edx, [r9 + 0x1a]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x18005818d
lea rcx, [0x1800a69b0]
call fcn.180008f6c
jmp 0x1800581a1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptSetKeyParam_KP_CERTIFICATE___0x_08x__n
mov edx, eax
call fcn.180008f6c
test r13, r13
je 0x1800581b0
mov rcx, qword [r13 + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8, qword [rsp + 0x68]
mov edx, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x48]
call fcn.1800578f8
mov rcx, qword [rbp + 0x58]
add rcx, 0x58
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1800581de
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SKI_n
call fcn.180008f6c
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1800581ff
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptGenKey__0x_08x__n
mov edx, eax
call fcn.180008f6c
test r14d, r14d
jne 0x18005823d
mov rcx, qword [rdi + 0x40]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x180058226
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_generateCertificate___CryptAcquireContext_CRYPT_NEWKEYSET___0x_08x__n
mov edx, eax
call fcn.180008f6c
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18005823d
lea rcx, str.ERROR_generateCertificate___Unable_to_generate_a_container_name_n
call fcn.180008f6c
mov rcx, qword [rbp + 0x58]
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180058259
lea rcx, str.ERROR_generateCertificate___Unable_to_create_BC2_n
call fcn.180008f6c
mov rcx, qword [rbp + 0x58]
add rcx, 0x18
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180058275
lea rcx, str.ERROR_generateCertificate___Unable_to_create_KU_n
call fcn.180008f6c
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18005828d
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SN_n
call fcn.180008f6c
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1800582a5
lea rcx, str.ERROR_generateCertificate___Unable_to_create_Subject_n
call fcn.180008f6c
mov eax, r14d
mov rbx, qword [rsp + 0x3d0]
add rsp, 0x390
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret