Function at 0x14009d988
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r12d, r12d
mov r14, r8
mov r15d, r9d
lea r8, str.live
xor r9d, r9d
mov rdi, rdx
mov ebp, ecx
mov qword [rax - 0x50], r12
mov rsi, r12
mov qword [rax - 0x40], r12
mov qword [rax - 0x48], r12
mov qword [rax - 0x68], r12
call fcn.140012f4c
lea r9, [rsp + 0x40]
mov r8, r14
mov rdx, rdi
mov ecx, ebp
mov qword [rsp + 0x20], r12
mov ebx, eax
call fcn.140012f4c
cmp eax, r12d
jne 0x14009da0d
lea r9, [rsp + 0x40]
lea r8, [0x1400fa278]
mov rdx, rdi
mov ecx, ebp
mov qword [rsp + 0x20], r12
call fcn.140012f4c
mov rbp, qword [rsp + 0x40]
cmp ebx, r12d
jne 0x14009da20
cmp rbp, r12
je 0x14009dc71
mov r12d, dword [rsp + 0xc8]
mov ecx, 0x40
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x14009dc71
mov rdx, qword [rsp + 0xc0]
mov r8, r12
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov dword [rsp + 0x30], r12d
test ebx, ebx
je 0x14009da82
lea rax, str.machine
test r15d, r15d
lea r8, str.user
lea rcx, str.___Live_Key__:__s____s_:
mov rdx, r14
cmovne r8, rax
call fcn.14000c020
mov eax, ebx
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
neg eax
sbb ecx, ecx
not ecx
and ecx, 0xf0000000
neg r15d
sbb eax, eax
and eax, 0x20
or ecx, eax
cmp dword [0x14013b73c], 0xa28
lea rax, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider__Prototype_
cmovbe r8, rax
mov eax, ebx
mov dword [rsp + 0x20], ecx
neg eax
lea rcx, [rsp + 0x50]
sbb rdx, rdx
and rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14009dc54
test ebx, ebx
je 0x14009daef
lea rcx, [0x1400f6ec8]
call fcn.14000c020
jmp 0x14009db6a
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x48]
xor r9d, r9d
mov rcx, rbp
call fcn.140009e4c
test eax, eax
je 0x14009db75
lea rcx, str.___PVK_file__:__s____s_:
mov r8, rbp
mov rdx, r14
call fcn.14000c020
mov rsi, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
mov r8d, dword [rsi + 0x14]
lea rax, [rsp + 0x38]
lea rdx, [rsi + 0x18]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x14009db56
lea rcx, [0x1400f6ec8]
call fcn.14000c020
jmp 0x14009db7a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_iis_apphost_provider_decrypt___CryptImportKey__RSA___0x_08x__n
mov edx, eax
call fcn.14000c020
test ebx, ebx
je 0x14009db7a
mov r9, qword [rsp + 0x38]
jmp 0x14009db88
mov rsi, qword [rsp + 0x48]
mov r9, qword [rsp + 0x38]
test r9, r9
je 0x14009dc37
mov r8d, dword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x14009dc0f
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x14009dbee
lea rdx, [rdi + 4]
lea rcx, str.___Password__:__s_n
call fcn.14000c020
jmp 0x14009dc02
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_iis_apphost_provider_decrypt___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.14000c020
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x14009dc23
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_iis_apphost_provider_decrypt___CryptImportKey__session___0x_08x__n
mov edx, eax
call fcn.14000c020
test ebx, ebx
jne 0x14009dc45
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14009dc37
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test rsi, rsi
je 0x14009dc45
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x14009dc68
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_iis_apphost_provider_decrypt___CryptAcquireContext__0x_08x__n
mov edx, eax
call fcn.14000c020
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret