Function at 0x140021f90
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 [0x140067040]
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 0x1400224c8
mov rdi, rbx
test cl, cl
je 0x1400224c8
mov rax, qword [rsi + 0x460]
mov r8, qword [rax + 0x10]
mov rcx, qword [rax + 8]
sub r8, rcx
xor edx, edx
call fcn.140046c00
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x4a8]
mov rcx, rsi
call fcn.140022810
test al, al
je 0x1400224c8
mov r12, qword [rsi + 0x4a0]
sub r12, qword [rsi + 0x4a8]
cmp r12, 0x10
jl 0x1400224c8
mov r14d, edi
cmp r12, rbx
jge 0x140022058
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.140022810
test al, al
je 0x14002245d
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 0x140022178
nop dword [rax]
mov r12d, ebx
sub r12d, r15d
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call fcn.140022810
test al, al
je 0x14002245d
cmp qword [rsi + 0x440], 0xffffffffffffffff
je 0x14002245d
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 0x14002214e
lea r8, [rsi + 0x420]
cmp qword [r8 + 0x18], 7
jbe 0x14002211f
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_ReadFile_code:__lu
mov rcx, rsi
call fcn.140021e50
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc r14d
cmp r14d, 0x32
jl 0x1400220e0
test r15d, r15d
je 0x14002245d
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 0x140022174
mov rdx, qword [rbp + 0x17]
jmp 0x1400220b0
mov r12, qword [rbp - 0x19]
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.140022810
test al, al
je 0x14002245d
test r15d, r15d
je 0x14002245d
xor ebx, ebx
mov rax, qword [rsi + 0x460]
mov r14, qword [rax + 8]
mov r13d, r15d
test r15d, r15d
je 0x140022205
mov edx, dword [rbp - 0x31]
mov rcx, r12
sub rcx, rbx
cmp rcx, 0x10
jl 0x1400221f6
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 0x140022205
add rbx, rdi
add r14, rdi
mov edx, edi
mov dword [rbp - 0x31], edx
cmp rbx, r13
jl 0x1400221b2
mov dword [rbp - 0x31], edi
jmp 0x140022205
lea rdx, str.chunk_temp_lower_than_...
mov rcx, rsi
call fcn.140021e50
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x4a8]
mov rcx, rsi
call fcn.140022810
test al, al
je 0x1400223e9
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.140022810
test al, al
je 0x140022303
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 0x14002239c
nop word [rax + rax]
sub r15d, r12d
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call fcn.140022810
test al, al
je 0x140022303
cmp qword [rsi + 0x440], 0xffffffffffffffff
je 0x140022303
test r14, r14
je 0x140022303
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 0x14002237a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsi + 0x420]
cmp qword [r8 + 0x18], 7
jbe 0x1400222df
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_WriteFile_code:__lu
mov rcx, rsi
call fcn.140021e50
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x1400222a0
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.1400122e0
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.140021e50
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x1400224c8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224c3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400224fb
jmp 0x1400224c3
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 0x14002239c
mov rdx, qword [rbp + 0x1f]
jmp 0x140022270
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call fcn.140022810
test al, al
je 0x140022303
test r12d, r12d
je 0x140022303
add qword [rsi + 0x4a8], r13
mov rax, qword [rsi + 0x4a8]
mov rbx, qword [rbp - 0x19]
cmp qword [rsi + 0x4a0], rax
jle 0x1400224c8
movzx ecx, byte [rbp - 0x39]
xor r13d, r13d
jmp 0x140021ff1
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.1400122e0
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.140021e50
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x1400224c8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224c3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140022501
jmp 0x1400224c3
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.1400122e0
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.140021e50
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x1400224c8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224c3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400224f5
call fcn.1400239d0
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400236d0
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.14002fcf8
int3
call fcn.14002fcf8
int3
call fcn.14002fcf8
int3