Function at 0x140065510
Capabilities:
Encrypt or decrypt via wincrypt
Get file size
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rdi, r8
mov r14, rdx
cmp qword [rcx + 0x18], 8
jb 0x140065545
mov rcx, qword [rcx]
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x14006562d
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
call fcn.14000db70
mov rcx, rax
test rax, rax
je 0x140065bbf
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x28], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x28]
call fcn.14000ce70
test al, al
jne 0x1400655cf
lea rdx, [0x140099090]
lea rcx, [rbp - 0x28]
call fcn.14000c670
nop
call fcn.14000db70
mov rcx, rax
test rax, rax
je 0x140065bca
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x20], rax
lea rdx, str.Failed_to_open_input_file.
lea rcx, [rbp - 0x20]
call fcn.14000ce70
test al, al
jne 0x140065613
lea rdx, str.Failed_to_open_input_file.
lea rcx, [rbp - 0x20]
call fcn.14000c670
nop
mov r8d, 0xffffffff
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x20]
call fcn.14005c860
xor al, al
jmp 0x140065b98
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov ecx, eax
call fcn.140069bec
mov rsi, rax
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x30]
mov r8d, ebx
mov rdx, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140065727
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
call fcn.14000db70
mov rcx, rax
test rax, rax
je 0x140065bd5
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x20], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000ce70
test al, al
jne 0x1400656b8
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c670
nop
call fcn.14000db70
mov rcx, rax
test rax, rax
je 0x140065bb4
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x28], rax
lea rdx, str.Failed_to_read_input_file.
lea rcx, [rbp - 0x28]
call fcn.14000ce70
test al, al
jne 0x1400656fc
lea rdx, str.Failed_to_read_input_file.
lea rcx, [rbp - 0x28]
call fcn.14000c670
nop
mov r8d, 0xffffffff
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x28]
call fcn.14005c860
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call fcn.140069404
xor al, al
jmp 0x140065b98
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1400657f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
je 0x140065773
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7ff6ffea
jne 0x1400657f1
mov dword [rsp + 0x20], 0xf0000028
mov r9d, 1
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1400657f1
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140098d49]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rdi, rax
lea rdx, str.CryptAcquireContext_failed.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, rdi
mov rcx, rbx
call fcn.14005c860
mov rcx, rsi
call fcn.140069404
xor al, al
jmp 0x140065b98
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8004
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x140065873
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.CryptCreateHash_failed.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
mov r8d, 0xffffffff
mov rdx, rbx
mov rcx, rax
call fcn.14005c860
xor edx, edx
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, rsi
call fcn.140069404
xor al, al
jmp 0x140065b98
mov rax, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 8
jb 0x140065881
mov rdi, qword [rdi]
lea r8d, [rax + rax]
xor r9d, r9d
mov rdx, rdi
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x140065903
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.CryptHashData_failed.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
mov r8d, 0xffffffff
mov rdx, rbx
mov rcx, rax
call fcn.14005c860
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edx, edx
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, rsi
call fcn.140069404
xor al, al
jmp 0x140065b98
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 1
mov r8, qword [rbp - 0x38]
mov edx, 0x6602
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x140065962
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.CryptDeriveKey_failed.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
jmp 0x1400658cd
lea rax, [rbp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 1]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x1400659db
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.CryptDecrypt_failed.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
mov r8d, 0xffffffff
mov rdx, rbx
mov rcx, rax
call fcn.14005c860
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1400658de
mov rcx, r14
cmp qword [r14 + 0x18], 8
jb 0x1400659e8
mov rcx, qword [r14]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140065a50
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.Failed_to_create_output_file.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
jmp 0x1400659bb
mov ebx, r12d
mov r8d, dword [rbp + 0x30]
test r8d, r8d
je 0x140065a7b
nop dword [rax]
mov eax, ebx
movzx ecx, byte [rax + rsi]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isprint]
mov r8d, dword [rbp + 0x30]
test eax, eax
jne 0x140065a7b
inc ebx
cmp ebx, r8d
jb 0x140065a60
sub r8d, ebx
mov edx, ebx
add rdx, rsi
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140065af6
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.Failed_to_write_to_output_file.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
mov r8d, 0xffffffff
mov rdx, rbx
mov rcx, rax
call fcn.14005c860
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1400658de
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edx, edx
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, rsi
call fcn.140069404
mov rdx, r14
mov rcx, r14
call fcn.140064cc0
lea rdx, [0x140099090]
lea rcx, [rbp - 0x20]
test al, al
lea rax, [rbp - 0x20]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
je 0x140065b6c
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.File_converted_to_UTF_8_and_saved_successfully.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
jmp 0x140065b85
call fcn.14000c8e0
mov rbx, rax
lea rdx, str.Failed_to_convert_and_save_the_file.
lea rcx, [rbp - 0x28]
call fcn.14000c8e0
nop
mov r8d, 0xffffffff
mov rdx, rbx
mov rcx, rax
call fcn.14005c860
mov al, 1
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov ecx, 0x80004005
call fcn.14000df80
nop
mov ecx, 0x80004005
call fcn.14000df80
nop
mov ecx, 0x80004005
call fcn.14000df80
nop
mov ecx, 0x80004005
call fcn.14000df80
int3