Function at 0x1400223d0
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 [0x140074040]
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 0x140022908
mov rdi, rbx
test cl, cl
je 0x140022908
mov rax, qword [rsi + 0x460]
mov r8, qword [rax + 0x10]
mov rcx, qword [rax + 8]
sub r8, rcx
xor edx, edx
call fcn.140051d20
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x4a8]
mov rcx, rsi
call fcn.140022c50
test al, al
je 0x140022908
mov r12, qword [rsi + 0x4a0]
sub r12, qword [rsi + 0x4a8]
cmp r12, 0x10
jl 0x140022908
mov r14d, edi
cmp r12, rbx
jge 0x140022498
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.140022c50
test al, al
je 0x14002289d
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 0x1400225b8
nop dword [rax]
mov r12d, ebx
sub r12d, r15d
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call fcn.140022c50
test al, al
je 0x14002289d
cmp qword [rsi + 0x440], 0xffffffffffffffff
je 0x14002289d
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 0x14002258e
lea r8, [rsi + 0x420]
cmp qword [r8 + 0x18], 7
jbe 0x14002255f
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_ReadFile_code:__lu
mov rcx, rsi
call fcn.140022290
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc r14d
cmp r14d, 0x32
jl 0x140022520
test r15d, r15d
je 0x14002289d
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 0x1400225b4
mov rdx, qword [rbp + 0x17]
jmp 0x1400224f0
mov r12, qword [rbp - 0x19]
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.140022c50
test al, al
je 0x14002289d
test r15d, r15d
je 0x14002289d
xor ebx, ebx
mov rax, qword [rsi + 0x460]
mov r14, qword [rax + 8]
mov r13d, r15d
test r15d, r15d
je 0x140022645
mov edx, dword [rbp - 0x31]
mov rcx, r12
sub rcx, rbx
cmp rcx, 0x10
jl 0x140022636
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 0x140022645
add rbx, rdi
add r14, rdi
mov edx, edi
mov dword [rbp - 0x31], edx
cmp rbx, r13
jl 0x1400225f2
mov dword [rbp - 0x31], edi
jmp 0x140022645
lea rdx, str.chunk_temp_lower_than_...
mov rcx, rsi
call fcn.140022290
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x4a8]
mov rcx, rsi
call fcn.140022c50
test al, al
je 0x140022829
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.140022c50
test al, al
je 0x140022743
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 0x1400227dc
nop word [rax + rax]
sub r15d, r12d
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call fcn.140022c50
test al, al
je 0x140022743
cmp qword [rsi + 0x440], 0xffffffffffffffff
je 0x140022743
test r14, r14
je 0x140022743
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 0x1400227ba
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsi + 0x420]
cmp qword [r8 + 0x18], 7
jbe 0x14002271f
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_WriteFile_code:__lu
mov rcx, rsi
call fcn.140022290
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x1400226e0
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.140012840
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.140022290
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x140022908
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022903
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002293b
jmp 0x140022903
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 0x1400227dc
mov rdx, qword [rbp + 0x1f]
jmp 0x1400226b0
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call fcn.140022c50
test al, al
je 0x140022743
test r12d, r12d
je 0x140022743
add qword [rsi + 0x4a8], r13
mov rax, qword [rsi + 0x4a8]
mov rbx, qword [rbp - 0x19]
cmp qword [rsi + 0x4a0], rax
jle 0x140022908
movzx ecx, byte [rbp - 0x39]
xor r13d, r13d
jmp 0x140022431
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.140012840
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.140022290
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x140022908
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022903
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140022941
jmp 0x140022903
lea rdx, [rsi + 0x420]
lea rcx, [rbp - 9]
call fcn.140012840
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.140022290
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 7
jbe 0x140022908
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022903
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140022935
call fcn.14002d030
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14002cd30
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.14003a96c
int3
call fcn.14003a96c
int3
call fcn.14003a96c
int3