Function at 0x14003fe3c
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
xor ebx, ebx
mov byte [rdx], 0
mov r14, rdx
mov rdi, rcx
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetTickCount]
mov ebp, eax
mov r9d, 0x18
mov dword [rsp + 0x20], 0x20
lea r8, [0x1400fe710]
mov rcx, rdi
lea rdx, str.WebbRootCA
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptAcquireContextW]
mov esi, eax
test eax, eax
jne 0x14003ff02
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
cmp eax, 0x8009000b
jne 0x14003fed3
lea r9d, [rsi + 0x18]
mov dword [rsp + 0x20], 0x30
lea r8, [0x1400fe710]
mov rcx, rdi
lea rdx, str.WebbRootCA
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptAcquireContextW]
test eax, eax
jne 0x14003fec9
call fcn.1400401a8
mov esi, eax
jmp 0x14003fecb
xor esi, esi
test esi, esi
js 0x14003ffa2
mov r9d, 0x18
mov dword [rsp + 0x20], 0x28
lea r8, [0x1400fe710]
mov rcx, rdi
lea rdx, str.WebbRootCA
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptAcquireContextW]
mov esi, eax
test eax, eax
je 0x14003ff02
mov byte [r14], 1
test ebx, ebx
je 0x14003ff11
mov ecx, 0xc8
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_Sleep]
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetTickCount]
mov ebx, eax
sub ebx, ebp
test esi, esi
jne 0x140040054
cmp ebx, 0x2710
jb 0x14003fe61
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
movzx esi, ax
mov ebx, 2
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
cmp dword [0x140142444], ebx
jb 0x14003ff6b
mov r8d, esi
lea rdx, str.Failed_to_acquire_crypto_context:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
lea rdi, section..data
cmp rcx, rdi
je 0x14004004d
test byte [rcx + 0x1c], 8
je 0x14004004d
cmp byte [rcx + 0x19], bl
jb 0x14004004d
mov edx, 0x12
mov r9d, esi
jmp 0x14004003d
mov ebx, 2
cmp dword [0x140142444], ebx
jb 0x14003ffc0
mov r8d, esi
lea rdx, str.Failed_to_clean_up_bad_root_keys:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
lea rdi, section..data
cmp rcx, rdi
je 0x14003fffd
test byte [rcx + 0x1c], 8
je 0x14003fffd
cmp byte [rcx + 0x19], bl
jb 0x14003fffd
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ff168]
mov edx, 0x10
mov r9d, esi
call fcn.140007608
mov rcx, qword [section..data]
cmp dword [0x140142444], ebx
mov esi, 0x8009000b
jb 0x140040022
mov r8d, esi
lea rdx, str.Failed_to_acquire_root_crypto_context:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
cmp rcx, rdi
je 0x14004004d
test byte [rcx + 0x1c], 8
je 0x14004004d
cmp byte [rcx + 0x19], bl
jb 0x14004004d
mov edx, 0x11
mov r9d, 0x8009000b
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ff168]
call fcn.140007608
mov eax, esi
jmp 0x14004018d
cmp byte [r14], 0
je 0x14004018b
mov rcx, qword [rdi]
lea r9, [rsp + 0x50]
and qword [rsp + 0x50], 0
mov esi, 0x8000000
mov ebx, 2
mov r8d, esi
mov edx, ebx
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptGenKey]
test eax, eax
jne 0x1400400f0
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
cmp dword [0x140142444], ebx
jb 0x1400400bc
mov r8d, esi
lea rdx, str.Failed_to_generate_crypto_key:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
lea rdi, section..data
cmp rcx, rdi
je 0x14004004d
test byte [rcx + 0x1c], 8
je 0x14004004d
cmp byte [rcx + 0x19], bl
jb 0x14004004d
mov edx, 0x13
jmp 0x14003ff9a
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptDestroyKey]
mov rcx, qword [rdi]
lea r9, [rsp + 0x50]
mov r8d, esi
mov edx, 1
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptGenKey]
test eax, eax
jne 0x140040180
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
cmp dword [0x140142444], ebx
jb 0x14004014c
mov r8d, esi
lea rdx, str.Failed_to_generate_crypto_key:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
lea rdi, section..data
cmp rcx, rdi
je 0x14004004d
test byte [rcx + 0x1c], 8
je 0x14004004d
cmp byte [rcx + 0x19], bl
jb 0x14004004d
mov edx, 0x14
jmp 0x14003ff9a
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptDestroyKey]
xor eax, eax
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret