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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
and qword [rbp - 0x20], 0
and qword [rbp - 0x18], 0
and qword [rbp - 0x28], 0
and qword [rax - 0x58], 0
mov r15, r8
mov r12d, r9d
lea r8, str.live
xor r9d, r9d
mov rdi, rdx
mov esi, ecx
call fcn.180053530
and qword [rsp + 0x20], 0
lea r9, [rbp - 0x28]
mov r8, r15
mov rdx, rdi
mov ecx, esi
mov ebx, eax
call fcn.180053530
test eax, eax
jne 0x180018cf1
and qword [rsp + 0x20], 0
lea r9, [rbp - 0x28]
lea r8, [0x1800ea628]
mov rdx, rdi
mov ecx, esi
call fcn.180053530
test ebx, ebx
jne 0x180018d00
cmp qword [rbp - 0x28], 0
je 0x180018f2a
mov esi, dword [rbp + 0x58]
mov ecx, 0x40
mov edx, esi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x180018f2a
mov rdx, qword [rbp + 0x50]
mov r8d, esi
mov rcx, rax
call fcn.1800ca790
mov dword [rbp - 0x30], esi
test ebx, ebx
je 0x180018d56
lea rax, str.machine
test r12d, r12d
lea r8, str.user
lea rcx, str.___Live_Key__:__s____s_:
mov rdx, r15
cmovne r8, rax
call fcn.18004d68c
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 r12d
sbb eax, eax
and eax, 0x20
or ecx, eax
cmp dword [0x180166288], 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, [rbp - 0x10]
sbb rdx, rdx
and rdx, r15
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x180018f0d
test ebx, ebx
je 0x180018dc5
lea rcx, [0x1800e6de0]
call fcn.18004d68c
jmp 0x180018e9f
mov rcx, qword [rbp - 0x28]
lea r8, [rbp - 0x2c]
lea rdx, [rbp - 0x18]
call fcn.18004ac70
test eax, eax
je 0x180018e24
mov r8, qword [rbp - 0x28]
lea rcx, str.___PVK_file__:__s____s_:
mov rdx, r15
call fcn.18004d68c
mov rax, qword [rbp - 0x18]
lea rcx, [rbp - 0x20]
mov r8d, dword [rax + 0x14]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rbp - 0x10]
and dword [rsp + 0x20], 0
lea rdx, [rax + 0x18]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x180018e8b
lea rcx, [0x1800e6de0]
call fcn.18004d68c
mov r9, qword [rbp - 0x20]
test r9, r9
je 0x180018ef0
mov r8d, dword [rbp + 0x48]
mov rdx, qword [rbp + 0x40]
mov rcx, qword [rbp - 0x10]
lea rax, [rbp - 8]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x180018ec9
mov rcx, qword [rbp - 8]
lea rax, [rbp - 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 0x180018ea9
lea rdx, [rdi + 4]
lea rcx, str.___Password__:__s_n
call fcn.18004d68c
jmp 0x180018ebd
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.18004d68c
test ebx, ebx
je 0x180018e24
mov r9, qword [rbp - 0x20]
jmp 0x180018e31
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.18004d68c
mov rcx, qword [rbp - 8]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x180018edd
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.18004d68c
test ebx, ebx
jne 0x180018eff
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x180018ef0
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x180018eff
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x10]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x180018f21
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.18004d68c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret