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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rax, qword [0x140073040]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, rcx
xor r13d, r13d
mov rbx, qword [rcx + 0x468]
mov edi, dword [rcx + 0x470]
mov dword [rbp - 0x31], edi
mov cl, 1
mov byte [rbp - 0x39], cl
mov rax, qword [rsi + 0x4a8]
cmp qword [rsi + 0x4a0], rax
jle 0x140022488
mov rdi, rbx
test cl, cl
je 0x140022488
mov rax, qword [rsi + 0x460]
mov r8, qword [rax + 0x10]
mov rcx, qword [rax + 8]
sub r8, rcx
xor edx, edx
call fcn.140050d90
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x4a8]
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x140022488
mov r12, qword [rsi + 0x4a0]
sub r12, qword [rsi + 0x4a8]
cmp r12, 0x10
jl 0x140022488
mov r14d, edi
cmp r12, rbx
jge 0x140022018
mov rbx, r12
mov r14d, r12d
cmovge r12, rdi
mov qword [rbp - 0x19], r12
mov r15, qword [rsi + 0x460]
mov qword [rbp - 0x29], 0
lea r9, [rbp + 0x17]
mov r8d, 1
mov rdx, qword [rbp - 0x29]
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x14002241d
mov rdx, qword [rbp + 0x17]
mov rdi, rdx
mov dword [rbp - 0x35], r13d
mov dword [rbp - 0xd], r13d
mov r13, qword [r15 + 8]
mov r15d, dword [rbp - 0x35]
test r14d, r14d
je 0x140022138
nop dword [rax]
mov r12d, ebx
sub r12d, r15d
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x14002241d
cmp qword [rsi + 0x440], 0xffffffffffffffff
je 0x14002241d
xor r14d, r14d
nop dword [rax]
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0xd]
mov r8d, r12d
mov rdx, r13
mov rcx, qword [rsi + 0x440]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test r15d, r15d
jne 0x14002210e
lea r8, [rsi + 0x420]
cmp qword [r8 + 0x18], 7
jbe 0x1400220df
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_ReadFile_code:__lu
mov rcx, rsi
call fcn.140021e10
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc r14d
cmp r14d, 0x32
jl 0x1400220a0
test r15d, r15d
je 0x14002241d
mov eax, dword [rbp - 0xd]
add qword [rsi + 0x458], rax
mov r15d, dword [rbp - 0x35]
add r15d, eax
mov dword [rbp - 0x35], r15d
add r13, rax
cmp r15d, ebx
jae 0x140022134
mov rdx, qword [rbp + 0x17]
jmp 0x140022070
mov r12, qword [rbp - 0x19]
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x14002241d
test r15d, r15d
je 0x14002241d
xor ebx, ebx
mov rax, qword [rsi + 0x460]
mov r14, qword [rax + 8]
mov r13d, r15d
test r15d, r15d
je 0x1400221c5
mov edx, dword [rbp - 0x31]
mov rcx, r12
sub rcx, rbx
cmp rcx, 0x10
jl 0x1400221b6
mov eax, edx
cmp rcx, rax
cmovge ecx, edx
mov dword [rbp - 0x31], ecx
mov edi, ecx
mov rax, qword [rsi]
mov r8d, ecx
mov rdx, r14
mov rcx, rsi
call qword [rax + 0x10]
mov byte [rbp - 0x39], al
test al, al
je 0x1400221c5
add rbx, rdi
add r14, rdi
mov edx, edi
mov dword [rbp - 0x31], edx
cmp rbx, r13
jl 0x140022172
mov dword [rbp - 0x31], edi
jmp 0x1400221c5
lea rdx, str.chunk_temp_lower_than_...
mov rcx, rsi
call fcn.140021e10
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x4a8]
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x1400223a9
mov r14, qword [rsi + 0x460]
mov qword [rbp - 0x21], 0
lea r9, [rbp + 0x1f]
mov r8d, 1
mov rdx, qword [rbp - 0x21]
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x1400222c3
mov rdx, qword [rbp + 0x1f]
mov rbx, rdx
xor r12d, r12d
mov dword [rbp - 0x11], r12d
mov r14, qword [r14 + 8]
test r15d, r15d
je 0x14002235c
nop word [rax + rax]
sub r15d, r12d
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x1400222c3
cmp qword [rsi + 0x440], 0xffffffffffffffff
je 0x1400222c3
test r14, r14
je 0x1400222c3
xor edi, edi
nop word [rax + rax]
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0x11]
mov r8d, r15d
mov rdx, r14
mov rcx, qword [rsi + 0x440]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14002233a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsi + 0x420]
cmp qword [r8 + 0x18], 7
jbe 0x14002229f
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_WriteFile_code:__lu
mov rcx, rsi
call fcn.140021e10
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x140022260
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.1400122a0
nop
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 7
cmova r8, qword [rbp - 9]
lea rdx, str.Write_error:__s
mov rcx, rsi
call fcn.140021e10
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x140022488
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022483
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400224bb
jmp 0x140022483
mov eax, dword [rbp - 0x11]
add qword [rsi + 0x458], rax
add r12d, eax
add r14, rax
mov r15d, dword [rbp - 0x35]
cmp r12d, r15d
jae 0x14002235c
mov rdx, qword [rbp + 0x1f]
jmp 0x140022230
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call fcn.1400227d0
test al, al
je 0x1400222c3
test r12d, r12d
je 0x1400222c3
add qword [rsi + 0x4a8], r13
mov rax, qword [rsi + 0x4a8]
mov rbx, qword [rbp - 0x19]
cmp qword [rsi + 0x4a0], rax
jle 0x140022488
movzx ecx, byte [rbp - 0x39]
xor r13d, r13d
jmp 0x140021fb1
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.1400122a0
nop
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 7
cmova r8, qword [rbp - 9]
lea rdx, str.Set_pos_error:__s
mov rcx, rsi
call fcn.140021e10
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x140022488
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022483
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400224c1
jmp 0x140022483
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.1400122a0
nop
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 7
cmova r8, qword [rbp - 9]
lea rdx, str.Read_Error:__s
mov rcx, rsi
call fcn.140021e10
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x140022488
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022483
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400224b5
call fcn.14002c5f0
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14002c2f0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.1400395bc
int3
call fcn.1400395bc
int3
call fcn.1400395bc
int3