Function at 0x140037480
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0x90
xor edi, edi
mov ebx, r8d
mov r12, rdx
mov dword [rbp + 0x6f], ebx
mov r15, rcx
mov edx, r8d
xor ecx, ecx
mov dword [rbp - 0x21], edi
mov qword [rbp - 0x19], rdi
mov rsi, r9
mov qword [rbp - 0x11], rdi
mov dword [rbp - 0x1d], edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
jne 0x1400374e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.LocalAlloc_failed
jmp 0x1400376b9
mov qword [rsp + 0x30], rdi
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x28], rdi
mov r9, r14
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, r12
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x14003751c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.Failed_to_convert_BASE64_private_key
jmp 0x1400376b9
mov r9d, dword [rbp + 0x6f]
lea rax, [rbp - 0x1d]
mov qword [rsp + 0x38], rax
mov r8, r14
lea rax, [rbp - 0x11]
mov edx, 0x2c
mov qword [rsp + 0x30], rax
mov ecx, 1
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0x8000
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
mov edx, 0x2b
mov ecx, 0x10001
test eax, eax
lea rax, [rbp - 0x21]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0x8000
je 0x1400375a7
mov r8, qword [rbp - 0x11]
mov r9d, dword [r8 + 0x20]
mov r8, qword [r8 + 0x28]
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x1400375ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.Failed_to_parse_private_key
jmp 0x1400376b9
mov r9d, dword [rbp + 0x6f]
mov r8, r14
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x1400375ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.Failed_to_parse_private_key
jmp 0x1400376b9
lea rcx, [rbp - 9]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea r12, [r15 + 0x18]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea r8, str.MariaDB_Connector_C__u__u__lld
mov edx, 0x40
mov r9d, eax
mov rcx, r12
mov rax, qword [rbp - 9]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
call fcn.140037ff0
mov r9d, 1
mov dword [rsp + 0x20], 8
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov rdx, r12
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14003763e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.CryptAcquireContext_failed
jmp 0x1400376b9
mov r8d, dword [rbp - 0x21]
lea rax, [r15 + 8]
mov rdx, qword [rbp - 0x19]
xor r9d, r9d
mov rcx, qword [r15]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x140037672
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.CryptImportKey_failed
jmp 0x1400376b9
mov rcx, qword [r15 + 0x10]
lea r9, [rbp - 1]
xor r8d, r8d
mov qword [rbp + 0x17], rdi
mov edx, 2
mov qword [rbp + 0x27], 1
mov qword [rbp - 1], r12
mov qword [rbp + 7], rdi
mov qword [rbp + 0xf], 1
mov qword [rbp + 0x1f], rdi
call qword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
jne 0x1400376d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.CertSetCertificateContextProperty_failed
mov rdx, qword [rbp + 0x7f]
test eax, eax
mov r8d, 0x54f
mov rcx, rsi
cmovne r8d, eax
mov edi, r8d
call fcn.140038a60
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x90]
mov eax, edi
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret