Function at 0x140013a44
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
lea rbp, [rax - 0xf78]
mov eax, 0x1070
call fcn.1400140b0
sub rsp, rax
mov rax, qword [0x140036008]
xor rax, rsp
mov qword [rbp + 0xf60], rax
mov rbx, rdx
cmp ecx, 4
jge 0x140013aae
mov eax, 0x57
mov rcx, qword [rbp + 0xf60]
xor rcx, rsp
call fcn.140014120
lea r11, [rsp + 0x1070]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov rdx, qword [rdx + 8]
lea rcx, [0x140036970]
call fcn.14001308c
mov rdx, qword [rbx + 0x10]
lea rcx, [0x140036a80]
call fcn.14001308c
mov rdx, qword [rbx + 0x18]
lea rcx, [0x140036b90]
call fcn.14001308c
and qword [rsp + 0x30], 0
lea rcx, [0x140036a80]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140013b20
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140013a86
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
cmp eax, 0xffffffff
jne 0x140013b3f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140013b15
mov ecx, eax
call fcn.1400179a0
mov rsi, rax
mov rcx, rdi
test rax, rax
jne 0x140013b5f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rsi + 0xe]
jmp 0x140013a86
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
and qword [rsp + 0x20], 0
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x140013b94
mov rcx, rsi
call fcn.140017998
jmp 0x140013a81
and qword [rsp + 0x48], 0
lea rdx, [rsi + 0x38]
xor edi, edi
lea r9, [rsp + 0x48]
mov word [rsp + 0x60], di
lea rcx, [0x140036970]
movzx r8d, word [rsi + 0x1c]
call fcn.1400130f4
lea ebx, [rdi + 1]
test eax, eax
jne 0x140013bf9
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140013bf9
lea r8, [rsp + 0x60]
mov rdx, rcx
sub r8, rcx
mov al, byte [rdx]
mov byte [r8 + rdx], al
add rdx, rbx
test al, al
jne 0x140013bd7
or rdi, 0xffffffffffffffff
inc rdi
cmp byte [rcx + rdi], 0
jne 0x140013be8
add edi, ebx
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
mov r9d, 0x1000
cmovne ebx, edi
cmp ebx, r9d
jae 0x140013cd0
movsxd rax, ebx
lea rdi, [rsp + 0x60]
add rdi, rax
lea rcx, [0x140036970]
sub r9d, ebx
mov r8, rdi
mov rdx, rsi
mov byte [rdi], 0
call fcn.1400131a4
test eax, eax
jne 0x140013c45
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], 0
jne 0x140013c38
inc ebx
add ebx, eax
mov rcx, rsi
call fcn.140017998
and qword [rsp + 0x30], 0
lea rcx, [0x140036b90]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140013b15
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, ebx
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140013cc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x140013a86
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140013a86
call fcn.140013e84
int3