Function at 0x140001702
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0xb8
lea rbp, [rsp + 0xb0]
mov dword [rbp + 0x20], ecx
mov qword [rbp + 0x28], rdx
call dbg.__main
cmp dword [rbp + 0x20], 2
je 0x140001739
mov rax, qword [rbp + 0x28]
mov rax, qword [rax]
mov rcx, rax
call sym.usage
jmp 0x140001a58
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x14000a075]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140001772
lea rax, str.Cannot_open_file_for_reading.
mov rcx, rax
call sym.error
jmp 0x140001a58
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.ftell
cdqe
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.rewind
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x20], rax
mov rcx, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov ecx, 0
call sym.time
mov qword [rbp - 0x58], rax
lea rax, [rbp - 0x58]
mov rcx, rax
call sym.localtime
mov rcx, qword [rax]
mov rbx, qword [rax + 8]
mov qword [rbp - 0x80], rcx
mov qword [rbp - 0x78], rbx
mov rcx, qword [rax + 0x10]
mov rbx, qword [rax + 0x18]
mov qword [rbp - 0x70], rcx
mov qword [rbp - 0x68], rbx
mov eax, dword [rax + 0x20]
mov dword [rbp - 0x60], eax
lea rdx, [rbp - 0x80]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._Y_m_d_H_M_S
mov edx, 0x10
mov rcx, rax
call sym.strftime
mov rdx, qword [rbp - 0x58]
lea rax, [rbp - 0x90]
mov r8, rdx
lea rdx, [0x14000a0a3]
mov rcx, rax
call sym.sprintf
mov rdx, qword [rbp - 0x58]
lea rax, [rbp - 0x50]
mov r8, rdx
mov rdx, rax
lea rax, str.Key_is__s__as_per_Unix_timestamp__d_.._n
mov rcx, rax
call sym.printf
lea rax, str.Key_as_HEX:
mov rcx, rax
call sym.printf
mov dword [rbp - 4], 0
jmp 0x1400018b4
mov eax, dword [rbp - 4]
cdqe
movzx eax, byte [rbp + rax - 0x50]
movsx eax, al
mov edx, eax
lea rax, str._02x
mov rcx, rax
call sym.printf
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
movsxd rbx, eax
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.strlen
cmp rbx, rax
jb 0x140001892
lea rax, [0x14000a0e3]
mov rcx, rax
call sym.printf
lea rcx, [rbp - 0x50]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov r8, rcx
mov rcx, rax
call sym.crypt
lea rax, [rbp - 0x90]
mov rcx, rax
call sym.strlen
mov rdx, qword [rbp - 0x18]
add rax, rdx
add rax, 4
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x30]
mov r8d, 4
lea rdx, str.c5pt
mov rcx, rax
call sym.memcpy
lea rax, [rbp - 0x90]
mov rcx, rax
call sym.strlen
mov rdx, rax
mov rax, qword [rbp - 0x30]
lea rcx, [rax + 4]
lea rax, [rbp - 0x90]
mov r8, rdx
mov rdx, rax
call sym.memcpy
lea rax, [rbp - 0x90]
mov rcx, rax
call sym.strlen
lea rdx, [rax + 4]
mov rax, qword [rbp - 0x30]
lea rcx, [rdx + rax]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov r8, rdx
mov rdx, rax
call sym.memcpy
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov rcx, rax
call sym.strlen
add rax, 5
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x38], rax
mov rax, qword [rbp + 0x28]
add rax, 8
mov rdx, qword [rax]
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.strcpy
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.strlen
mov rdx, rax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov dword [rax], 0x636e652e
mov byte [rax + 4], 0
mov rax, qword [rbp - 0x38]
lea rdx, [0x14000a0ea]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x40], rax
mov rcx, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x30]
mov r9, rcx
mov r8d, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp - 0x40]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
lea rax, str.All_done__Do_not_forget_to_write_your_decryption_key_down__n
mov rcx, rax
call sym.printf
mov eax, 0
add rsp, 0xb8
pop rbx
pop rbp
ret