Function at 0x140005e00
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x38
mov r14, rcx
mov rsi, rdx
mov rcx, qword [rdx + 0x18]
mov edx, dword [rcx]
cmp edx, 1
jg 0x14004c026
xor al, al
test al, al
jne 0x14004c02d
mov rax, qword [rsi]
xor ebx, ebx
mov qword [rsi + 8], rbx
xor r15b, r15b
movabs r12, 0x8000000000000000
mov qword [rsp + 0x30], rbp
mov byte [rax], bl
nop word [rax + rax]
cmp dword [r14 + 0x10], ebx
je 0x14004c060
mov edx, dword [r14 + 0x14]
mov rdi, rbx
cmp edx, dword [r14 + 0x10]
je 0x140005fad
mov rax, qword [r14 + 8]
movsxd rcx, edx
movzx ecx, byte [rcx + rax]
mov byte [rsp + rdi + 0x70], cl
inc rdi
inc edx
mov dword [r14 + 0x14], edx
cmp rdi, 1
jb 0x140005e61
add qword [r14 + 0x18], rdi
test rdi, rdi
je 0x140005fe3
movzx ebp, byte [rsp + 0x70]
mov r15b, 1
cmp bpl, 0xd
je 0x140005ef7
cmp bpl, 0xa
je 0x140005f44
mov rcx, qword [rsi + 0x18]
mov edx, dword [rcx]
cmp edx, 1
jg 0x14004c09e
xor al, al
test al, al
jne 0x14004c0a5
mov rax, qword [rsi + 8]
add rax, 2
cmp qword [rsi + 0x10], rax
jb 0x140005f59
mov rcx, qword [rsi + 8]
mov rax, qword [rsi]
mov byte [rcx + rax], bpl
inc qword [rsi + 8]
mov rcx, qword [rsi + 8]
mov rax, qword [rsi]
mov byte [rcx + rax], bl
jmp 0x140005e50
cmp dword [r14 + 0x10], ebx
je 0x14004c192
mov edx, dword [r14 + 0x14]
mov rdi, rbx
cmp edx, dword [r14 + 0x10]
je 0x14004c1c1
mov rax, qword [r14 + 8]
movsxd rcx, edx
movzx ecx, byte [rcx + rax]
mov byte [rsp + rdi + 0x70], cl
inc rdi
inc edx
mov dword [r14 + 0x14], edx
cmp rdi, 1
jb 0x140005f08
add qword [r14 + 0x18], rdi
test rdi, rdi
je 0x140005f44
cmp byte [rsp + 0x70], 0xa
jne 0x14004c201
mov al, 1
mov rbp, qword [rsp + 0x30]
add rsp, 0x38
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret
cmp rax, 0x41c2
jae 0x14004c0fb
lea rcx, [rax + rax]
test rcx, rcx
je 0x14004c188
add rcx, 0xf
and rcx, 0xfffffffffffffff0
mov qword [rsi + 0x10], rcx
call fcn.1400251f8
mov rdx, qword [rsi]
mov rdi, rax
test rdx, rdx
je 0x140005fa5
mov r8, qword [rsi + 8]
mov rcx, rax
inc r8
call fcn.140026290
mov rcx, qword [rsi]
call fcn.1400251b4
mov qword [rsi], rdi
jmp 0x140005ed9
mov rdx, qword [r14 + 8]
lea r9, [rsp + 0x78]
mov rcx, qword [r14]
mov r8d, 0x10000
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140005e89
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x140005e89
jmp 0x14004c08f
test r15b, r15b
jne 0x140005f44
xor al, al
jmp 0x140005f46
mov al, 1
jmp 0x140005e25
lea eax, [rdx - 1]
mov dword [rcx], eax
mov ecx, 4
call fcn.1400251bc
mov ecx, reloc.WSOCK32.dll_recv
mov dword [rax], 1
mov qword [rsi + 0x18], rax
mov qword [rsi + reloc.WSOCK32.dll_recv], 0x10
call fcn.1400251f8
mov qword [rsi], rax
jmp 0x140005e2d
mov rcx, qword [r14]
lea r8, [rsp + 0x80]
mov r9d, 1
mov qword [r14 + 0x10], rbx
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rax, qword [rsp + 0x80]
mov qword [r14 + 0x18], rax
jmp 0x140005e5a
mov dword [r14 + 0x10], eax
mov edx, ebx
mov dword [r14 + 0x14], ebx
jmp 0x140005e6b
mov al, 1
jmp 0x140005ebf
lea eax, [rdx - 1]
mov dword [rcx], eax
mov ecx, 4
call fcn.1400251bc
mov dword [rax], 1
mov rcx, qword [rsi + 8]
mov qword [rsi + 0x18], rax
add rcx, 2
jne 0x14004c0cf
mov ecx, reloc.WSOCK32.dll_recv
jmp 0x14004c0d7
add rcx, 0xf
and rcx, 0xfffffffffffffff0
mov qword [rsi + 0x10], rcx
call fcn.1400251f8
mov r8, qword [rsi + 8]
mov rcx, rax
mov rdx, qword [rsi]
inc r8
mov rdi, rax
call fcn.140026290
nop
jmp 0x140005fa5
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
test rax, rax
jns 0x14004c110
addsd xmm0, qword [0x1400c81c0]
cmp rax, 0x2000000
jae 0x14004c14a
mulsd xmm0, qword [0x1400daa80]
jmp 0x14004c12a
mulsd xmm0, qword [0x1400daa78]
xor eax, eax
comisd xmm0, xmmword [0x1400daa88]
jb 0x14004c17b
subsd xmm0, qword [0x1400daa88]
comisd xmm0, xmmword [0x1400daa88]
jb 0x14004c178
jmp 0x14004c17b
cmp rax, 0x8000000
jb 0x14004c122
mulsd xmm0, qword [0x1400daa70]
xor eax, eax
comisd xmm0, xmmword [0x1400daa88]
jb 0x14004c17b
subsd xmm0, qword [0x1400daa88]
comisd xmm0, xmmword [0x1400daa88]
jae 0x14004c17b
add rax, r12
cvttsd2si rcx, xmm0
add rcx, rax
jmp 0x140005f69
mov ecx, reloc.WSOCK32.dll_recv
jmp 0x140005f7a
mov rcx, qword [r14]
lea r8, [rsp + 0x80]
mov r9d, 1
mov qword [r14 + 0x10], rbx
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rax, qword [rsp + 0x80]
mov qword [r14 + 0x18], rax
jmp 0x140005f01
mov rdx, qword [r14 + 8]
lea r9, [rsp + 0x78]
mov rcx, qword [r14]
mov r8d, 0x10000
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140005f30
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x140005f30
mov dword [r14 + 0x10], eax
mov edx, ebx
mov dword [r14 + 0x14], ebx
jmp 0x140005f12
mov rdx, 0xffffffffffffffff
mov rcx, r14
lea r8d, [rdx + 2]
call fcn.14001cbd8
nop
jmp 0x140005f44