Function at 0x14008c7dc
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
xor esi, esi
mov r13, r8
mov rdi, rdx
mov qword [rbp + 0x58], rsi
mov rbx, rcx
mov qword [rbp + 0x68], rsi
mov r8d, reloc.WLDAP32.dll_Ordinal_224
mov qword [rbp + 0x78], rsi
lea eax, [rsi + 1]
mov qword [rbp + 0x88], rsi
mov dword [rbp + 0x50], eax
lea rcx, [rbp + 0x110]
mov dword [rbp + 0x60], eax
mov r12d, esi
mov dword [rbp + 0x70], eax
mov r15d, esi
mov dword [rbp + 0x80], eax
lea rax, [rbp + 0x50]
mov qword [rsp + 0x48], rax
mov eax, dword [rdx + 0x48]
xor edx, edx
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x58], eax
mov qword [rsp + 0x5c], rsi
call fcn.1400cb080
xor edx, edx
lea rcx, [rbp - 0x80]
mov r8d, reloc.WLDAP32.dll_Ordinal_208
mov r14d, esi
call fcn.1400cb080
cmp qword [rdi + 0x40], rsi
lea rax, [rbp + 0x110]
mov r8, qword [rdi + 0x10]
lea rdx, str.2.5.4.3
mov qword [rbp + 0x48], rax
lea rcx, [rbp + 0x90]
lea rax, str.1.2.840.113549.1.1.5
mov dword [rbp - 0x80], 2
cmovne rax, qword [rdi + 0x40]
mov qword [rbp - 0x68], rax
mov dword [rbp + 0x40], 3
call fcn.14008bf34
test eax, eax
je 0x14008c8da
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0x90]
mov eax, ecx
add rax, rax
inc ecx
mov dword [rsp + 0x40], ecx
mov qword [rbp + rax*8 + 0x58], rdx
mov r8, qword [rdi + 0x18]
lea rdx, str.2.5.4.11
lea rcx, [rbp + 0xb0]
call fcn.14008bf34
test eax, eax
je 0x14008c910
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0xb0]
mov eax, ecx
add rax, rax
inc ecx
mov dword [rsp + 0x40], ecx
mov qword [rbp + rax*8 + 0x58], rdx
mov r8, qword [rdi + 0x20]
lea rdx, str.2.5.4.10
lea rcx, [rbp + 0xd0]
call fcn.14008bf34
test eax, eax
je 0x14008c946
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0xd0]
mov eax, ecx
add rax, rax
inc ecx
mov dword [rsp + 0x40], ecx
mov qword [rbp + rax*8 + 0x58], rdx
mov r8, qword [rdi + 0x28]
lea rdx, str.2.5.4.6
lea rcx, [rbp + 0xf0]
call fcn.14008bf34
test eax, eax
je 0x14008c97c
mov ecx, dword [rsp + 0x40]
lea rdx, [rbp + 0xf0]
mov eax, ecx
add rax, rax
inc ecx
mov dword [rsp + 0x40], ecx
mov qword [rbp + rax*8 + 0x58], rdx
mov r9, r13
mov qword [rsp + 0x20], rsi
mov r8, rdi
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x40]
call fcn.14008c2e8
lea r8, [rbp - 0x30]
mov ecx, 7
lea rdx, [rsp + 0x40]
call fcn.14008baa8
test eax, eax
je 0x14008cefe
lea rcx, [rbp - 0x30]
call fcn.14008c264
mov rsi, rax
test rax, rax
je 0x14008c9d8
mov rdx, rax
lea rcx, str._s.cert__subject___:__s_n
call fcn.14000d9f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rdi + 0x30]
lea rdx, [rbp - 0x78]
call fcn.14008c0c4
test eax, eax
je 0x14008cee6
lea rcx, str._s.cert__serial____:
call fcn.14000d9f0
mov edx, dword [rbp - 0x78]
xor r8d, r8d
mov rcx, qword [rbp - 0x70]
call fcn.140016508
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000d9f0
movzx r8d, word [rdi + 0x38]
mov rcx, qword [rbp + 0x48]
call fcn.14008bc2c
test eax, eax
je 0x14008cece
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]
mov dword [r8 + 0x28], eax
add r8, 0x30
call fcn.14008baa8
test eax, eax
je 0x14008ceb2
mov rdx, qword [rdi + 0x50]
test rdx, rdx
je 0x14008ca85
mov ecx, dword [rbp + 0x40]
mov rax, qword [rbp + 0x48]
movups xmm0, xmmword [rdx]
shl rcx, 5
movups xmmword [rcx + rax], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rcx + rax + 0x10], xmm1
mov eax, dword [rbp + 0x40]
inc eax
mov dword [rbp + 0x40], eax
jmp 0x14008ca88
mov eax, dword [rbp + 0x40]
mov rdx, qword [rdi + 0x58]
test rdx, rdx
je 0x14008cab3
movups xmm0, xmmword [rdx]
mov ecx, eax
mov rax, qword [rbp + 0x48]
shl rcx, 5
movups xmmword [rcx + rax], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rcx + rax + 0x10], xmm1
mov eax, dword [rbp + 0x40]
inc eax
mov dword [rbp + 0x40], eax
mov rdx, qword [rdi + 0x60]
test rdx, rdx
je 0x14008cad9
movups xmm0, xmmword [rdx]
mov ecx, eax
mov rax, qword [rbp + 0x48]
shl rcx, 5
movups xmmword [rcx + rax], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rcx + rax + 0x10], xmm1
inc dword [rbp + 0x40]
mov rdx, qword [rbp - 0x68]
lea rcx, str._s.cert__algorithm_:__S
call fcn.14000d9f0
mov rdx, qword [rbp - 0x68]
mov r8d, 0x80000000
mov ecx, 1
call qword [sym.imp.CRYPT32.dll_CryptFindOIDInfo]
test rax, rax
je 0x14008cb13
mov rdx, qword [rax + 0x10]
lea rcx, [0x14014d0d8]
call fcn.14000d9f0
lea rcx, str._n_s.cert__validity__:
call fcn.14000d9f0
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x14008cb3c
lea rcx, [rsp + 0x50]
call fcn.140016608
lea rcx, [0x14015c6b8]
call fcn.14000d9f0
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x14008cb65
lea rcx, [rsp + 0x50]
call fcn.140016608
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000d9f0
mov rdx, qword [rbx + 8]
lea rcx, str._s.key___provider__:__s_n
call fcn.14000d9f0
call fcn.1400167e4
mov qword [rbx], rax
test rax, rax
je 0x14008ce96
mov rdx, rax
lea rcx, str._s.key___container_:__s_n
call fcn.14000d9f0
mov r9d, dword [rbx + 0x10]
lea rdi, [rbx + 0x40]
mov r8, qword [rbx + 8]
mov rcx, rdi
xor edx, edx
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14008cc12
mov rcx, qword [rdi]
lea rax, [rbp + 0x238]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea edx, [r9 + 3]
call fcn.140005dc8
test eax, eax
je 0x14008cc07
mov r15d, dword [rbp + 0x238]
and r15d, 1
je 0x14008cc07
and dword [rbx + 0x14], 0xffffffbf
mov edx, r15d
and dword [rbx + 0x38], 0xfffffffe
mov r8, qword [rbx + 0x30]
mov rcx, qword [rdi]
call fcn.14008c038
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rbx + 0x14]
mov rcx, rdi
mov r9d, dword [rbx + 0x10]
or eax, 8
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14008ce77
mov r8, qword [rbx + 0x30]
mov edx, r15d
mov rcx, qword [rdi]
call fcn.14008c038
movzx edx, word [rbx + 0x3c]
lea rcx, str._s.key___gen___4hu_:
call fcn.14000d9f0
movzx r8d, word [rbx + 0x3c]
lea r9, [rsp + 0x70]
mov edx, dword [rbx + 0x28]
mov rcx, qword [rdi]
shl r8d, 0x10
or r8d, dword [rbx + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x14008ce51
lea rcx, [0x14015c730]
call fcn.14000d9f0
mov edx, dword [rbx + 0x28]
mov rcx, qword [rdi]
call fcn.14008bf84
test rax, rax
je 0x14008ce44
movups xmm0, xmmword [rax]
mov rcx, qword [rbp + 0x48]
mov rdx, rax
add rcx, 0x40
movaps xmmword [rbp - 0x20], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp - 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movaps xmmword [rbp], xmm0
call fcn.14008bd2c
test eax, eax
je 0x14008ce38
mov eax, dword [rbp + 0x40]
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x30], rcx
lea r9, [rbp + 0x248]
shl rax, 5
lea r8, [rsp + 0x68]
add rax, qword [rbp + 0x48]
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, r13
lea rax, [rbp + 0x260]
mov qword [rsp + 0x20], rax
call fcn.14008c414
test eax, eax
je 0x14008cd49
mov eax, dword [rbp + 0x40]
lea rcx, [rbp - 0x50]
mov r14d, eax
inc eax
shl r14, 5
add r14, qword [rbp + 0x48]
mov dword [rbp + 0x40], eax
call fcn.14008c264
mov rsi, rax
test rax, rax
je 0x14008cd52
mov rdx, rax
lea rcx, str.__i.cert__subject__:__s_n
call fcn.14000d9f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008cd52
movaps xmm0, xmmword [rbp - 0x30]
movdqu xmmword [rbp - 0x50], xmm0
lea rcx, str._s.cert__signature_:
call fcn.14000d9f0
mov rcx, qword [rsp + 0x68]
mov edx, dword [rbp + 0x248]
test rcx, rcx
jne 0x14008cd74
mov edx, dword [rbx + 0x28]
mov rcx, qword [rdi]
mov rax, qword [rbp + 0x258]
lea r9, [rbp - 0x80]
mov rsi, qword [rbp + 0x250]
mov r8d, 2
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x68]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rax
call fcn.14008c15c
mov r12d, eax
test eax, eax
je 0x14008ce03
lea rcx, [0x14015c730]
call fcn.14000d9f0
test r15d, r15d
je 0x14008ce03
lea rcx, str._s.key___cert.assoc:
call fcn.14000d9f0
mov r8, qword [rsi]
xor r9d, r9d
mov rcx, qword [rsp + 0x70]
lea edx, [r9 + 0x1a]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x14008cdef
lea rcx, [0x14015c730]
call fcn.14000d9f0
jmp 0x14008ce03
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_generateCertificate___CryptSetKeyParam_KP_CERTIFICATE___0x_08x__n
call fcn.14000d9f0
test r14, r14
je 0x14008ce12
mov rcx, qword [r14 + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8, qword [rsp + 0x68]
mov edx, dword [rbp + 0x248]
mov ecx, dword [rbp + 0x260]
call fcn.14008c3b0
mov rcx, qword [rbp + 0x48]
add rcx, 0x58
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008ce44
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SKI_n
call fcn.14000d9f0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x14008ce65
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_generateCertificate___CryptGenKey__0x_08x__n
call fcn.14000d9f0
test r12d, r12d
jne 0x14008cea2
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x14008ce8b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_generateCertificate___CryptAcquireContext_CRYPT_NEWKEYSET___0x_08x__n
call fcn.14000d9f0
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008cea2
lea rcx, str.ERROR_generateCertificate___Unable_to_generate_a_container_name_n
call fcn.14000d9f0
mov rcx, qword [rbp + 0x48]
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008cebe
lea rcx, str.ERROR_generateCertificate___Unable_to_create_BC2_n
call fcn.14000d9f0
mov rcx, qword [rbp + 0x48]
add rcx, 0x18
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008ceda
lea rcx, str.ERROR_generateCertificate___Unable_to_create_KU_n
call fcn.14000d9f0
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008cef2
lea rcx, str.ERROR_generateCertificate___Unable_to_create_SN_n
call fcn.14000d9f0
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14008cf0a
lea rcx, str.ERROR_generateCertificate___Unable_to_create_Subject_n
call fcn.14000d9f0
mov rbx, qword [rsp + 0x330]
mov eax, r12d
add rsp, 0x2f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret