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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x14009a2c0]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rsi, r8
mov dword [rsp + 0x44], edx
mov r13, rcx
lea rbx, [rcx + 0x30]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x68], al
cmp byte [r13 + 0x198], 0
jne 0x14004a24c
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 0x140049ab2
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x140049acb
inc ecx
cmp ecx, edx
jb 0x140049aa3
inc edx
mov rcx, r15
call fcn.1400490f0
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 0x140049af1
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x140049df7
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140049ad7
xor al, al
test al, al
jne 0x140049b02
cmp qword [r13 + 0x78], rdi
mov byte [rsp + 0x40], dil
je 0x140049b07
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0x70]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140049bba
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 0x140049b9e
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.140066e10
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 0x140049b8c
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 0x140049b70
mov rcx, r8
call fcn.140067248
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 0x140049b20
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 0x140049be3
cmp qword [r13 + 0xb0], 0
mov byte [rsp + 0x40], 0
je 0x140049be8
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0xa8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140049cc4
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 0x140049c90
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.140066e10
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 0x140049c7a
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 0x140049c60
mov rcx, r8
call fcn.140067248
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 0x140049c00
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 0x140049ced
cmp qword [r13 + 0xe8], 0
mov byte [rsp + 0x40], 0
je 0x140049cf2
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0xe0]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140049dd4
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 0x140049da0
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.140066e10
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 0x140049d8a
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 0x140049d70
mov rcx, r8
call fcn.140067248
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 0x140049d10
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 0x140049dfe
cmp qword [r13 + 0x120], 0
jne 0x140049dfe
xor bl, bl
jmp 0x140049e00
mov al, 1
jmp 0x140049af3
mov bl, 1
mov r8, rsi
lea rdx, [r13 + 0x110]
lea rcx, [r13 + 0x160]
call fcn.14004a690
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.14004a690
mov r12, qword [r13 + 0x188]
cmp r12, qword [rsp + 0x48]
cmovbe r12, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x44]
test ecx, ecx
jne 0x140049e61
test bl, bl
je 0x14004a245
xor eax, eax
mov qword [rsp + 0x50], rax
test ecx, ecx
je 0x140049eb9
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x140049e98
mov rax, qword [rbx]
mov edx, ecx
mov rcx, rbx
call qword [rax + SafeArrayPutElement]
mov ecx, eax
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140049e82
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x50], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0x54], ecx
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [rsp + 0x68], 0
call fcn.140066c50
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 0x140049f3c
test rdi, rdi
jne 0x140049f3c
test rbx, rbx
jne 0x140049f3c
mov eax, 0x10624dd3
imul dword [rsp + 0x54]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0x50], 0x3e8
add ecx, eax
mov edi, 1
cmove ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140066c50
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movzx eax, dil
mov byte [rsp + 0x68], al
jmp 0x14004a21c
cmp dword [rsp + 0x50], 0
jne 0x140049f5b
mov ecx, dword [rsp + 0x54]
lea eax, [rcx - 1]
mov edx, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, edx
mov dword [rsp + 0x54], ecx
lea ecx, [r12 + 1]
lea rax, [rsp + 0x50]
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.140066c50
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test r14d, r14d
js 0x140049f94
call fcn.140066c50
test r14d, r14d
jle 0x14004a0b7
mov rdx, qword [r15]
mov rcx, qword [r13 + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14004a0b7
lea rax, [rbp - 0x80]
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x70], 0x400
call fcn.140066c50
mov rbx, qword [r13 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor r15d, r15d
mov dword [rsp + 0x44], 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 + 0x44]
mov edi, 1
mov r8d, edi
lea rdx, [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.140066c50
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x14004a025
cmp eax, 0x4d2
jne 0x14004a02a
call fcn.140066c50
test ebx, ebx
jne 0x14004a0b2
call fcn.140066c50
cmp dword [rsp + 0x44], 0x400
jne 0x14004a0b2
mov rbx, qword [r13 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x44], 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 + 0x44]
mov r8d, edi
lea rdx, [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.140066c50
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x14004a09a
cmp eax, 0x4d2
jne 0x14004a09f
call fcn.140066c50
test ebx, ebx
jne 0x14004a0b2
call fcn.140066c50
cmp dword [rsp + 0x44], 0x400
je 0x14004a041
dec r14d
jmp 0x14004a0ba
xor r15d, r15d
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x68], al
test r14d, r14d
jle 0x14004a21c
mov r8, rsi
lea rdx, [r13 + 0x110]
lea r12, [r13 + 0x178]
mov rcx, r12
call fcn.140044ea0
mov r8, rsi
lea rdx, [r13 + 0x110]
lea rcx, [r13 + 0x160]
call fcn.140044ea0
mov eax, 2
mov qword [rsp + 0x48], rax
lea r14, [r13 + 0xe0]
mov rcx, qword [r12]
cmp dword [rcx], 0
jbe 0x14004a1fb
mov eax, r15d
mov r8, qword [rcx + rax*8 + 8]
mov rcx, qword [r14 + 0x28]
test rcx, rcx
je 0x14004a1e6
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 0x14004a1e6
mov rax, qword [rax + rdx*8 + 8]
mov rcx, qword [rax]
cmp rbx, rcx
je 0x14004a1e6
cmp qword [rbx + 0x10], r8
je 0x14004a175
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x14004a162
jmp 0x14004a1e6
cmp rbx, qword [r14]
je 0x14004a1e6
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x14004a1da
mov rcx, rdi
call qword [rdi + 0x50]
test eax, eax
je 0x14004a1e6
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x14004a1b5
mov rax, qword [rcx + 0x20]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x14004a1ad
mov qword [rbx + 0x20], rax
mov qword [rcx + 0x20], rax
jmp 0x14004a1b7
xor eax, eax
mov qword [rcx + 0x20], rax
jmp 0x14004a1b7
xor eax, eax
mov qword [rdi + 0x20], rax
mov rax, qword [rsi + 8]
test rax, rax
je 0x14004a1ca
mov qword [rax + 0x20], rdi
jmp 0x14004a1cd
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rdi, qword [rbx + 0x18]
test rdi, rdi
jne 0x14004a183
lea rcx, [r14 - 8]
mov rdx, rbx
call fcn.140043cc0
inc r15d
mov rcx, qword [r12]
cmp r15d, dword [rcx]
jb 0x14004a120
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 0x14004a113
mov al, 1
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x14004a247
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 0x14004a230
mov al, 1
mov rbx, qword [rsp + 0x58]
test al, al
je 0x14004a259
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140066cd0
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x490
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret