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

Disassembly:
mov qword [rsp + 0x18], rbx
mov byte [rsp + 0x10], dl
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor esi, esi
mov rdi, r9
cmp byte [0x1411ec731], sil
mov rbx, r8
movzx eax, dl
mov r10d, ecx
je 0x1401c1780
test rbx, rbx
js 0x1401c192f
mov eax, dword [rbp + 0x60]
cmp eax, 1
jb 0x1401c192f
mov r8d, eax
mov rdx, r9
mov rcx, rbx
call fcn.1401b8fd0
mov esi, eax
jmp 0x1401c1ba0
cmp byte [0x1411ec730], sil
je 0x1401c1936
test rbx, rbx
js 0x1401c192f
mov r15d, dword [rbp + 0x60]
cmp r15d, 1
jb 0x1401c192f
mov rdx, qword [0x1411ec630]
mov qword [0x1411ec638], rdx
test rdx, rdx
je 0x1401c17e4
nop word [rax + rax]
mov eax, dword [rdx + 0x18]
mov dword [0x1411ec830], eax
mov rax, qword [rdx + 8]
cmp rbx, rax
jl 0x1401c17e4
mov rdx, qword [rdx]
sub rbx, rax
mov qword [0x1411ec638], rdx
test rdx, rdx
jne 0x1401c17c0
cmp byte [rdx + 0x16], 1
je 0x1401c1802
mov r9, rdx
mov r8, r15
mov rdx, rdi
mov rcx, rbx
call fcn.1401b9100
mov esi, eax
jmp 0x1401c1ba0
cmp dword [rdx + 0x30], 0xffffffff
mov r8d, 0x48
mov r12, qword [rbp + 0x68]
mov eax, 0x34
cmove eax, r8d
mov r9d, 0x44
mov r8, qword [rax + rdx]
mov eax, 0x30
add r8, rbx
cmp dword [rdx + 0x30], 0xffffffff
mov qword [rbp - 0x20], r8
cmove eax, r9d
movzx eax, byte [rax + rdx]
add al, 0x80
mov byte [rbp - 0x30], al
xor r13b, r13b
test r12, r12
jne 0x1401c18bc
movzx ecx, al
mov dword [rbp - 0x2c], esi
mov ebx, esi
call fcn.1401bdf40
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x1401c18b1
mov ecx, dword [rbp + 0x40]
lea r8, [rbp - 0x14]
shl ecx, 9
xor r9d, r9d
imul rcx, qword [rbp - 0x20]
mov qword [rbp - 0x18], rcx
mov edx, ecx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x2c]
mov qword [rsp + 0x20], rsi
mov r8d, r15d
mov rdx, rdi
mov rcx, r14
cmp byte [rbp + 0x70], bl
jne 0x1401c18a9
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r14
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401c1907
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401c1907
mov eax, r10d
mov dword [rbp - 0x28], esi
shl eax, 9
xor r9d, r9d
imul rax, r8
lea r8, [rbp - 0xc]
mov rcx, r12
mov edx, eax
mov qword [rbp - 0x10], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x28]
mov qword [rsp + 0x20], rsi
mov r8d, r15d
mov rdx, rdi
mov rcx, r12
cmp byte [rbp + 0x70], sil
jne 0x1401c18ff
call qword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x1401c1905
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
test bl, bl
jne 0x1401c1927
mov r10d, dword [rbp + 0x40]
inc r13b
cmp r13b, byte [0x1411d8011]
mov r8, qword [rbp - 0x20]
movzx eax, byte [rbp - 0x30]
jne 0x1401c1843
movzx esi, bl
jmp 0x1401c1ba0
xor eax, eax
jmp 0x1401c1ba2
cmp byte [0x1411ec732], sil
jne 0x1401c1ba0
cmp byte [0x1411dd024], sil
je 0x1401c1962
mov r9d, dword [rbp + 0x60]
mov r8, rdi
mov rdx, rbx
call fcn.1401c1bc0
mov esi, eax
jmp 0x1401c1ba0
cmp byte [0x1411ec733], sil
je 0x1401c19d0
mov r14, qword [rbp + 0x68]
xor r15b, r15b
test r14, r14
jne 0x1401c1994
mov rax, qword [0x1411dcc50]
mov r15b, 1
mov rcx, qword [rax + 0xc]
movzx ecx, byte [rcx + 0x114]
call fcn.1401bdf40
mov r14, rax
mov ebx, dword [rbp + 0x60]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8d, ebx
xor edx, edx
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memset
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp r15b, 1
jne 0x1401c1ba0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401c1ba0
cmp al, 0x7f
ja 0x1401c1aab
mov r14, qword [rbp + 0x68]
test r14, r14
jne 0x1401c1a58
movzx ecx, al
call fcn.1401bdf40
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x1401c1ba0
mov ecx, dword [rbp + 0x40]
lea r8, [rbp - 0xc]
shl ecx, 9
xor r9d, r9d
imul rcx, rbx
mov qword [rbp - 0x10], rcx
mov edx, ecx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x28]
mov r8d, dword [rbp + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rsi
mov rcx, r14
cmp dword [rbp + 0x70], esi
je 0x1401c1a36
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1401c1a3c
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test eax, eax
jne 0x1401c1a48
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, ebx
jmp 0x1401c1ba0
shl r10d, 9
lea r8, [rbp - 0xc]
mov eax, r10d
xor r9d, r9d
imul rax, rbx
mov rcx, r14
mov edx, eax
mov qword [rbp - 0x10], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x28]
mov r8d, dword [rbp + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rsi
mov rcx, r14
cmp dword [rbp + 0x70], esi
je 0x1401c1a9e
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
jmp 0x1401c1ba0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
jmp 0x1401c1ba0
mov r12, qword [rbp + 0x68]
xor r13b, r13b
mov r14d, dword [rbp + 0x60]
test r12, r12
jne 0x1401c1b33
movzx ecx, al
mov dword [rbp - 0x28], esi
mov r14d, esi
call fcn.1401bdf40
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1401c1b28
mov ecx, dword [rbp + 0x40]
lea r8, [rbp - 0xc]
shl ecx, 9
xor r9d, r9d
imul rcx, rbx
mov qword [rbp - 0x10], rcx
mov edx, ecx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x28]
mov r8d, dword [rbp + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rsi
mov rcx, r15
cmp byte [rbp + 0x70], sil
jne 0x1401c1b1f
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401c1b7f
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r14d, eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401c1b7f
mov eax, r10d
mov dword [rbp - 0x2c], esi
shl eax, 9
lea r8, [rbp - 0x14]
imul rax, rbx
xor r9d, r9d
mov rcx, r12
mov edx, eax
mov qword [rbp - 0x18], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x2c]
mov qword [rsp + 0x20], rsi
mov r8d, r14d
mov rdx, rdi
mov rcx, r12
cmp byte [rbp + 0x70], sil
jne 0x1401c1b76
call qword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x1401c1b7c
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r14d, eax
test r14b, r14b
jne 0x1401c1b9c
mov r10d, dword [rbp + 0x40]
inc r13b
cmp r13b, byte [0x1411d8011]
movzx eax, byte [rbp + 0x48]
jne 0x1401c1ab2
movzx esi, r14b
mov eax, esi
mov rbx, qword [rsp + 0xb0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret