Function at 0x14000d870
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
mov dword [rsp + 0x70], 0
cmp qword [rsp + 0xe8], 0
jne 0x14000d8ab
mov dword [rsp + 0x80], 1
jmp 0x14000d8b6
mov dword [rsp + 0x80], 0
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x6c], eax
mov qword [rsp + 0x78], 0
xor edx, edx
mov rax, qword [rsp + 0xc0]
mov eax, dword [rax + 0x5c]
mov ecx, 8
div ecx
mov dword [rsp + 0x68], eax
xor edx, edx
mov rax, qword [rsp + 0xc0]
mov eax, dword [rax + 0x3c]
mov ecx, 8
div ecx
mov dword [rsp + 0x60], eax
mov rax, qword [rsp + 0xc0]
cmp dword [rax + 0x38], 0x6603
jne 0x14000d91a
cmp dword [rsp + 0x60], 0x18
jae 0x14000d91a
mov dword [rsp + 0x60], reloc.ODBC32.dll_SQLAllocHandle
cmp dword [rsp + 0x6c], 0
jne 0x14000d9b4
mov rax, qword [rsp + 0xc0]
cmp dword [rax + 0x58], 0x800e
jne 0x14000d94b
mov dword [rsp + 0x84], 0x800e
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x64], eax
jmp 0x14000d95e
mov dword [rsp + 0x84], 0x8004
mov dword [rsp + 0x64], Ordinal_26
mov eax, dword [rsp + 0x64]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x14000d9b4
mov rcx, qword [rsp + 0xe8]
call fcn.140145b80
shl rax, 1
mov ecx, dword [rsp + 0x64]
mov dword [rsp + 0x20], ecx
mov r9, qword [rsp + 0x78]
mov r8d, eax
mov rdx, qword [rsp + 0xe8]
mov ecx, dword [rsp + 0x84]
call fcn.1400064b0
mov dword [rsp + 0x6c], eax
cmp dword [rsp + 0x6c], 0
je 0x14000dc75
mov eax, dword [rsp + 0x68]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x98], rax
cmp qword [rsp + 0x98], 0
je 0x14000dc75
cmp qword [rsp + 0x78], 0
je 0x14000d9fc
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x88], eax
jmp 0x14000da07
mov dword [rsp + 0x88], 0
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0xc0]
mov eax, dword [rax + 0x58]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0xe0]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0xc0]
mov r9d, dword [rax + 0x40]
mov rax, qword [rsp + 0xc0]
mov r8, qword [rax + 0x44]
mov edx, dword [rsp + 0xd0]
mov rcx, qword [rsp + 0xc8]
call fcn.14000d610
test eax, eax
je 0x14000dc67
mov eax, dword [rsp + 0x60]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x90], rax
cmp qword [rsp + 0x90], 0
je 0x14000dc67
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x90]
mov r8d, dword [rsp + 0x68]
mov rdx, qword [rsp + 0x98]
mov rax, qword [rsp + 0xc0]
mov ecx, dword [rax + 0x58]
call fcn.140006800
test eax, eax
je 0x14000dc59
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x90]
mov rax, qword [rsp + 0xc0]
mov ecx, dword [rax + 0x38]
call fcn.140007670
test eax, eax
je 0x14000dc45
mov rax, qword [rsp + 0xc0]
mov eax, dword [rax + 0x6c]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0xf0]
mov qword [rcx], rax
mov rax, qword [rsp + 0xf0]
cmp qword [rax], 0
je 0x14000dc10
mov rax, qword [rsp + 0xc0]
mov eax, dword [rax + 0x6c]
mov r8d, eax
mov rax, qword [rsp + 0xc0]
mov rdx, qword [rax + 0x70]
mov rax, qword [rsp + 0xf0]
mov rcx, qword [rax]
call fcn.140161160
mov rax, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
mov ecx, dword [rcx + 0x6c]
mov dword [rax], ecx
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xf0]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jne 0x14000dc10
mov rax, qword [rsp + 0xf0]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0xf0]
mov qword [rcx], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_blob___CryptDecrypt__0x_08x__n
call fcn.140013fd0
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0xa8]
call fcn.1400069e0
test eax, eax
jne 0x14000dc43
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_blob___kull_m_crypto_close_hprov_delete_container__0x_08x__n
call fcn.140013fd0
jmp 0x14000dc59
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_blob___kull_m_crypto_hkey_session__0x_08x__n
call fcn.140013fd0
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x78], 0
je 0x14000dc88
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x70]
add rsp, 0xb8
ret