Function at 0x4017c2
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Read file on windows
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
lea rdx, [0x00405091]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401801
lea rcx, str.Failed_to_open_input_file
call sym.puts
jmp 0x401a72
mov rax, qword [rbp + 0x18]
lea rdx, [0x004050af]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x40183c
lea rcx, str.Failed_to_create_output_file
call sym.puts
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
jmp 0x401a72
lea rax, [rbp - 0x20]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 0x18
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
call rax
test eax, eax
jne 0x401892
lea rcx, str.Failed_to_acquire_cryptographic_context
call sym.puts
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
jmp 0x401a72
mov rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x28]
mov r9, rdx
mov r8d, 1
mov edx, 0x660e
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptGenKey]
call rax
test eax, eax
jne 0x4018ea
mov rax, qword [rbp - 0x20]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
jmp 0x401a72
mov dword [rbp - 0x54], 0
mov dword [rbp - 0x14], 0
jmp 0x401a08
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.feof
mov edx, eax
mov rcx, qword [rbp - 0x28]
mov dword [rsp + 0x30], 0x10
lea rax, [rbp - 0x54]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, edx
mov edx, 0
mov rax, qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
call rax
test eax, eax
jne 0x401992
lea rcx, str.Failed_to_encrypt_data
call sym.puts
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
mov rax, qword [rbp - 0x20]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
jmp 0x401a72
mov eax, dword [rbp - 0x54]
mov ecx, eax
mov rdx, qword [rbp - 0x10]
lea rax, [rbp - 0x40]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x54]
cmp dword [rbp - 0x14], eax
je 0x401a08
lea rcx, str.Failed_to_write_encrypted_data_to_output_file
call sym.puts
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
mov rax, qword [rbp - 0x20]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
jmp 0x401a72
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x40]
mov r9, rdx
mov r8d, 0x10
mov edx, 1
mov rcx, rax
call sym.fread
mov dword [rbp - 0x54], eax
mov eax, dword [rbp - 0x54]
test eax, eax
jne 0x4018fd
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
mov rax, qword [rbp - 0x20]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
nop
add rsp, 0xa0
pop rbp
ret