Function at 0x1401639c0
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 - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x1403b9868]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov rsi, r8
mov byte [rsp + 0x41], dl
mov r13, rcx
lea rbx, [rcx + 0x30]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x70], al
cmp byte [r13 + 0x198], 0
jne 0x14016421c
lea r15, [r13 + 0x148]
mov rax, qword [r15]
xor edi, edi
mov dword [rax], edi
mov qword [r15 + 0x10], 0xffffffffffffffff
mov rax, qword [r13 + 0x160]
mov dword [rax], edi
mov qword [r13 + 0x170], 0xffffffffffffffff
mov rax, qword [r13 + 0x178]
mov dword [rax], edi
mov qword [r13 + 0x188], 0xffffffffffffffff
mov rbx, qword [r13 + 0x58]
mov ecx, edi
mov r8, qword [r15]
mov edx, dword [r8]
test edx, edx
je 0x140163a82
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x140163a9b
inc ecx
cmp ecx, edx
jb 0x140163a73
inc edx
mov rcx, r15
call fcn.14015eef0
mov rcx, qword [r15]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rbx
mov rax, qword [r15]
inc dword [rax]
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x140163ac1
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140163dc7
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140163aa7
xor al, al
test al, al
jne 0x140163ad2
cmp qword [r13 + 0x78], rdi
mov byte [rsp + 0x40], dil
je 0x140163ad7
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0x70]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140163b8a
nop word [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov r14, qword [r15]
mov eax, dword [r14]
lea edx, [rax + 1]
mov ecx, dword [r15 + 8]
cmp edx, ecx
jbe 0x140163b6e
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r12d, edx
lea rcx, [rdx*8 + 8]
call fcn.1402802bc
mov r14, rax
mov rcx, qword [r15]
mov edx, dword [rcx]
mov dword [rax], edx
xor edx, edx
mov r8, qword [r15]
cmp dword [r8], edx
jbe 0x140163b5c
nop word [rax + rax]
lea rcx, [rdx*8]
mov rax, qword [rcx + r8 + 8]
mov qword [rcx + r14 + 8], rax
inc edx
mov r8, qword [r15]
cmp edx, dword [r8]
jb 0x140163b40
mov rcx, r8
call fcn.1402802f8
mov qword [r15], r14
mov dword [r15 + 8], r12d
mov eax, dword [r14]
mov ecx, eax
mov rax, qword [rdi + 0x10]
mov qword [r14 + rcx*8 + 8], rax
mov rax, qword [r15]
inc dword [rax]
cmp rbx, qword [r13 + 0x70]
jne 0x140163af0
xor edi, edi
mov r12, qword [r13 + 0x158]
test r12, r12
cmove r12, rdi
mov qword [rsp + 0x48], r12
cmp byte [rsp + 0x40], 0
jne 0x140163bb3
cmp qword [r13 + 0xb0], 0
mov byte [rsp + 0x40], 0
je 0x140163bb8
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0xa8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140163c94
xor r15d, r15d
nop
lea rdi, [rbx]
mov rbx, qword [rbx]
mov rax, qword [r13 + 0x160]
mov edx, dword [rax]
inc edx
mov ecx, dword [r13 + 0x168]
cmp edx, ecx
jbe 0x140163c60
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r12d, edx
lea rcx, [rdx*8 + 8]
call fcn.1402802bc
mov r14, rax
mov rcx, qword [r13 + 0x160]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, r15d
mov r8, qword [r13 + 0x160]
cmp dword [r8], r15d
jbe 0x140163c4a
nop dword [rax]
nop dword [rax + rax]
mov ecx, edx
mov rax, qword [r8 + rcx*8 + 8]
mov qword [r14 + rcx*8 + 8], rax
inc edx
mov r8, qword [r13 + 0x160]
cmp edx, dword [r8]
jb 0x140163c30
mov rcx, r8
call fcn.1402802f8
mov qword [r13 + 0x160], r14
mov dword [r13 + 0x168], r12d
mov rdx, qword [r13 + 0x160]
mov ecx, dword [rdx]
mov rax, qword [rdi + 0x10]
mov qword [rdx + rcx*8 + 8], rax
mov rax, qword [r13 + 0x160]
inc dword [rax]
cmp rbx, qword [r13 + 0xa8]
jne 0x140163bd0
lea r15, [r13 + 0x148]
mov r12, qword [rsp + 0x48]
mov rax, qword [r13 + 0x170]
cmp rax, r12
cmova r12, rax
mov qword [rsp + 0x48], r12
cmp byte [rsp + 0x40], 0
jne 0x140163cbd
cmp qword [r13 + 0xe8], 0
mov byte [rsp + 0x40], 0
je 0x140163cc2
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0xe0]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140163da4
xor r15d, r15d
nop dword [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov rax, qword [r13 + 0x178]
mov edx, dword [rax]
inc edx
mov ecx, dword [r13 + 0x180]
cmp edx, ecx
jbe 0x140163d70
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r12d, edx
lea rcx, [rdx*8 + 8]
call fcn.1402802bc
mov r14, rax
mov rcx, qword [r13 + 0x178]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, r15d
mov r8, qword [r13 + 0x178]
cmp dword [r8], r15d
jbe 0x140163d5a
nop dword [rax]
nop dword [rax + rax]
mov ecx, edx
mov rax, qword [r8 + rcx*8 + 8]
mov qword [r14 + rcx*8 + 8], rax
inc edx
mov r8, qword [r13 + 0x178]
cmp edx, dword [r8]
jb 0x140163d40
mov rcx, r8
call fcn.1402802f8
mov qword [r13 + 0x178], r14
mov dword [r13 + 0x180], r12d
mov rdx, qword [r13 + 0x178]
mov ecx, dword [rdx]
mov rax, qword [rdi + 0x10]
mov qword [rdx + rcx*8 + 8], rax
mov rax, qword [r13 + 0x178]
inc dword [rax]
cmp rbx, qword [r13 + 0xe0]
jne 0x140163ce0
lea r15, [r13 + 0x148]
mov r12, qword [rsp + 0x48]
mov rax, qword [r13 + 0x188]
cmp rax, r12
cmova r12, rax
cmp byte [rsp + 0x40], 0
jne 0x140163dce
cmp qword [r13 + 0x120], 0
jne 0x140163dce
xor bl, bl
jmp 0x140163dd0
mov al, 1
jmp 0x140163ac3
mov bl, 1
mov r8, rsi
lea rdx, [r13 + 0x110]
lea rcx, [r13 + 0x160]
call fcn.1401644d0
mov rax, qword [r13 + 0x170]
cmp rax, r12
cmova r12, rax
mov qword [rsp + 0x48], r12
lea rcx, [r13 + 0x178]
mov r8, rsi
lea rdx, [r13 + 0x110]
call fcn.1401644d0
mov r12, qword [r13 + 0x188]
cmp r12, qword [rsp + 0x48]
cmovbe r12, qword [rsp + 0x48]
movzx eax, byte [rsp + 0x41]
test al, al
jne 0x140163e32
test bl, bl
je 0x140164215
xor ecx, ecx
mov qword [rsp + 0x58], rcx
test al, al
je 0x140163e87
mov ecx, 0x11e1a300
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x140163e66
nop
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 0x140163e50
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x58], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0x5c], ecx
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [rsp + 0x70], 0
call fcn.14018e9e0
mov rbx, qword [r13 + 0x178]
mov rdi, qword [r13 + 0x160]
mov r14, qword [r15]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test r14, r14
jne 0x140163f0a
test rdi, rdi
jne 0x140163f0a
test rbx, rbx
jne 0x140163f0a
mov eax, 0x10624dd3
imul dword [rsp + 0x5c]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0x58], 0x3e8
add ecx, eax
mov edi, 1
cmove ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14018e9e0
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movzx eax, dil
mov byte [rsp + 0x70], al
jmp 0x1401641ec
cmp dword [rsp + 0x58], 0
jne 0x140163f29
mov ecx, dword [rsp + 0x5c]
lea eax, [rcx - 1]
mov edx, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, edx
mov dword [rsp + 0x5c], ecx
lea ecx, [r12 + 1]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9, rbx
mov r8, rdi
mov rdx, r14
call qword [sym.imp.WS2_32.dll_select]
mov r14d, eax
call fcn.14018e9e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test r14d, r14d
js 0x140163f62
call fcn.14018e9e0
test r14d, r14d
jle 0x140164086
mov rdx, qword [r15]
mov rcx, qword [r13 + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140164086
lea rax, [rbp - 0x70]
mov qword [rbp - 0x80], rax
mov dword [rsp + 0x78], 0x400
call fcn.14018e9e0
mov rbx, qword [r13 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor r15d, r15d
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x48], r15d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov edi, 1
mov r8d, edi
lea rdx, [rsp + 0x78]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.14018e9e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x140163ff2
cmp eax, 0x4d2
jne 0x140163ff7
call fcn.14018e9e0
test ebx, ebx
jne 0x140164081
call fcn.14018e9e0
cmp dword [rsp + 0x50], 0x400
jne 0x140164081
nop
mov rbx, qword [r13 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x48], r15d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov r8d, edi
lea rdx, [rsp + 0x78]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.14018e9e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x140164069
cmp eax, 0x4d2
jne 0x14016406e
call fcn.14018e9e0
test ebx, ebx
jne 0x140164081
call fcn.14018e9e0
cmp dword [rsp + 0x50], 0x400
je 0x140164010
dec r14d
jmp 0x140164089
xor r15d, r15d
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x70], al
test r14d, r14d
jle 0x1401641ec
mov r8, rsi
lea rdx, [r13 + 0x110]
lea r12, [r13 + 0x178]
mov rcx, r12
call fcn.14015d7f0
mov r8, rsi
lea rdx, [r13 + 0x110]
lea rcx, [r13 + 0x160]
call fcn.14015d7f0
mov eax, 2
mov qword [rsp + 0x48], rax
lea r14, [r13 + 0xe0]
mov rcx, qword [r12]
cmp dword [rcx], 0
jbe 0x1401641cb
nop
mov eax, r15d
mov r8, qword [rcx + rax*8 + 8]
mov rcx, qword [r14 + 0x28]
test rcx, rcx
je 0x1401641b6
xor edx, edx
mov rax, r8
div rcx
add rdx, rdx
mov rax, qword [r14 + 0x20]
mov rbx, qword [rax + rdx*8]
cmp rbx, qword [r14]
je 0x1401641b6
mov rax, qword [rax + rdx*8 + 8]
mov rcx, qword [rax]
cmp rbx, rcx
je 0x1401641b6
cmp qword [rbx + 0x10], r8
je 0x140164145
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140164132
jmp 0x1401641b6
cmp rbx, qword [r14]
je 0x1401641b6
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1401641aa
mov rcx, rdi
call qword [rdi + 0x50]
test al, al
je 0x1401641b6
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140164185
mov rax, qword [rcx + 0x20]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x14016417d
mov qword [rbx + 0x20], rax
mov qword [rcx + 0x20], rax
jmp 0x140164187
xor eax, eax
mov qword [rcx + 0x20], rax
jmp 0x140164187
xor eax, eax
mov qword [rdi + 0x20], rax
mov rax, qword [rsi + 8]
test rax, rax
je 0x14016419a
mov qword [rax + 0x20], rdi
jmp 0x14016419d
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rdi, qword [rbx + 0x18]
test rdi, rdi
jne 0x140164153
lea rcx, [r14 - 8]
mov rdx, rbx
call fcn.1401583d0
inc r15d
mov rcx, qword [r12]
cmp r15d, dword [rcx]
jb 0x1401640f0
mov rax, qword [rsp + 0x48]
dec rax
mov qword [rsp + 0x48], rax
sub r14, 0x38
sub r12, 0x18
test rax, rax
mov r15d, 0
jns 0x1401640e2
mov al, 1
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x140164217
nop dword [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 0x140164200
mov al, 1
mov rbx, qword [rsp + 0x60]
test al, al
je 0x140164229
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.1402806f0
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x4a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret