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

Disassembly:
push r15
mov eax, 0x2148
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.004bfc50
sub rsp, rax
mov rsi, qword [0x00513d30]
mov rdi, qword [rcx + 8]
lea rbx, [rsp + 0x30]
mov dword [rsp + 0x2198], edx
mov r14, rcx
mov rdx, rdi
mov rcx, rbx
mov r12, r8
mov qword [rsp + 0x21a8], r9
call sub.msvcrt.dll_strcpy
movzx eax, byte [rdi]
cmp al, 0x2f
je 0x409ab0
cmp al, 0x5c
je 0x409ab0
test al, al
jne 0x409ae0
xor edi, edi
mov r15, qword [0x00506000]
jmp 0x4098be
lea rdx, [0x004cb0ee]
mov rcx, rbx
call sub.msvcrt.dll_fopen
test rax, rax
mov rbp, rax
jne 0x409930
test rsi, rsi
jne 0x40987e
test rdi, rdi
jne 0x40987e
mov rsi, qword [r14 + 8]
mov edx, 0x2f
mov rcx, rsi
call sub.msvcrt.dll_strrchr
mov edx, 0x5c
mov rcx, rsi
mov rdi, rax
call sub.msvcrt.dll_strrchr
test rdi, rdi
je 0x409867
test rax, rax
je 0x409873
cmp rdi, rax
jae 0x409873
test rax, rax
mov rdi, rax
je 0x409901
mov rsi, qword [0x00513d30]
add rdi, 1
test rsi, rsi
je 0x40990a
lea rdx, [rsi + 8]
mov rcx, rbx
call fcn.004be790
mov rdx, rax
sub rdx, rbx
cmp byte [rsp + rdx + 0x2f], 0x3a
je 0x4098f1
mov r9d, 0x2f
test rdi, rdi
mov word [rbx + rdx], r9w
je 0x4098e3
mov rdx, rdi
mov rcx, rbx
call sub.msvcrt.dll_strcat
mov rsi, qword [rsi]
test dword [r15], 0x2000
je 0x409812
mov rdx, qword [r14 + 8]
lea rcx, str._annotate_source_:_looking_for__s__trying__s_n
mov r8, rbx
call sub.msvcrt.dll_printf
jmp 0x409812
mov rdx, qword [r14 + 8]
mov rcx, rbx
call sub.msvcrt.dll_strcat
jmp 0x4098bb
mov r10d, 0x2e
add rdx, 1
mov word [rax], r10w
jmp 0x4098a0
cmp byte [rsi], 0
jne 0x409ac0
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 2
je 0x409b63
mov rcx, qword [r14 + 8]
xor esi, esi
call sub.msvcrt.dll_perror
jmp 0x409a90
mov ecx, 1
mov rdi, qword [fcn.004c1900]
call rdi
mov r8d, dword [0x00513d40]
mov rsi, rax
test r8d, r8d
je 0x4099bc
mov rsi, qword [r14 + 8]
mov edx, 0x2f
mov rcx, rsi
call sub.msvcrt.dll_strrchr
mov edx, 0x5c
mov rcx, rsi
mov r15, rax
call sub.msvcrt.dll_strrchr
test r15, r15
je 0x409af2
test rax, rax
je 0x409985
cmp r15, rax
jb 0x409af2
mov rax, r15
lea rsi, [rax + 1]
mov rdx, rsi
mov rcx, rbx
call fcn.004be790
lea rdx, [0x004cb10c]
mov rcx, rbx
mov dword [rax], 0x6e6e612d
mov byte [rax + 4], 0
call sub.msvcrt.dll_fopen
test rax, rax
mov rsi, rax
je 0x409bc6
mov ecx, 1
call rdi
cmp rax, rsi
je 0x409b20
mov eax, dword [rsp + 0x2198]
mov edi, 1
mov ebx, 1
lea ecx, [rax + 1]
call fcn.004be5f0
mov r14, rax
lea rax, [rsp + 0x140]
mov qword [rsp + 0x20], rax
lea rax, [rsp + 0x141]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x20]
mov r9, rbp
mov r8d, 0x2000
mov edx, 1
call sub.msvcrt.dll_fread
test eax, eax
jle 0x409a80
lea r15d, [rax - 1]
mov r13, qword [rsp + 0x20]
add r15, qword [rsp + 0x28]
nop dword [rax]
test edi, edi
je 0x409a5a
mov r8d, ebx
mov edx, dword [rsp + 0x2198]
mov rcx, r14
add ebx, 1
mov r9, qword [rsp + 0x21a8]
call r12
mov rdx, rsi
mov rcx, r14
call sub.msvcrt.dll_fputs
movsx ecx, byte [r13]
xor edi, edi
mov rdx, rsi
cmp cl, 0xa
sete dil
add r13, 1
call sub.msvcrt.dll_fputc
cmp r15, r13
jne 0x409a30
jmp 0x409a02
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov rax, rsi
add rsp, 0x2148
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor esi, esi
jmp 0x409804
cmp byte [rsi + 1], 0x3a
jne 0x40990a
mov rdi, rsi
add rdi, 1
jne 0x409873
jmp 0x40990a
cmp byte [rdi + 1], 0x3a
mov eax, 0
cmove rsi, rax
jmp 0x409804
test rax, rax
jne 0x409988
cmp byte [rsi], 0
je 0x40998c
cmp byte [rsi + 1], 0x3a
jne 0x40998c
mov rax, rsi
add rax, 1
jne 0x409988
jmp 0x40998c
mov ecx, dword [0x004c3640]
test ecx, ecx
je 0x409bb4
mov dword [0x004c3640], 0
mov rax, qword [0x00506080]
mov edx, dword [rax]
test edx, edx
je 0x409b98
mov dword [rax], 0
mov r8, qword [r14 + 8]
lea rdx, str._File__s:_n
mov rcx, rsi
call sub.msvcrt.dll_fprintf
jmp 0x4099cc
mov rax, qword [0x005062d0]
mov ecx, 2
mov rsi, qword [r14 + 8]
mov rbx, qword [rax]
call qword [fcn.004c1900]
lea rdx, str._s:_could_not_locate___s_n
mov r9, rsi
xor esi, esi
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
jmp 0x409a90
mov r9, rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x004cb10e]
call sub.msvcrt.dll_fwrite
jmp 0x409b4b
mov rdx, rsi
mov ecx, 0xa
call sub.msvcrt.dll_fputc
jmp 0x409b38
mov rcx, rbx
call sub.msvcrt.dll_perror
jmp 0x409a90