Function at 0x14001ae70
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, 0xb0
mov rax, qword [0x140059010]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14, rcx
mov rax, qword [rcx + 0x460]
mov r8, qword [rax + 8]
mov rcx, qword [rax]
sub r8, rcx
xor edx, edx
call fcn.14001f5c0
mov rsi, qword [r14 + 0x468]
mov edi, dword [r14 + 0x470]
mov dword [rbp - 0x45], edi
mov cl, 1
mov byte [rbp - 0x49], cl
mov rax, qword [r14 + 0x4b0]
cmp qword [r14 + 0x4a8], rax
jle 0x14001b3d2
nop word [rax + rax]
mov rdi, rsi
test cl, cl
je 0x14001b3d2
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [r14 + 0x4b0]
mov rcx, r14
call fcn.14001ba40
test al, al
je 0x14001b3d2
mov rax, qword [r14 + 0x4a8]
sub rax, qword [r14 + 0x4b0]
cmp rax, 0x10
jl 0x14001b3d2
cmp rax, rsi
cmovl rsi, rax
mov rbx, rsi
mov r15d, eax
cmovge r15d, edi
mov rsi, rax
cmovge rsi, rdi
mov r12, qword [r14 + 0x460]
mov qword [rbp - 0x21], 0
lea r9, [rbp + 0x17]
mov r8d, 1
mov rdx, qword [rbp - 0x21]
mov rcx, r14
call fcn.14001ba40
test al, al
je 0x14001b36b
mov rdx, qword [rbp + 0x17]
mov rdi, rdx
mov qword [rbp - 0x29], rdx
xor r13d, r13d
mov dword [rbp - 0x41], r13d
mov dword [rbp - 0x11], r13d
mov rax, qword [r12]
mov qword [rbp - 0x39], rax
test r15d, r15d
je 0x14001b079
nop dword [rax]
mov r13d, ebx
sub r13d, dword [rbp - 0x41]
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call fcn.14001ba40
test al, al
je 0x14001b36b
cmp qword [r14 + 0x440], 0xffffffffffffffff
je 0x14001b36b
xor r15d, r15d
mov rdi, qword [rbp - 0x39]
nop dword [rax]
nop word [rax + rax]
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0x11]
mov r8d, r13d
mov rdx, rdi
mov rcx, qword [r14 + 0x440]
call qword [sym.imp.KERNEL32.DLL_ReadFile]
mov r12d, eax
call qword [sym.imp.KERNEL32.DLL_GetLastError]
test r12d, r12d
jne 0x14001b048
lea r8, [r14 + 0x420]
cmp qword [r8 + 0x18], 8
jb 0x14001b01f
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_ReadFile_code:__lu
mov rcx, r14
call fcn.14001ad20
mov ecx, 0x32
call qword [sym.imp.KERNEL32.DLL_Sleep]
inc r15d
cmp r15d, 0x32
jl 0x14001afe0
test r12d, r12d
mov rdi, qword [rbp - 0x29]
je 0x14001b36b
mov eax, dword [rbp - 0x11]
add qword [r14 + 0x458], rax
mov r13d, dword [rbp - 0x41]
add r13d, eax
mov dword [rbp - 0x41], r13d
add qword [rbp - 0x39], rax
cmp r13d, ebx
jae 0x14001b079
mov rdx, qword [rbp + 0x17]
jmp 0x14001afa0
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r14
call fcn.14001ba40
test al, al
je 0x14001b36b
test r13d, r13d
je 0x14001b36b
mov qword [rbp - 0x31], 0
mov rax, qword [r14 + 0x460]
mov r15, qword [rax]
mov r12d, r13d
mov qword [rbp - 0x29], r12
mov rbx, qword [rbp - 0x31]
cmp rbx, r12
jge 0x14001b117
mov edx, dword [rbp - 0x45]
mov rcx, rsi
sub rcx, rbx
cmp rcx, 0x10
jl 0x14001b108
mov eax, edx
cmp rcx, rax
cmovge ecx, edx
mov dword [rbp - 0x45], ecx
mov edi, ecx
mov rax, qword [r14]
mov r8d, ecx
mov rdx, r15
mov rcx, r14
call qword [rax + 0x10]
mov byte [rbp - 0x49], al
test al, al
je 0x14001b117
add rbx, rdi
mov qword [rbp - 0x31], rbx
add r15, rdi
mov edx, edi
mov dword [rbp - 0x45], edx
cmp rbx, r12
jl 0x14001b0c0
mov dword [rbp - 0x45], edi
jmp 0x14001b117
lea rdx, str.chunk_res_lower_than_chunk
mov rcx, r14
call fcn.14001ad20
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [r14 + 0x4b0]
mov rcx, r14
call fcn.14001ba40
mov rcx, r14
test al, al
je 0x14001b302
mov r12, qword [r14 + 0x460]
xor r15d, r15d
mov qword [rbp - 0x19], r15
lea r9, [rbp + 0x1f]
lea r8d, [r15 + 1]
mov edx, r15d
call fcn.14001ba40
test al, al
je 0x14001b28f
mov rdx, qword [rbp + 0x1f]
mov rbx, rdx
mov edi, r15d
mov dword [rbp - 0x39], r15d
mov dword [rbp - 0xd], r15d
mov r12, qword [r12]
test r13d, r13d
je 0x14001b24e
nop dword [rax]
sub r13d, edi
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call fcn.14001ba40
test al, al
je 0x14001b28f
cmp qword [r14 + 0x440], 0xffffffffffffffff
je 0x14001b28f
test r12, r12
je 0x14001b28f
xor edi, edi
nop dword [rax]
nop word [rax + rax]
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0xd]
mov r8d, r13d
mov rdx, r12
mov rcx, qword [r14 + 0x440]
call qword [sym.imp.KERNEL32.DLL_WriteFile]
mov r15d, eax
test eax, eax
jne 0x14001b222
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea r8, [r14 + 0x420]
cmp qword [r8 + 0x18], 8
jb 0x14001b1fe
mov r8, qword [r8]
mov r9d, eax
lea rdx, str._s:_WriteFile_code:__lu
mov rcx, r14
call fcn.14001ad20
mov ecx, 0x32
call qword [sym.imp.KERNEL32.DLL_Sleep]
inc edi
cmp edi, 0x32
jl 0x14001b1c0
test r15d, r15d
je 0x14001b28f
mov eax, dword [rbp - 0xd]
add qword [r14 + 0x458], rax
mov edi, dword [rbp - 0x39]
add edi, eax
mov dword [rbp - 0x39], edi
add r12, rax
mov r13d, dword [rbp - 0x41]
cmp edi, r13d
jae 0x14001b24e
mov rdx, qword [rbp + 0x1f]
jmp 0x14001b180
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call fcn.14001ba40
test al, al
je 0x14001b28f
test edi, edi
je 0x14001b28f
mov rax, qword [rbp - 0x29]
add qword [r14 + 0x4b0], rax
mov rax, qword [r14 + 0x4b0]
cmp qword [r14 + 0x4a8], rax
jle 0x14001b3d2
movzx ecx, byte [rbp - 0x49]
jmp 0x14001aef0
lea rdx, [rbp - 9]
mov rcx, r14
call fcn.14001b820
nop
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae r8, qword [rbp - 9]
lea rdx, str.Write_error:__s
mov rcx, r14
call fcn.14001ad20
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x14001b3d2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001b3cd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001b405
jmp 0x14001b3cd
lea rdx, [rbp - 9]
call fcn.14001b820
nop
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae r8, qword [rbp - 9]
lea rdx, str.Set_pos_error:__s
mov rcx, r14
call fcn.14001ad20
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x14001b3d2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001b3cd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001b40b
jmp 0x14001b3cd
lea rdx, [rbp - 9]
mov rcx, r14
call fcn.14001b820
nop
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae r8, qword [rbp - 9]
lea rdx, str.Read_Error:__s
mov rcx, r14
call fcn.14001ad20
nop
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x14001b3d2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001b3cd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001b3ff
call fcn.14001ca40
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14001c740
lea r11, [rsp + 0xb0]
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.140026650
int3
call fcn.140026650
int3
call fcn.140026650
int3