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

Disassembly:
push rbp
push rdi
push r13
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x14006a0d0]
xor rax, rsp
mov qword [rbp + 0x570], rax
mov qword [rsp + 0x40], r8
mov r13d, r9d
mov qword [rsp + 0x48], rdx
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
jne 0x14001888b
lea ecx, [rdi + 0xb]
call fcn.1400190a0
mov rax, rdi
jmp 0x140018ad1
mov qword [rsp + 0x6d8], rbx
xor eax, eax
mov qword [rsp + 0x698], rsi
xor sil, sil
mov qword [rsp + 0x690], r12
xor r11d, r11d
mov qword [rsp + 0x688], r14
mov r12d, r11d
mov qword [rsp + 0x680], r15
lea r14, [rax - 1]
mov r15d, dword [rbp + 0x5e0]
mov word [rsp + 0x54], ax
mov byte [rsp + 0x56], al
nop dword [rax]
nop word [rax + rax]
movzx r10d, byte [rsp + 0x54]
mov r8d, 0xffffffff
mov edx, dword [rsp + 0x58]
test r10b, r10b
mov eax, dword [rbp + 0x160]
cmovne edx, r11d
mov dword [rsp + 0x50], r8d
cmp byte [rsp + 0x55], 0
mov dword [rsp + 0x58], edx
cmovne eax, r11d
cmp byte [rsp + 0x56], 0
mov dword [rbp + 0x160], eax
mov eax, dword [rbp + 0x368]
cmovne eax, r11d
mov dword [rbp + 0x368], eax
test r10b, r10b
jne 0x14001893e
mov r10b, 1
mov edx, r11d
mov byte [rsp + 0x54], r10b
mov dword [rsp + 0x58], edx
mov eax, r11d
test edx, edx
je 0x14001895f
lea rcx, [rsp + 0x60]
nop word [rax + rax]
cmp qword [rcx], rdi
je 0x14001895f
inc eax
add rcx, 8
cmp eax, edx
jb 0x140018950
cmp eax, edx
jne 0x14001897e
cmp edx, 0x40
jae 0x14001897e
mov ecx, eax
mov qword [rsp + rcx*8 + 0x60], rdi
inc dword [rsp + 0x58]
movzx r10d, byte [rsp + 0x54]
mov r8d, dword [rsp + 0x50]
cmp edi, r8d
mov ebx, r15d
mov eax, r15d
cmovg r8d, edi
mov dword [rsp + 0x50], r8d
test r15d, r15d
jle 0x1400189bc
call qword [sym.imp.KERNEL32.dll_GetTickCount]
test sil, sil
je 0x1400189b1
lea ebx, [r12 + r15]
sub ebx, eax
js 0x140018a9c
xor r11d, r11d
jmp 0x1400189c3
mov r12d, eax
mov sil, 1
xor r11d, r11d
jmp 0x1400189c3
mov rcx, r11
test eax, eax
js 0x140018a07
movzx eax, byte [0x14006c6e8]
lea rcx, [rsp + 0x38]
test al, al
nop
movzx r10d, byte [rsp + 0x54]
mov eax, 0x64
cmovne ebx, eax
mov eax, 0x10624dd3
imul ebx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x38], edx
sub ebx, eax
imul eax, ebx, 0x3e8
mov dword [rsp + 0x3c], eax
cmp byte [rsp + 0x56], 0
lea r9, [rbp + 0x368]
mov qword [rsp + 0x20], rcx
lea r8, [rbp + 0x160]
cmove r9, r11
lea rdx, [rsp + 0x58]
cmp byte [rsp + 0x55], 0
cmove r8, r11
test r10b, r10b
cmove rdx, r11
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x140018aa6
test eax, eax
je 0x140018a9c
jle 0x140018aa6
mov r8d, dword [rsp + 0x40]
mov ecx, r13d
mov rdx, qword [rsp + 0x48]
and ecx, 1
mov r9d, ecx
or r9d, 2
test r13b, 2
cmove r9d, ecx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x140018a81
mov r14, 0xffffffffffffffff
jmp 0x140018a8a
movsxd r14, eax
cmp r14, 0xffffffffffffffff
jne 0x140018aa6
call fcn.140018dd0
cmp eax, 0x10
jne 0x140018aa6
xor r11d, r11d
jmp 0x1400188e0
mov ecx, reloc.WS2_32.dll_ntohs
call fcn.1400190a0
mov r15, qword [rsp + 0x680]
mov rax, r14
mov r14, qword [rsp + 0x688]
mov r12, qword [rsp + 0x690]
mov rsi, qword [rsp + 0x698]
mov rbx, qword [rsp + 0x6d8]
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.140029f00
add rsp, 0x6a0
pop r13
pop rdi
pop rbp
ret