Function at 0x140008044
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, 0x78
mov r14, qword [rsp + 0xe8]
mov rdi, rcx
xor ecx, ecx
test r14, r14
mov dword [rsp + 0xc0], ecx
mov r12d, ecx
mov r13d, ecx
mov r15d, dword [rdi + 0x5c]
sete r12b
mov ebx, dword [rdi + 0x3c]
mov ebp, ecx
shr r15d, 3
shr ebx, 3
cmp dword [rdi + 0x38], 0x6603
jne 0x1400080a5
lea eax, [rcx + 0x18]
cmp ebx, eax
cmovb ebx, eax
test r14, r14
je 0x14000811e
mov eax, dword [rdi + 0x58]
mov r13d, 0x800e
cmp eax, r13d
mov dword [rsp + 0xe8], eax
mov esi, SQLAllocHandle
mov ecx, 0x40
cmove esi, r15d
mov edx, esi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
xor ecx, ecx
mov rbp, rax
test rax, rax
je 0x140008127
or r8, 0xffffffffffffffff
inc r8
cmp word [r14 + r8*2], cx
jne 0x1400080e1
add r8d, r8d
mov dword [rsp + 0x20], esi
cmp dword [rsp + 0xe8], r13d
mov eax, 0x8004
mov r9, rbp
mov rdx, r14
cmovne r13d, eax
mov ecx, r13d
call fcn.1400036a8
mov r13d, dword [rsp + 0xc0]
mov r12d, eax
jmp 0x14000812a
mov esi, dword [rsp + 0xe8]
jmp 0x14000812a
mov r13d, ecx
test r12d, r12d
je 0x1400082c2
mov edx, r15d
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
je 0x1400082c2
mov r9d, dword [rdi + 0x40]
mov rax, rbp
mov r8, qword [rdi + 0x44]
neg rax
mov eax, dword [rdi + 0x58]
mov edx, dword [rsp + 0xd0]
sbb ecx, ecx
mov dword [rsp + 0x50], r15d
and ecx, esi
mov qword [rsp + 0x48], r14
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xe0]
mov dword [rsp + 0x38], ecx
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x20], rax
call fcn.140007e90
test eax, eax
je 0x1400082b9
mov edx, ebx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x1400082b9
mov ecx, dword [rdi + 0x58]
mov r9, rax
mov r8d, r15d
mov dword [rsp + 0x20], ebx
mov rdx, r14
call fcn.14000392c
test eax, eax
je 0x1400082b0
mov ecx, dword [rdi + 0x38]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rsp + 0x60]
mov r8d, ebx
mov rdx, rsi
mov qword [rsp + 0x20], rax
call fcn.14000434c
test eax, eax
je 0x1400082a4
mov edx, dword [rdi + 0x6c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, qword [rsp + 0xf0]
mov qword [rbx], rax
test rax, rax
je 0x14000828b
mov r8d, dword [rdi + 0x6c]
mov rcx, rax
mov rdx, qword [rdi + 0x70]
call fcn.1400e84c0
mov rcx, qword [rsp + 0xf8]
xor r9d, r9d
mov eax, dword [rdi + 0x6c]
xor edx, edx
mov qword [rsp + 0x28], rcx
mov dword [rcx], eax
lea r8d, [r9 + 1]
mov rax, qword [rbx]
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r13d, eax
test eax, eax
jne 0x14000828b
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, str.BigBad_:_kull_m_dPApi_unprotect_blob___ERROR
mov qword [rbx], rax
call fcn.14000b9e4
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x68]
call fcn.140003a58
test eax, eax
jne 0x1400082b0
lea rcx, str.BigBad_:_kull_m_dPApi_unprotect_blob___ERROR
call fcn.14000b9e4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rbp, rbp
je 0x1400082d0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, r13d
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret