Function at 0x140019470
Capabilities:
Get socket status
Read file on windows
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x2d8
mov rax, qword [0x14002f100]
xor rax, rsp
mov qword [rsp + 0x2c0], rax
cmp dword [rsp + 0x2e8], 3
jne 0x140019738
cmp dword [rsp + 0x2f0], 0
je 0x1400195df
cmp dword [rsp + 0x2f0], 0xffffffff
je 0x1400195df
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x288], 0
jmp 0x1400194eb
mov eax, dword [rsp + 0x288]
inc eax
mov dword [rsp + 0x288], eax
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x288], eax
jae 0x140019512
mov eax, dword [rsp + 0x288]
mov rcx, qword [rsp + 0x2e0]
cmp qword [rsp + rax*8 + 0x78], rcx
jne 0x140019510
jmp 0x140019512
jmp 0x1400194db
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x288], eax
jne 0x140019544
cmp dword [rsp + 0x70], 0x40
jae 0x140019544
mov eax, dword [rsp + 0x288]
mov rcx, qword [rsp + 0x2e0]
mov qword [rsp + rax*8 + 0x78], rcx
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
xor eax, eax
test eax, eax
jne 0x1400194ce
xor edx, edx
mov eax, dword [rsp + 0x2f0]
mov ecx, 0x3e8
div ecx
mov dword [rsp + 0x280], eax
xor edx, edx
mov eax, dword [rsp + 0x2f0]
mov ecx, 0x3e8
div ecx
mov eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x284], eax
lea rax, [rsp + 0x280]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x70]
mov ecx, 1
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jge 0x1400195df
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jne 0x1400195bf
mov dword [rsp + 0x2a0], 0x80004005
jmp 0x1400195d3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140008f00
mov dword [rsp + 0x2a0], eax
mov eax, dword [rsp + 0x2a0]
jmp 0x1400198f6
mov eax, dword [rsp + 0x300]
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x2f8]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x310]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x308]
mov r8d, 1
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
je 0x14001964c
xor eax, eax
jmp 0x1400198f6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x140019690
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jne 0x140019670
mov dword [rsp + 0x2a4], 0x80004005
jmp 0x140019684
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140008f00
mov dword [rsp + 0x2a4], eax
mov eax, dword [rsp + 0x2a4]
jmp 0x1400198f6
cmp dword [rsp + 0x2f0], 0
jbe 0x1400196a7
mov dword [rsp + 0x2a8], 1
jmp 0x1400196b2
mov dword [rsp + 0x2a8], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x2a8]
mov r8, qword [rsp + 0x308]
mov rdx, qword [rsp + 0x310]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
je 0x1400196f3
mov dword [rsp + 0x2ac], 0
jmp 0x14001972c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jne 0x14001970a
mov dword [rsp + 0x2b0], 0x80004005
jmp 0x14001971e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140008f00
mov dword [rsp + 0x2b0], eax
mov eax, dword [rsp + 0x2b0]
mov dword [rsp + 0x2ac], eax
mov eax, dword [rsp + 0x2ac]
jmp 0x1400198f6
mov rax, qword [rsp + 0x310]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x308]
mov r8d, dword [rsp + 0x300]
mov rdx, qword [rsp + 0x2f8]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400198ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001978a
mov dword [rsp + 0x2b4], 0x80004005
jmp 0x14001979e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140008f00
mov dword [rsp + 0x2b4], eax
mov eax, dword [rsp + 0x2b4]
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400198c0
cmp dword [rsp + 0x2e8], 2
jne 0x140019856
mov edx, dword [rsp + 0x2f0]
mov rax, qword [rsp + 0x310]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_CancelIo]
xor r9d, r9d
mov r8, qword [rsp + 0x308]
mov rdx, qword [rsp + 0x310]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x14001981e
mov dword [rsp + 0x40], 0
jmp 0x140019854
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140019835
mov dword [rsp + 0x2b8], 0x80004005
jmp 0x140019849
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140008f00
mov dword [rsp + 0x2b8], eax
mov eax, dword [rsp + 0x2b8]
mov dword [rsp + 0x40], eax
jmp 0x1400198be
mov r9d, 1
mov r8, qword [rsp + 0x308]
mov rdx, qword [rsp + 0x310]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x140019888
mov dword [rsp + 0x40], 0
jmp 0x1400198be
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001989f
mov dword [rsp + 0x2bc], 0x80004005
jmp 0x1400198b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140008f00
mov dword [rsp + 0x2bc], eax
mov eax, dword [rsp + 0x2bc]
mov dword [rsp + 0x40], eax
jmp 0x1400198e8
cmp dword [rsp + 0x2e8], 2
je 0x1400198e8
lea r8, [rsp + 0x290]
lea rdx, [rsp + 0x28c]
mov rcx, qword [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_ClearCommError]
jmp 0x1400198f2
mov dword [rsp + 0x40], 0
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x2c0]
xor rcx, rsp
call fcn.140029820
add rsp, 0x2d8
ret