Function at 0x140006d40
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov rdi, r8
mov r13, rdx
mov rbp, rcx
xor r15d, r15d
mov dword [rax + 0x20], r15d
xor edx, edx
lea r8d, [r15 + 2]
mov rcx, r13
call fcn.1401e6680
mov rcx, r13
call fcn.1401e6564
movsxd r14, eax
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.1401e6680
cmp r14d, 0x4000000
jle 0x140006db9
test rdi, rdi
je 0x140006dad
mov dword [rdi], 0xfffffffe
mov qword [rbp], r15
mov rax, rbp
jmp 0x140006fd7
lea esi, [r14 + 1]
mov rbx, r15
mov qword [rsp + 0x38], rbx
test esi, esi
jle 0x140006e04
mov ecx, 0x18
call fcn.1401e37b4
mov rbx, rax
test rax, rax
je 0x140006dfc
mov qword [rax], r15
mov dword [rax + 8], esi
mov dword [rax + 0xc], r15d
mov dword [rax + 0x10], 1
movsxd rcx, esi
call fcn.1401e3610
mov qword [rbx], rax
mov byte [rax], r15b
jmp 0x140006dff
mov rbx, r15
mov qword [rsp + 0x38], rbx
test rbx, rbx
je 0x140006e11
mov rsi, qword [rbx]
test rsi, rsi
jne 0x140006e14
mov rsi, r15
mov r9, r13
mov edx, 1
lea r8d, [rdx + 0xb]
mov rcx, rsi
call fcn.1401e6380
mov r12, rax
cmp rax, 0xc
jne 0x140006f2c
cmp byte [rsi], 0x31
jne 0x140006f2c
cmp byte [rsi + 1], 0x32
jne 0x140006f2c
cmp byte [rsi + 2], 0x78
jne 0x140006f2c
cmp byte [rsi + 3], 0
jne 0x140006f2c
movsx r15d, byte [rsi + 4]
mov eax, dword [rsi + 8]
mov dword [rsp + 0x30], eax
lea eax, [r14 - 0xc]
movsxd r12, eax
mov r9, r13
mov r8d, 1
mov rdx, r12
mov rcx, rsi
call fcn.1401e6380
mov r9d, r12d
xor r8d, r8d
mov edx, r12d
mov rcx, rsi
call fcn.140004180
mov ecx, eax
mov eax, dword [rsp + 0x30]
cmp ecx, eax
je 0x140006f16
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x140006ecd
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea r9, str.check_sum_err:__u__u
mov r8d, 0x657
lea rdx, str..._.._base_hTString.h
mov ecx, 3
call fcn.1400045a0
test rdi, rdi
je 0x140006ed8
mov dword [rdi], 0xfffffffd
mov qword [rbp], 0
mov dword [rsp + 0xa8], 1
test rbx, rbx
je 0x140006f0e
dec dword [rbx + 0x10]
cmp dword [rbx + 0x10], 0
jg 0x140006f0e
mov rcx, qword [rbx]
test rcx, rcx
je 0x140006f06
call fcn.1401e36c8
mov rcx, rbx
call fcn.1401e32b0
mov rax, rbp
jmp 0x140006fd7
test rdi, rdi
je 0x140006f56
xor eax, eax
test r15d, r15d
setne al
inc eax
mov dword [rdi], eax
xor r15d, r15d
jmp 0x140006f59
test rdi, rdi
je 0x140006f34
mov dword [rdi], r15d
cmp r14, rax
jbe 0x140006f59
mov rdx, r14
sub rdx, rax
lea rcx, [rsi + 0xc]
mov r9, r13
mov r8d, 1
call fcn.1401e6380
mov r12, r14
jmp 0x140006f59
xor r15d, r15d
test r12, r12
je 0x140006f86
test rbx, rbx
je 0x140006f6b
mov rax, qword [rbx]
test rax, rax
jne 0x140006f6e
mov rax, r15
mov byte [rax + r12], 0
lea eax, [r12 + 1]
test eax, eax
js 0x140006f9a
cmp eax, dword [rbx + 8]
jg 0x140006f9a
mov dword [rbx + 0xc], eax
jmp 0x140006f9a
test rbx, rbx
je 0x140006f9a
mov dword [rbx + 0xc], r15d
mov rax, qword [rbx]
test rax, rax
je 0x140006f9a
mov byte [rax], 0
mov qword [rbp], rbx
test rbx, rbx
je 0x140006fa6
inc dword [rbx + 0x10]
mov dword [rsp + 0xa8], 1
test rbx, rbx
je 0x140006fd4
dec dword [rbx + 0x10]
cmp dword [rbx + 0x10], 0
jg 0x140006fd4
mov rcx, qword [rbx]
test rcx, rcx
je 0x140006fcc
call fcn.1401e36c8
mov rcx, rbx
call fcn.1401e32b0
mov rax, rbp
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret