Function at 0x140008484
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
mov r12, qword [rsp + 0xd8]
mov r15d, dword [rcx + 0x5c]
mov edi, dword [rcx + 0x3c]
xor edx, edx
test r12, r12
mov rbx, rcx
mov eax, edx
sete al
shr r15d, 3
shr edi, 3
cmp dword [rcx + 0x38], 0x6603
mov r13d, edx
mov ebp, edx
jne 0x1400084dc
lea ecx, [rdx + 0x18]
cmp edi, ecx
cmovb edi, ecx
test eax, eax
jne 0x140008545
mov r14d, 0x800e
cmp dword [rbx + 0x58], r14d
jne 0x1400084f1
mov esi, r15d
jmp 0x1400084fc
mov esi, SQLAllocHandle
mov r14d, 0x8004
mov edx, esi
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
xor ecx, ecx
mov rbp, rax
test rax, rax
je 0x140008717
or rax, 0xffffffffffffffff
inc rax
cmp word [r12 + rax*2], cx
jne 0x14000851b
lea r8d, [rax + rax]
mov r9, rbp
mov rdx, r12
mov ecx, r14d
mov dword [rsp + 0x20], esi
call fcn.140003914
test eax, eax
je 0x140008709
jmp 0x14000854c
mov esi, dword [rsp + 0xd8]
mov edx, r15d
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
je 0x140008709
mov r9d, dword [rbx + 0x40]
mov r8, qword [rbx + 0x44]
mov edx, dword [rsp + 0xc0]
mov dword [rsp + 0x50], r15d
mov qword [rsp + 0x48], r14
mov rax, rbp
neg rax
mov eax, dword [rbx + 0x58]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xd0]
sbb ecx, ecx
and ecx, esi
mov dword [rsp + 0x38], ecx
mov rcx, qword [rsp + 0xb8]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x20], rax
call fcn.1400082d0
test eax, eax
je 0x140008700
mov edx, edi
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140008700
mov ecx, dword [rbx + 0x58]
mov r9, rax
mov r8d, r15d
mov rdx, r14
mov dword [rsp + 0x20], edi
call fcn.140003b94
test eax, eax
je 0x1400086f7
mov ecx, dword [rbx + 0x38]
lea rax, [rsp + 0xb0]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xd8]
mov r8d, edi
mov rdx, rsi
mov qword [rsp + 0x20], rax
call fcn.1400045d4
test eax, eax
je 0x1400086e3
mov edx, dword [rbx + 0x6c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, qword [rsp + 0xe0]
mov qword [rdi], rax
test rax, rax
je 0x1400086b5
mov r8d, dword [rbx + 0x6c]
mov rdx, qword [rbx + 0x70]
mov rcx, rax
call fcn.1400c5d20
mov rcx, qword [rsp + 0xe8]
mov eax, dword [rbx + 0x6c]
mov dword [rcx], eax
mov rax, qword [rdi]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0xd8]
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 1]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r13d, eax
test eax, eax
jne 0x1400086b5
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rdi], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_blob___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0xb0]
call fcn.140003cbc
test eax, eax
jne 0x1400086f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_blob___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x1400086f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_blob___kull_m_crypto_hkey_session__0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rbp, rbp
je 0x140008717
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, r13d
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret