Function at 0x140002000
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push r15
mov eax, 0x10c8
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.140004990
sub rsp, rax
movups xmmword [rsp + 0x1080], xmm6
movups xmmword [rsp + 0x1090], xmm7
movups xmmword [rsp + 0x10a0], xmm8
movups xmmword [rsp + 0x10b0], xmm9
lea rax, str.2.5.29.10
lea rbp, str.2.5.29.15
movq xmm8, rax
lea rax, [rsp + 0x380]
mov dword [rsp + 0x1118], edx
mov r9, rcx
lea rdx, str.2.5.29.37
movq xmm6, rax
lea r14, [rsp + 0x880]
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x1110], rcx
movq xmm1, rdx
lea rbx, [rsp + 0x480]
mov edx, 0x400
mov rcx, r14
mov qword [rsp + 0x1120], r8
movq xmm7, rax
punpcklqdq xmm6, xmm8
lea r8, str.CNDigiCert_Inc.
lea rax, [rsp + 0xe0]
punpcklqdq xmm7, xmm1
lea r12, [rsp + 0x280]
movq xmm9, rax
mov qword [rsp + 0x80], rax
call fcn.140001eb0
mov rdi, qword [sym.imp.KERNEL32.dll_GetSystemTime]
mov rcx, rbx
punpcklqdq xmm9, xmm8
call rdi
mov rcx, rbx
movdqu xmm2, xmmword [rsp + 0x480]
movups xmmword [rsp + 0xf0], xmm2
call rdi
lea rax, [rsp + 0x150]
xor r9d, r9d
mov rdx, r14
mov qword [rsp + 0x78], rax
mov rsi, qword [sym.imp.CRYPT32.dll_CertStrToNameW]
mov r8d, 0x38000003
mov ecx, 0x10001
add word [rsp + 0x480], 0x1e
movdqu xmm3, xmmword [rsp + 0x480]
mov qword [rsp + 0x2b8], rax
lea rax, [rsp + 0x110]
mov dword [rsp + 0x110], 0x100
mov qword [rsp + 0x118], rbx
mov qword [rsp + 0x280], rbp
mov dword [rsp + 0x288], 0
mov dword [rsp + 0x290], 8
mov dword [rsp + 0x2a8], 1
mov dword [rsp + 0x2b0], 0x20
mov dword [rsp + 0x130], 2
mov qword [rsp + 0x138], r12
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x58], rsi
movups xmmword [rsp + 0x100], xmm3
movups xmmword [rsp + 0x298], xmm9
call rsi
test eax, eax
je 0x140002737
mov rax, qword [rsp + 0x138]
lea r13, [rsp + 0xd0]
mov byte [rsp + 0xd0], 0xc6
lea r15, [rsp + 0x1b0]
mov qword [rsp + 0x98], r13
mov r8, r15
mov rdx, rbp
mov rsi, qword [sym.imp.CRYPT32.dll_CryptEncodeObject]
mov r9, qword [rax + 0x18]
add rax, 0x10
mov dword [rsp + 0x1b0], 1
mov ecx, 0x10001
mov dword [rsp + 0x1c0], 0
mov qword [rsp + 0x1b8], r13
mov qword [rsp + 0x20], rax
call rsi
test eax, eax
je 0x140002737
mov rax, qword [rsp + 0x138]
pxor xmm0, xmm0
mov byte [rsp + 0xd0], pe_nt_image_headers64
mov r8, r15
movups xmmword [rsp + 0x1b4], xmm0
movq rdx, xmm8
mov ecx, 0x10001
movups xmmword [rsp + 0x1c4], xmm0
add rax, 0x30
movups xmmword [rsp + 0x1d0], xmm0
mov r9, qword [rax + 8]
mov dword [rsp + 0x1b0], 1
mov dword [rsp + 0x1c0], 6
mov qword [rsp + 0x1b8], r13
mov qword [rsp + 0x20], rax
call rsi
test eax, eax
je 0x140002737
lea rcx, [rsp + 0x130]
mov rdx, qword [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x70], rcx
lea r13, [rsp + 0x100]
mov qword [rsp + 0x38], rcx
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0x28], rcx
xor ecx, ecx
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x20], 0
call qword [sym.imp.CRYPT32.dll_CertCreateSelfSignCertificate]
mov qword [rsp + 0x68], rax
test rax, rax
je 0x140002737
cmp dword [rsp + 0x1118], 1
lea rdx, str.Root
mov ecx, 0xa
sbb eax, eax
mov qword [rsp + 0x20], rdx
xor r8d, r8d
xor edx, edx
xor ax, ax
lea r9d, [rax + 0x20000]
call qword [sym.imp.CRYPT32.dll_CertOpenStore]
mov qword [rsp + 0x90], rax
test rax, rax
je 0x140002b68
mov rdx, qword [rsp + 0x68]
mov rcx, rax
mov r9, r15
mov r8d, 2
call qword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
je 0x140002778
mov rax, qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
call rax
mov rcx, qword [rsp + 0x90]
xor edx, edx
call qword [sym.imp.CRYPT32.dll_CertCloseStore]
mov rax, qword [rsp + 0x1b0]
mov qword [rsp + 0x68], rax
test rax, rax
je 0x140002737
mov r9, qword [rsp + 0x1110]
lea r8, str.CN_s
mov edx, 0x400
mov rcx, r14
call fcn.140001eb0
mov rcx, rbx
call rdi
mov rcx, rbx
movdqu xmm4, xmmword [rsp + 0x480]
movups xmmword [rsp + 0xd0], xmm4
call rdi
mov rax, qword [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x108], r12
mov rdx, r14
mov r8d, 0x38000003
mov ecx, 0x10001
add word [rsp + 0x480], 0x1e
movdqu xmm5, xmmword [rsp + 0x480]
mov qword [rsp + 0x1a8], rax
mov rax, qword [rsp + 0x58]
mov dword [rsp + 0x100], 0x100
mov qword [rsp + 0x150], rbp
mov dword [rsp + 0x158], 0
mov dword [rsp + 0x160], 8
mov dword [rsp + 0x178], 0
mov dword [rsp + 0x180], 0x100
mov dword [rsp + 0x198], 1
mov dword [rsp + 0x1a0], 0x20
mov dword [rsp + 0xbc], 0x400
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], r12
movups xmmword [rsp + 0xe0], xmm5
movups xmmword [rsp + 0x168], xmm7
movups xmmword [rsp + 0x188], xmm6
call rax
test eax, eax
je 0x140002728
lea rax, [rsp + 0x160]
mov r8, rbx
mov byte [rsp + 0x1b0], pe_nt_image_headers64
mov r9, qword [rsp + 0x168]
mov qword [rsp + 0x488], r15
mov rdx, rbp
mov ecx, 0x10001
mov dword [rsp + 0x480], 1
mov dword [rsp + 0x490], 0
mov qword [rsp + 0x20], rax
call rsi
test eax, eax
je 0x140002728
lea rax, str.1.3.6.1.5.5.7.3.3
mov r8, rbx
mov dword [rsp + 0x480], 1
mov r9, qword [rsp + 0x188]
mov qword [rsp + 0x1b0], rax
mov edx, 0x24
mov ecx, 0x10001
lea rax, [rsp + 0x180]
mov qword [rsp + 0x488], r15
mov qword [rsp + 0x20], rax
call rsi
test eax, eax
je 0x140002728
pxor xmm0, xmm0
mov r8, rbx
lea rax, [rsp + 0x1a0]
mov byte [rsp + 0x1b0], 0x40
mov qword [rsp + 0x20], rax
movq rdx, xmm8
mov ecx, 0x10001
mov r9, qword [rsp + 0x1a8]
movups xmmword [rsp + 0x484], xmm0
movups xmmword [rsp + 0x494], xmm0
mov dword [rsp + 0x480], 1
mov dword [rsp + 0x490], 6
mov qword [rsp + 0x488], r15
movups xmmword [rsp + 0x4a0], xmm0
call rsi
test eax, eax
je 0x140002728
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov ecx, eax
call sub.api_ms_win_crt_utility_l1_1_0.dll_srand
mov rsi, qword [rsp + 0xa0]
nop dword [rax + rax]
call sub.api_ms_win_crt_utility_l1_1_0.dll_rand
add rsi, 1
cdq
shr edx, 0x18
add eax, edx
movzx eax, al
sub eax, edx
mov byte [rsi - 1], al
cmp r13, rsi
jne 0x1400025e0
mov dword [rsp + 0x20], 8
mov rdx, r14
mov rcx, r15
mov rbp, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov r9d, 1
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov qword [rsp + 0x1b0], 0
mov qword [rsp + 0x480], 0
mov dword [rsp + 0x110], 0
call rbp
test eax, eax
jne 0x14000267d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x8009000f
jne 0x140002728
mov dword [rsp + 0x20], 0
mov r9d, 1
mov rdx, r14
mov rcx, r15
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
call rbp
test eax, eax
je 0x140002728
mov rcx, qword [rsp + 0x1b0]
mov r8, rbx
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x1400026b4
xor r8d, r8d
mov rcx, qword [rsp + 0x1b0]
mov r9, rbx
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140002711
mov rcx, qword [rsp + 0x480]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], 0
lea r9, str.1.2.840.113549.1.1.1
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x1b0]
mov r8d, 0x10001
mov edx, 2
mov qword [rsp + 0x38], rax
mov rdi, qword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfoEx]
mov dword [rsp + 0x20], 0
call rdi
test eax, eax
jne 0x1400027d0
mov rcx, qword [rsp + 0x1b0]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop dword [rax]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x88]
call rax
xor ebx, ebx
movups xmm6, xmmword [rsp + 0x1080]
mov rax, rbx
movups xmm7, xmmword [rsp + 0x1090]
movups xmm8, xmmword [rsp + 0x10a0]
movups xmm9, xmmword [rsp + 0x10b0]
add rsp, 0x10c8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x68]
mov dword [rsp + 0xac], eax
mov rax, qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov qword [rsp + 0x88], rax
call rax
mov rcx, qword [rsp + 0x90]
xor edx, edx
call qword [sym.imp.CRYPT32.dll_CertCloseStore]
mov r8d, dword [rsp + 0xac]
test r8d, r8d
je 0x140002399
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140002737
xor ecx, ecx
mov edx, dword [rsp + 0x110]
mov r14, qword [sym.imp.KERNEL32.dll_LocalAlloc]
call r14
mov dword [rsp + 0x20], 0
lea r9, str.1.2.840.113549.1.1.1
mov rcx, qword [rsp + 0x1b0]
mov rsi, rax
mov rax, qword [rsp + 0x60]
mov r8d, 0x10001
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x30], rsi
mov edx, 2
mov qword [rsp + 0x38], rax
call rdi
test eax, eax
je 0x140002b78
mov rcx, qword [rsp + 0x1b0]
mov r12, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor edx, edx
call r12
test rsi, rsi
je 0x140002728
xor eax, eax
lea rdi, [rsp + 0x1b8]
mov ecx, 0x19
mov qword [rsp + 0x1b4], 0
mov r13, qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea rdx, [rsp + 0x1f0]
mov qword [rsp + 0x278], 0
rep stosq qword [rdi], rax
lea rdi, str.1.2.840.113549.1.1.5
mov dword [rsp + 0x1b0], 2
mov dword [rsp + 0x1b8], 0x10
movq xmm4, rdi
movq xmm0, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x68]
punpcklqdq xmm0, xmm4
movups xmmword [rsp + 0x1c0], xmm0
mov rax, qword [rcx + 0x18]
mov rcx, qword [rsp + 0x98]
movdqu xmm5, xmmword [rax + 0x50]
movups xmmword [rsp + 0x1e0], xmm5
call r13
mov rcx, qword [rsp + 0x80]
lea rdx, [rsp + 0x1f8]
call r13
mov rcx, qword [rsp + 0x68]
movdqu xmm2, xmmword [rsi]
pxor xmm0, xmm0
xor r8d, r8d
mov r13, qword [sym.imp.CRYPT32.dll_CertGetCertificateContextProperty]
mov edx, 2
movdqu xmm1, xmmword [rsp + 0x100]
mov rax, qword [rcx + 0x18]
movups xmmword [rsp + 0x210], xmm2
movdqu xmm3, xmmword [rsi + 0x10]
movups xmmword [rsp + 0x200], xmm1
movdqu xmm5, xmmword [rax + 0xa8]
mov rax, qword [rax + 0xb8]
movups xmmword [rsp + 0x220], xmm3
movdqu xmm4, xmmword [rsi + 0x20]
mov qword [rsp + 0x110], rdi
lea rdi, [rsp + 0xc0]
mov qword [rsp + 0x250], rax
mov rax, qword [rsp + 0x78]
mov r9, rdi
mov dword [rsp + 0x270], 3
mov qword [rsp + 0x278], rax
mov qword [rsp + 0x480], 0
mov dword [rsp + 0xc0], 0
movups xmmword [rsp + 0x230], xmm4
movups xmmword [rsp + 0x240], xmm5
movups xmmword [rsp + 0x118], xmm0
call r13
test eax, eax
jne 0x140002a98
mov r13, qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbp, qword [rsp + 0x480]
test rbp, rbp
je 0x140002b48
lea rax, [rsp + 0xbc]
mov qword [rsp + 0x38], rbx
mov edx, 2
mov r9d, 2
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x60]
mov r8d, 1
mov rcx, rbp
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x140002b08
mov rcx, rbp
xor edx, edx
call r12
mov rcx, rsi
call r13
mov qword [rsp + 0x28], rdi
mov r8, rbx
mov r9d, dword [rsp + 0xbc]
mov edx, 0x10001
mov dword [rsp + 0x20], 2
mov rcx, qword [rsp + 0x1120]
call qword [sym.imp.CRYPT32.dll_CertAddEncodedCertificateToStore]
test eax, eax
je 0x140002728
xor r8d, r8d
mov rcx, qword [rsp + 0xc0]
mov edx, 0x10000
call qword [sym.imp.CRYPT32.dll_CryptFindCertificateKeyProvInfo]
test eax, eax
je 0x140002bb7
mov rbx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x88]
call rax
jmp 0x140002739
mov edx, dword [rsp + 0xc0]
xor ecx, ecx
call r14
mov rcx, qword [rsp + 0x68]
mov r9, rdi
mov edx, 2
mov r14, rax
mov r8, rax
call r13
mov r13, qword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x1400029b9
mov eax, dword [r14 + 0x14]
mov r9d, dword [r14 + 0x10]
mov rcx, rbx
mov r8, qword [r14 + 8]
mov rdx, qword [r14]
mov dword [rsp + 0x20], eax
call rbp
test eax, eax
jne 0x140002af1
mov qword [rsp + 0x480], 0
mov r13, qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call r13
jmp 0x1400029b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
mov rcx, rbp
mov r15d, eax
call r12
mov rcx, rsi
call r13
test r15d, r15d
je 0x140002a24
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x88]
call rax
jmp 0x140002737
mov rcx, rsi
call r13
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x88]
call rax
jmp 0x140002737
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
jmp 0x140002737
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
mov rcx, qword [rsp + 0x1b0]
mov r12, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edi, eax
call r12
test edi, edi
je 0x14000283e
test rsi, rsi
je 0x140002baa
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140002728
mov rdi, qword [rsp + 0x88]
mov rcx, qword [rsp + 0xc0]
mov rax, rdi
call rax
mov rcx, qword [rsp + 0x68]
mov rax, rdi
call rax
jmp 0x140002737