Function at 0x140060810
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3b0]
sub rsp, 0x4b0
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x4f8], rbx
mov rax, qword [0x1402c94a0]
xor rax, rsp
mov qword [rbp + 0x3a0], rax
mov rsi, r8
mov qword [rsp + 0x50], r8
mov r15, rcx
mov qword [rsp + 0x48], rcx
lea rbx, [rcx + 0x30]
mov qword [rsp + 0x70], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x78], 1
cmp byte [r15 + 0x198], 0
jne 0x140060dfa
lea r14, [r15 + 0x148]
mov rax, qword [r14]
xor edi, edi
mov dword [rax], edi
mov qword [r14 + 0x10], 0xffffffffffffffff
mov rax, qword [r15 + 0x160]
mov dword [rax], edi
mov qword [r15 + 0x170], 0xffffffffffffffff
mov rax, qword [rbx + 0x148]
mov dword [rax], edi
mov qword [rbx + 0x158], 0xffffffffffffffff
mov rbx, qword [r15 + 0x58]
mov ecx, edi
mov r8, qword [r14]
mov edx, dword [r8]
test edx, edx
je 0x1400608df
nop
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x1400608f8
inc ecx
cmp ecx, edx
jb 0x1400608d0
inc edx
mov rcx, r14
call fcn.14005f260
mov rcx, qword [r14]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rbx
mov rax, qword [r14]
inc dword [rax]
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x14006091e
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140060b3a
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140060904
xor sil, sil
lea r12, [r15 + 0x70]
mov qword [rsp + 0x60], 3
nop
mov rcx, rdi
mov qword [rsp + 0x58], rcx
test sil, sil
jne 0x140060945
cmp qword [r12 + 8], 0
je 0x140060948
mov sil, 1
mov rax, qword [r12]
mov rbx, qword [rax]
cmp rbx, rax
je 0x1400609fc
nop dword [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov r15, qword [r14]
mov edx, dword [r15]
inc edx
mov ecx, dword [r14 + 8]
cmp edx, ecx
jbe 0x1400609dc
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r13d, edx
lea rcx, [rdx*8 + 8]
call fcn.1401e4cb4
mov r15, rax
mov rcx, qword [r14]
mov edx, dword [rcx]
mov dword [rax], edx
xor r8d, r8d
mov rcx, qword [r14]
cmp dword [rcx], r8d
jbe 0x1400609d0
nop word [rax + rax]
lea rdx, [r8*8]
mov rax, qword [r14]
mov rcx, qword [rdx + rax + 8]
mov qword [rdx + r15 + 8], rcx
inc r8d
mov rcx, qword [r14]
cmp r8d, dword [rcx]
jb 0x1400609b0
call fcn.1401e5074
mov qword [r14], r15
mov dword [r14 + 8], r13d
mov ecx, dword [r15]
mov rax, qword [rdi + 0x10]
mov qword [r15 + rcx*8 + 8], rax
mov rax, qword [r14]
inc dword [rax]
cmp rbx, qword [r12]
jne 0x140060960
mov rcx, qword [rsp + 0x58]
mov rdi, qword [r14 + 0x10]
cmp rdi, rcx
cmovbe rdi, rcx
add r12, 0x38
add r14, 0x18
sub qword [rsp + 0x60], 1
jne 0x140060930
mov r15, qword [rsp + 0x48]
lea r12, [r15 + 0x110]
lea r13, [r15 + 0x160]
mov rdx, r12
mov rcx, r13
call fcn.14005f060
mov rbx, qword [r15 + 0x170]
cmp rbx, rdi
cmovbe rbx, rdi
lea rdi, [r15 + 0x178]
mov qword [rsp + 0x58], rdi
mov rdx, r12
mov rcx, rdi
call fcn.14005f060
mov r14, qword [r15 + 0x188]
cmp r14, rbx
cmovbe r14, rbx
xor eax, eax
mov qword [rsp + 0x40], rax
lea ecx, [rax + 1]
mov rbx, qword [r15 + 0x190]
test rbx, rbx
mov rsi, qword [rsp + 0x50]
je 0x140060aa6
nop word [rax + rax]
mov rax, qword [rbx]
mov edx, ecx
mov rcx, rbx
call qword [rax + 0x18]
mov ecx, eax
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140060a90
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x40], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0x44], ecx
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.1400a9490
mov rbx, qword [rdi]
mov rdi, qword [r13]
mov r15, qword [r15 + 0x148]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test r15, r15
jne 0x140060b42
test rdi, rdi
jne 0x140060b42
test rbx, rbx
jne 0x140060b42
mov eax, 0x10624dd3
imul dword [rsp + 0x44]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0x40], 0x3e8
add ecx, eax
mov r8d, 1
cmove ecx, r8d
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.1400a9490
mov edi, r15d
mov r14, qword [rsp + 0x48]
jmp 0x140060c7f
mov sil, 1
jmp 0x140060921
cmp dword [rsp + 0x40], 0
jne 0x140060b61
mov ecx, dword [rsp + 0x44]
lea eax, [rcx - 1]
mov edx, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, edx
mov dword [rsp + 0x44], ecx
lea ecx, [r14 + 1]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9, rbx
mov r8, rdi
mov rdx, r15
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
call fcn.1400a9490
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
js 0x140060b96
call fcn.1400a9490
test edi, edi
mov r14, qword [rsp + 0x48]
jle 0x140060c7c
mov rdx, qword [r14 + 0x148]
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
xor r15d, r15d
test eax, eax
je 0x140060c7f
lea rax, [rbp - 0x60]
mov qword [rbp - 0x78], rax
mov dword [rbp - 0x80], 0x400
mov dword [rsp + 0x60], r15d
call fcn.1400a9490
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r8d, [r15 + 1]
lea rdx, [rbp - 0x80]
mov rcx, qword [r14 + 0x58]
call fcn.14005f550
cmp eax, 0x400
jne 0x140060c78
lea r12d, [r15 + 1]
mov rbx, qword [r14 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x60], r15d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov r8d, r12d
lea rdx, [rbp - 0x80]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.1400a9490
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x140060c59
cmp eax, 0x4d2
jne 0x140060c5e
call fcn.1400a9490
test ebx, ebx
jne 0x140060c71
call fcn.1400a9490
cmp dword [rsp + 0x50], 0x400
je 0x140060c01
lea r12, [r14 + 0x110]
dec edi
jmp 0x140060c7f
xor r15d, r15d
lea rcx, [r14 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x78], 1
test edi, edi
jle 0x140060dc9
mov r8, rsi
mov rdx, r12
mov rcx, qword [rsp + 0x58]
call fcn.14005f130
mov r8, rsi
mov rdx, r12
mov rcx, r13
call fcn.14005f130
mov r13d, 2
add r14, 0xe0
mov r12, qword [rsp + 0x58]
nop word [rax + rax]
mov rcx, qword [r12]
cmp dword [rcx], 0
jbe 0x140060db1
nop dword [rax]
mov eax, r15d
mov r8, qword [rcx + rax*8 + 8]
mov rcx, qword [r14 + 0x28]
test rcx, rcx
je 0x140060d2e
xor edx, edx
mov rax, r8
div rcx
add rdx, rdx
mov rax, qword [r14 + 0x20]
mov rbx, qword [rax + rdx*8]
mov rcx, qword [r14]
cmp rbx, rcx
je 0x140060d31
mov rax, qword [rax + rdx*8 + 8]
mov rax, qword [rax]
cmp rbx, rax
je 0x140060d2e
nop dword [rax]
cmp qword [rbx + 0x10], r8
je 0x140060d34
mov rbx, qword [rbx]
cmp rbx, rax
jne 0x140060d20
mov rcx, qword [r14]
mov rbx, rcx
cmp rbx, rcx
je 0x140060da1
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x140060d95
mov rcx, rdi
call qword [rdi + 0x50]
test eax, eax
je 0x140060da1
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140060d6e
mov rax, qword [rcx + 0x20]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x140060d66
mov qword [rbx + 0x20], rax
mov qword [rcx + 0x20], 0
mov qword [rdi + 0x20], 0
mov rax, qword [rsi + 8]
test rax, rax
je 0x140060d85
mov qword [rax + 0x20], rdi
jmp 0x140060d88
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rdi, qword [rbx + 0x18]
test rdi, rdi
jne 0x140060d42
lea rcx, [r14 - 8]
mov rdx, rbx
call fcn.14002b5a0
inc r15d
mov rcx, qword [r12]
cmp r15d, dword [rcx]
jb 0x140060ce0
sub r14, 0x38
sub r12, 0x18
sub r13, 1
mov r15d, 0
jns 0x140060cd0
mov r15, qword [rsp + 0x48]
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x140060df5
nop word [rax + rax]
mov rax, qword [rbx]
mov rdx, rsi
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140060de0
mov rbx, qword [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x3a0]
xor rcx, rsp
call fcn.1401e4940
mov rbx, qword [rsp + 0x4f8]
add rsp, 0x4b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret