Function at 0x140040230
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x30
mov r15, rdx
mov byte [rdx], 0
mov ebx, 0x18
mov dword [rax - 0x28], 0x20
lea rsi, [0x1400fe710]
mov r9d, ebx
mov r8, rsi
lea rdx, str.WebbSSL
mov r14, rcx
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptAcquireContextW]
test eax, eax
jne 0x140040410
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
mov r12d, 0x8009000b
cmp eax, r12d
jne 0x140040379
mov r9d, ebx
mov dword [rsp + 0x20], 0x30
mov r8, rsi
lea rdx, str.WebbSSL
mov rcx, r14
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptAcquireContextW]
test eax, eax
jne 0x1400402c0
call fcn.140040564
mov edi, eax
jmp 0x1400402c2
xor edi, edi
test edi, edi
jns 0x140040379
mov ebx, 2
cmp dword [0x140142444], ebx
jb 0x1400402e8
mov r8d, edi
lea rdx, str.Failed_to_clean_up_bad_SSL_keys:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
lea rsi, section..data
cmp rcx, rsi
je 0x140040325
test byte [rcx + 0x1c], 8
je 0x140040325
cmp byte [rcx + 0x19], bl
jb 0x140040325
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ff168]
mov edx, 0x16
mov r9d, edi
call fcn.140007608
mov rcx, qword [section..data]
cmp dword [0x140142444], ebx
mov edi, 0x8009000b
jb 0x14004034a
mov r8d, edi
lea rdx, str.Failed_to_acquire_SSL_crypto_context:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
cmp rcx, rsi
je 0x140040372
test byte [rcx + 0x1c], 8
je 0x140040372
cmp byte [rcx + 0x19], bl
jb 0x140040372
mov edx, 0x17
mov r9d, r12d
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ff168]
call fcn.140007608
mov eax, edi
jmp 0x140040544
mov r9d, ebx
mov byte [r15], 1
mov r8, rsi
mov dword [rsp + 0x20], 0x28
lea rdx, str.WebbSSL
mov rcx, r14
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptAcquireContextW]
test eax, eax
jne 0x140040410
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
movzx edi, ax
mov r12d, 0x80004005
or edi, 0x80070000
mov ebx, 2
test eax, eax
cmovle edi, eax
test edi, edi
cmovns edi, r12d
cmp dword [0x140142444], ebx
jb 0x1400403dd
mov r8d, edi
lea rdx, str.Failed_to_acquire_crypto_context:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
lea rsi, section..data
cmp rcx, rsi
je 0x140040372
test byte [rcx + 0x1c], 8
je 0x140040372
cmp byte [rcx + 0x19], bl
jb 0x140040372
mov edx, 0x18
mov r9d, edi
jmp 0x140040362
and qword [rsp + 0x50], 0
lea rsi, section..data
cmp byte [r15], 0
mov ebx, 2
mov r12d, 0x80004005
jne 0x1400404b9
mov rcx, qword [r14]
lea r8, [rsp + 0x50]
mov edx, ebx
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptGetUserKey]
test eax, eax
jne 0x1400404ab
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
cmovns edi, r12d
cmp dword [0x140142444], 4
jb 0x14004047b
mov r8d, edi
lea rdx, str.Unexpected_error_0x_x_retrieving_SSL_key_pair__falling_back_to_overwrite.
lea ecx, [rbx + 2]
call fcn.14003929c
mov rcx, qword [section..data]
cmp rcx, rsi
je 0x1400404ab
test byte [rcx + 0x1c], 8
je 0x1400404ab
cmp byte [rcx + 0x19], 4
jb 0x1400404ab
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ff168]
mov edx, 0x19
mov r9d, edi
call fcn.140007608
mov rcx, qword [rsp + 0x50]
test rcx, rcx
jne 0x14004053c
mov byte [r15], 1
lea r9, [rsp + 0x50]
mov rcx, qword [r14]
mov r8d, 0x8000000
mov edx, ebx
call qword [sym.imp.api_ms_win_security_cryptoapi_l1_1_0.dll_CryptGenKey]
test eax, eax
jne 0x140040537
call qword [sym.imp.api_ms_win_downlevel_kernel32_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
cmovns edi, r12d
cmp dword [0x140142444], ebx
jb 0x14004050a
mov r8d, edi
lea rdx, str.Failed_to_generate_public_private_key_pair:_0x_x
mov ecx, ebx
call fcn.14003929c
mov rcx, qword [section..data]
cmp rcx, rsi
je 0x140040372
test byte [rcx + 0x1c], 8
je 0x140040372
cmp byte [rcx + 0x19], bl
jb 0x140040372
mov edx, 0x1a
jmp 0x140040408
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 rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
ret