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

Disassembly:
push rbp
push rbx
sub rsp, 0x378
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x310], ecx
mov qword [rbp + 0x318], rdx
call sym.__main
cmp dword [rbp + 0x310], 3
je 0x4015af
mov rax, qword [rbp + 0x318]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str._nUsage:__s__Input___VariableName__n
call sym.printf
mov ecx, 0
call sym.exit
mov rax, qword [rbp + 0x318]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x00405023]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x2d8], rax
cmp qword [rbp + 0x2d8], 0
jne 0x401604
mov rax, qword [rbp + 0x318]
add rax, 8
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.Error_Opening_File:___s___
call sym.printf
mov ecx, 0
call sym.exit
mov rax, qword [rbp + 0x318]
add rax, 0x10
mov rdx, qword [rax]
lea rax, [rbp + 0x230]
mov r8, rdx
lea rdx, str._s.inc
mov rcx, rax
call sym.sprintf
lea rax, [rbp + 0x230]
lea rdx, [0x00405048]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x2d0], rax
cmp qword [rbp + 0x2d0], 0
jne 0x401672
lea rax, [rbp + 0x230]
mov rdx, rax
lea rcx, str.Error_Creating_Output_File:___s___
call sym.printf
mov ecx, 0
call sym.exit
lea rax, [0x00405073]
mov qword [rbp + 0x2c8], rax
mov byte [rbp + 0x2ef], 1
mov rax, qword [rbp + 0x2d8]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.ftell
mov dword [rbp + 0x2c4], eax
mov rax, qword [rbp + 0x2d8]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
jmp 0x401844
cmp byte [rbp + 0x2ef], 0
je 0x401744
mov rax, qword [rbp + 0x318]
add rax, 0x10
mov rdx, qword [rax]
mov ecx, dword [rbp + 0x2c4]
lea rax, [rbp - 0x60]
mov r9d, ecx
mov r8, rdx
lea rdx, str.unsigned_char__s__d____n_t
mov rcx, rax
call sym.sprintf
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strlen
mov rcx, rax
mov rdx, qword [rbp + 0x2d0]
lea rax, [rbp - 0x60]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov byte [rbp + 0x2ef], 0
jmp 0x401844
mov rdx, qword [rbp + 0x2d8]
lea rax, [rbp + 0x221]
mov r9, rdx
mov r8d, 0xf
mov edx, 1
mov rcx, rax
call sym.fread
mov dword [rbp + 0x2c0], eax
cmp dword [rbp + 0x2c0], 0
jle 0x40185d
mov dword [rbp + 0x2e8], 0
mov dword [rbp + 0x2e4], 0
jmp 0x4017d6
mov eax, dword [rbp + 0x2e8]
cdqe
movzx eax, byte [rbp + rax + 0x221]
movzx edx, al
lea rcx, [rbp + 0x1a0]
mov eax, dword [rbp + 0x2e4]
cdqe
add rax, rcx
mov r8d, edx
lea rdx, str.0x_.2X_
mov rcx, rax
call sym.sprintf
add dword [rbp + 0x2e8], 1
add dword [rbp + 0x2e4], 5
mov eax, dword [rbp + 0x2e8]
cmp eax, dword [rbp + 0x2c0]
jl 0x401791
mov eax, dword [rbp + 0x2e4]
sub eax, 1
movsxd rdx, eax
mov rcx, qword [rbp + 0x2d0]
lea rax, [rbp + 0x1a0]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp + 0x2c8]
mov rcx, rax
call sym.strlen
mov rcx, rax
mov rdx, qword [rbp + 0x2d0]
mov rax, qword [rbp + 0x2c8]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.feof
test eax, eax
je 0x4016d5
jmp 0x40185e
nop
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.ftell
mov ebx, eax
mov rax, qword [rbp + 0x2c8]
mov rcx, rax
call sym.strlen
sub ebx, eax
mov eax, ebx
mov edx, eax
mov rax, qword [rbp + 0x2d0]
mov r8d, 0
mov rcx, rax
call sym.fseek
lea rax, [0x0040509b]
mov qword [rbp + 0x2b8], rax
mov rax, qword [rbp + 0x2b8]
mov rcx, rax
call sym.strlen
mov rcx, rax
mov rdx, qword [rbp + 0x2d0]
mov rax, qword [rbp + 0x2b8]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.fclose
mov eax, 0
add rsp, 0x378
pop rbx
pop rbp
ret