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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3d0]
sub rsp, 0x4d0
mov rax, qword [0x1401121f0]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov qword [rsp + 0x50], r8
mov rsi, rcx
mov qword [rbp - 0x80], rcx
lea rbx, [rcx + 0x30]
mov qword [rsp + 0x40], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r13b, 1
mov byte [rsp + 0x48], r13b
cmp byte [rsi + 0x198], 0
jne 0x1400211fa
lea r15, [rsi + 0x148]
mov rax, qword [r15]
xor r12d, r12d
mov dword [rax], r12d
mov qword [r15 + 0x10], 0xffffffffffffffff
mov rax, qword [rsi + 0x160]
mov dword [rax], r12d
mov qword [rsi + 0x170], 0xffffffffffffffff
mov rax, qword [rbx + 0x148]
mov dword [rax], r12d
mov qword [rbx + 0x158], 0xffffffffffffffff
mov rdi, qword [rsi + 0x58]
mov ecx, r12d
mov rbx, qword [r15]
mov edx, dword [rbx]
test edx, edx
je 0x140020d24
mov eax, ecx
cmp qword [rbx + rax*8 + 8], rdi
je 0x140020d99
inc ecx
cmp ecx, edx
jb 0x140020d15
inc edx
mov ecx, dword [r15 + 8]
cmp edx, ecx
jbe 0x140020d8d
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r14d, edx
lea rcx, [rdx*8 + 8]
call fcn.1400a0f60
mov rbx, rax
mov rcx, qword [r15]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, r12d
mov r8, qword [r15]
cmp dword [r8], r12d
jbe 0x140020d7e
nop
mov eax, edx
lea rcx, [rax*8]
mov rax, qword [rcx + r8 + 8]
mov qword [rcx + rbx + 8], rax
inc edx
mov r8, qword [r15]
cmp edx, dword [r8]
jb 0x140020d60
mov rcx, r8
call fcn.14007dc1c
mov qword [r15], rbx
mov dword [r15 + 8], r14d
mov eax, dword [rbx]
mov qword [rbx + rax*8 + 8], rdi
mov rax, qword [r15]
inc dword [rax]
mov rdi, r12
mov rbx, qword [rsi + 0x190]
test rbx, rbx
je 0x140020dc6
nop dword [rax + rax]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140020dc6
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140020db0
lea rbx, [rsi + 0x158]
add rsi, 0x68
mov r14, r15
mov r13d, 3
nop word [rax + rax]
mov rdx, rsi
mov rcx, r14
call fcn.14001f870
cmp qword [rbx], rdi
cmova rdi, qword [rbx]
add r14, 0x18
add rsi, 0x38
lea rbx, [rbx + 0x18]
sub r13, 1
jne 0x140020de0
mov r14, qword [rbp - 0x80]
lea rcx, [r14 + 0x160]
lea rdx, [r14 + 0x110]
call fcn.14001f870
mov rax, qword [r14 + 0x170]
cmp rax, rdi
cmova rdi, rax
lea rsi, [r14 + 0x178]
lea rdx, [r14 + 0x110]
mov rcx, rsi
call fcn.14001f870
mov rax, qword [r14 + 0x188]
cmp rax, rdi
cmova rdi, rax
lea ecx, [r13 + 1]
mov rbx, qword [r14 + 0x190]
test rbx, rbx
je 0x140020e76
nop dword [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 0x140020e60
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x70], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0x74], ecx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r13b, r13b
mov byte [rsp + 0x48], r13b
mov qword [rbp - 0x60], r12
lea rax, [0x140112e30]
mov qword [rbp - 0x58], rax
mov r9, qword [rsi]
mov r8, qword [r14 + 0x160]
mov rdx, qword [r15]
test rdx, rdx
jne 0x140020f08
test r8, r8
jne 0x140020f08
test r9, r9
jne 0x140020f08
mov eax, 0x10624dd3
imul dword [rsp + 0x74]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0x70], 0x3e8
add ecx, eax
mov eax, 1
cmove ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edi, r12d
jmp 0x14002115d
cmp dword [rsp + 0x70], r12d
jne 0x140020f29
mov ecx, dword [rsp + 0x74]
lea eax, [rcx - 1]
mov r10d, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, r10d
mov dword [rsp + 0x74], ecx
lea ecx, [rdi + 1]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
sets dl
lea rcx, [rbp - 0x60]
call fcn.14001fa70
test edi, edi
jle 0x14002115d
mov rdx, qword [r15]
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14002115d
lea rax, [rbp - 0x40]
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x50], 0x400
mov r15d, 4
mov rax, qword gs:[0x58]
add r15, qword [rax]
nop word [rax + rax]
mov dword [rsp + 0x78], r12d
mov dword [rbp - 0x80], r12d
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
mov r8d, 1
lea rdx, [rbp - 0x50]
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
mov ecx, dword [r15]
cmp dword [0x140119e8c], ecx
jle 0x140020fff
lea rcx, [0x140119e8c]
call fcn.1400a0e50
cmp dword [0x140119e8c], 0xffffffff
jne 0x140020fff
lea rcx, [0x1400db070]
call fcn.1400a12a4
lea rcx, [0x140119e8c]
call fcn.1400a0df0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x60], eax
lea rcx, [0x140112e20]
mov qword [rsp + 0x68], rcx
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rbp - 0x70], xmm0
cmp eax, 0x40
jne 0x140021034
mov edx, 0x2746
lea rcx, [rbp - 0x70]
call fcn.140032a70
jmp 0x140021059
cmp eax, 0x4d2
jne 0x14002104b
mov edx, 0x274d
lea rcx, [rbp - 0x70]
call fcn.140032a70
jmp 0x140021059
cmp eax, 0x2738
je 0x140021061
cmp eax, 0xea
je 0x140021061
test ebx, ebx
jne 0x140021232
mov dword [rbp - 0x70], r12d
mov eax, dword [rsp + 0x78]
cmp eax, 0x400
je 0x140020f90
test eax, eax
jg 0x140021156
je 0x140021124
mov ecx, dword [0x140119e8c]
cmp ecx, dword [r15]
jle 0x1400210c2
lea rcx, [0x140119e8c]
call fcn.1400a0e50
mov ecx, dword [0x140119e8c]
cmp ecx, 0xffffffff
jne 0x1400210c2
lea rcx, [0x1400db070]
call fcn.1400a12a4
lea rcx, [0x140119e8c]
call fcn.1400a0df0
mov ecx, dword [0x140119e8c]
mov rbx, qword [rbp - 0x68]
mov rax, qword [0x140112e28]
cmp qword [rbx + 8], rax
jne 0x1400210dc
cmp r12d, 0x2733
je 0x140021156
cmp ecx, dword [r15]
jle 0x14002110e
lea rcx, [0x140119e8c]
call fcn.1400a0e50
cmp dword [0x140119e8c], 0xffffffff
jne 0x14002110e
lea rcx, [0x1400db070]
call fcn.1400a12a4
lea rcx, [0x140119e8c]
call fcn.1400a0df0
mov rax, qword [0x140112e28]
cmp qword [rbx + 8], rax
jne 0x140021124
cmp r12d, 0x4d5
je 0x140021156
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x48], 1
mov byte [r14 + 0x198], 1
mov rcx, qword [r14 + 0x28]
lock inc dword [rcx + 0x30]
lea rdx, [r14 + 0x1a8]
call fcn.14001eed0
movzx r13d, byte [rsp + 0x48]
dec edi
test r13b, r13b
jne 0x140021170
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r13b, 1
mov byte [rsp + 0x48], r13b
mov r15, qword [rsp + 0x50]
test edi, edi
jle 0x1400211cb
mov r8, r15
lea rdx, [r14 + 0x110]
mov rcx, rsi
call fcn.14001f950
mov r8, r15
lea rdx, [r14 + 0x110]
lea rcx, [r14 + 0x160]
call fcn.14001f950
mov ebx, 2
lea rdi, [r14 + 0xd8]
nop dword [rax]
mov r8, r15
mov rdx, rdi
mov rcx, rsi
call fcn.14001f950
sub rsi, 0x18
sub rdi, 0x38
sub ebx, 1
jns 0x1400211b0
mov rbx, qword [r14 + 0x190]
test rbx, rbx
je 0x1400211f5
nop word [rax + rax]
mov rax, qword [rbx]
mov rdx, r15
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1400211e0
mov rbx, qword [rsp + 0x40]
test r13b, r13b
je 0x140021208
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.1400a0cd0
mov rbx, qword [rsp + 0x518]
add rsp, 0x4d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r12d, dword [rbp - 0x70]
jmp 0x140021082