Function at 0x140008498
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
sub rsp, 0x70
and dword [rsp + 0xb0], 0
mov r14d, dword [rcx + 0x5c]
mov ebx, dword [rcx + 0x3c]
xor eax, eax
mov rdi, r9
mov rsi, rcx
cmp qword [rsp + 0xd8], rax
sete al
xor r12d, r12d
shr r14d, 3
shr ebx, 3
cmp dword [rcx + 0x38], 0x6603
jne 0x1400084f4
lea ecx, [r12 + 0x18]
cmp ebx, ecx
cmovb ebx, ecx
test eax, eax
jne 0x14000856f
mov r13d, 0x800e
cmp dword [rsi + 0x58], r13d
jne 0x140008509
mov ebp, r14d
jmp 0x140008514
mov ebp, SQLAllocHandle
mov r13d, 0x8004
mov edx, ebp
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
je 0x14000872d
mov rdi, qword [rsp + 0xd8]
mov rdx, qword [rsp + 0xd8]
or rcx, 0xffffffffffffffff
xor eax, eax
mov r9, r12
mov dword [rsp + 0x20], ebp
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx + rcx - 2]
mov ecx, r13d
call fcn.140003970
test eax, eax
je 0x14000871f
mov rdi, qword [rsp + 0xc8]
jmp 0x140008576
mov ebp, dword [rsp + 0xd8]
mov edx, r14d
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
test rax, rax
je 0x14000871f
mov r9d, dword [rsi + 0x40]
mov r8, qword [rsi + 0x44]
mov edx, dword [rsp + 0xc0]
mov dword [rsp + 0x50], r14d
mov qword [rsp + 0x48], r13
mov rax, r12
neg rax
mov eax, dword [rsi + 0x58]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xd0]
sbb ecx, ecx
and ecx, ebp
mov dword [rsp + 0x38], ecx
mov rcx, qword [rsp + 0xb8]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
call fcn.1400082e4
test eax, eax
je 0x140008716
mov edi, 0x40
mov edx, ebx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbp, rax
test rax, rax
je 0x140008716
mov ecx, dword [rsi + 0x58]
mov r9, rax
mov r8d, r14d
mov rdx, r13
mov dword [rsp + 0x20], ebx
call fcn.140003c08
test eax, eax
je 0x14000870d
mov ecx, dword [rsi + 0x38]
lea rax, [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov r8d, ebx
mov rdx, rbp
mov qword [rsp + 0x20], rax
call fcn.140004704
test eax, eax
je 0x1400086f9
mov edx, dword [rsi + 0x6c]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, qword [rsp + 0xe0]
mov qword [rdi], rax
test rax, rax
je 0x1400086d1
mov r8d, dword [rsi + 0x6c]
mov rdx, qword [rsi + 0x70]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0xe8]
mov edx, dword [rsi + 0x6c]
mov rcx, qword [rsp + 0x60]
mov dword [rax], edx
mov qword [rsp + 0x28], rax
mov rax, qword [rdi]
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 1]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [rsp + 0xb0], eax
test eax, eax
jne 0x1400086d1
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.14000c030
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x68]
call fcn.140003d2c
test eax, eax
jne 0x14000870d
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 0x140008706
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.14000c030
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r12, r12
je 0x14000872d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0xb0]
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret