Function at 0x140008140
Capabilities:
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x27]
sub rsp, 0xc0
mov rax, qword [0x14002a040]
xor rax, rsp
mov qword [rbp - 1], rax
mov rax, qword [rbp + 0x77]
mov rbx, rcx
mov qword [rbp - 0x61], rax
mov r14, r8
mov rax, qword [rbp + 0x7f]
mov esi, 0x54f
mov qword [rbp - 0x59], rax
mov eax, dword [r8 + 0x10]
shr eax, 3
mov ecx, eax
sub edx, eax
mov dword [rbp - 0x51], ecx
mov dword [rbp - 0x4d], edx
mov qword [rbp - 0x69], r9
call fcn.14000de0c
mov rdi, rax
test rax, rax
je 0x140008449
mov eax, dword [rbp - 0x51]
cmp eax, 0x20
jb 0x140008449
mov qword [rsp + 0xb8], r12
mov r8d, eax
mov rdx, rbx
mov qword [rsp + 0xa8], r15
mov rcx, rdi
call fcn.14001d070
mov r10d, dword [rbp - 0x51]
mov r15d, 0
mov r11d, r10d
mov r9d, r15d
shr r11d, 1
je 0x14000821a
mov r8, rdi
nop dword [rax]
nop dword [rax + rax]
mov eax, r10d
lea r8, [r8 + 1]
sub eax, r9d
inc r9d
dec eax
mov ecx, eax
movzx edx, byte [rax + rdi]
movzx eax, byte [r8 - 1]
mov byte [rcx + rdi], al
mov byte [r8 - 1], dl
cmp r9d, r11d
jb 0x1400081f0
mov r10d, dword [rbp - 0x51]
mov rcx, qword [r14]
lea rax, [rbp - 0x51]
xor edx, edx
mov r12d, r10d
mov qword [rsp + 0x28], rax
add r12, rbx
mov ebx, r15d
mov qword [rsp + 0x20], rdi
lea r9d, [rdx + 0x40]
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140008431
movups xmm0, xmmword [rdi]
mov rcx, qword [0x14002bf60]
xor r9d, r9d
movups xmm1, xmmword [rdi + 0x10]
lea rax, [rbp - 0x49]
mov dword [rbp - 0x41], 1
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x31]
lea r8d, [r9 + 0x2c]
mov dword [rbp - 0x31], 0x208
mov dword [rbp - 0x2d], 0x6610
mov dword [rbp - 0x29], 0x20
movups xmmword [rbp - 0x25], xmm0
mov dword [rsp + 0x20], r15d
movups xmmword [rbp - 0x15], xmm1
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140008431
mov rcx, qword [rbp - 0x49]
lea r8, [rbp - 0x41]
xor r9d, r9d
lea edx, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140008315
mov rcx, qword [rbp - 0x49]
lea r8, [rdi + 0x20]
xor r9d, r9d
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140008315
mov rcx, qword [rbp - 0x49]
lea rax, [rbp - 0x4d]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], r12
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebx, eax
test eax, eax
jne 0x140008315
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x49]
mov esi, eax
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140008431
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test ebx, ebx
je 0x140008431
mov r14d, dword [rbp - 0x4d]
lea rax, [rbp - 0x39]
mov rcx, qword [0x14002bf60]
xor r9d, r9d
mov qword [rsp + 0xb0], r13
xor r8d, r8d
mov r13d, dword [rdi + 0x30]
mov edx, 0x800c
sub r14d, r13d
mov qword [rsp + 0x20], rax
lea r15, [r12 + r13]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140008429
mov rcx, qword [rbp - 0x39]
xor r9d, r9d
mov r8d, r13d
mov rdx, r12
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x14000841f
mov r8d, r14d
mov edx, 0
shr r8d, 1
mov ebx, edx
je 0x1400083c6
mov r11, r15
nop dword [rax]
nop dword [rax + rax]
mov eax, r14d
lea r11, [r11 + 1]
sub eax, ebx
inc ebx
dec eax
mov ecx, eax
movzx r10d, byte [rax + r15]
movzx eax, byte [r11 - 1]
mov byte [rcx + r15], al
mov byte [r11 - 1], r10b
cmp ebx, r8d
jb 0x1400083a0
mov r9, qword [rbp - 0x69]
mov r8d, r14d
mov rcx, qword [rbp - 0x39]
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rdx
mov rdx, r15
mov r9, qword [r9]
call qword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
test eax, eax
je 0x14000841a
mov rcx, r13
call fcn.14000de0c
mov rbx, rax
test rax, rax
je 0x14000841f
mov r8, r13
mov rdx, r12
mov rcx, rax
call fcn.14001d070
mov rax, qword [rbp - 0x61]
xor esi, esi
mov qword [rax], rbx
mov rax, qword [rbp - 0x59]
mov dword [rax], r13d
jmp 0x14000841f
mov esi, 0x143
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov r13, qword [rsp + 0xb0]
mov rcx, rdi
call fcn.14000ddf8
mov r15, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xb8]
mov eax, esi
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1400092d0
add rsp, 0xc0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret