Function at 0x140049340
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 [0x1400992c0]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rsi, r8
mov qword [rsp + 0x58], r8
mov dword [rsp + 0x44], edx
mov r15, rcx
lea rbx, [rcx + 0x30]
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x78], al
cmp byte [r15 + 0x198], 0
jne 0x140049bdc
lea r14, [r15 + 0x148]
mov rax, qword [r14]
xor r13d, r13d
mov dword [rax], r13d
mov qword [r14 + 0x10], 0xffffffffffffffff
mov rax, qword [r15 + 0x160]
mov dword [rax], r13d
mov qword [r15 + 0x170], 0xffffffffffffffff
mov rax, qword [rbx + 0x148]
mov dword [rax], r13d
mov qword [rbx + 0x158], 0xffffffffffffffff
mov rbx, qword [r15 + 0x58]
mov ecx, r13d
mov r8, qword [r14]
mov edx, dword [r8]
test edx, edx
je 0x14004940f
nop dword [rax]
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x140049428
inc ecx
cmp ecx, edx
jb 0x140049400
inc edx
mov rcx, r14
call fcn.140048a40
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 0x14004944e
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x140049545
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140049434
xor al, al
test al, al
jne 0x14004945f
cmp qword [r15 + 0x78], r13
mov byte [rsp + 0x40], r13b
je 0x140049464
mov byte [rsp + 0x40], 1
mov rax, qword [r15 + 0x70]
mov rbx, qword [rax]
cmp rbx, rax
je 0x14004951c
nop dword [rax]
nop dword [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov r12, qword [r14]
mov eax, dword [r12]
lea edx, [rax + 1]
mov ecx, dword [r14 + 8]
cmp edx, ecx
jbe 0x1400494ff
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.1400665f0
mov r12, rax
mov rcx, qword [r14]
mov edx, dword [rcx]
mov dword [rax], edx
xor edx, edx
mov r8, qword [r14]
cmp dword [r8], edx
jbe 0x1400494ec
nop word [rax + rax]
lea rcx, [rdx*8]
mov rax, qword [rcx + r8 + 8]
mov qword [r12 + rcx + 8], rax
inc edx
mov r8, qword [r14]
cmp edx, dword [r8]
jb 0x1400494d0
mov rcx, r8
call fcn.140066a18
mov qword [r14], r12
mov dword [r14 + 8], r13d
mov eax, dword [r12]
mov ecx, eax
mov rax, qword [rdi + 0x10]
mov qword [r12 + rcx*8 + 8], rax
mov rax, qword [r14]
inc dword [rax]
cmp rbx, qword [r15 + 0x70]
jne 0x140049480
xor r13d, r13d
mov rdi, qword [r15 + 0x158]
test rdi, rdi
cmove rdi, r13
mov qword [rsp + 0x50], rdi
cmp byte [rsp + 0x40], 0
jne 0x14004954c
cmp qword [r15 + 0xb0], 0
jne 0x14004954c
xor r13b, r13b
jmp 0x14004954f
mov al, 1
jmp 0x140049450
mov r13b, 1
mov rax, qword [r15 + 0xa8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x14004963a
xor esi, esi
nop dword [rax]
nop dword [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov rax, qword [r15 + 0x160]
mov edx, dword [rax]
inc edx
mov ecx, dword [r15 + 0x168]
cmp edx, ecx
jbe 0x140049608
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.1400665f0
mov r14, rax
mov rcx, qword [r15 + 0x160]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, esi
mov r8, qword [r15 + 0x160]
cmp dword [r8], esi
jbe 0x1400495f2
nop dword [rax]
nop word [rax + rax]
mov eax, edx
lea rcx, [rax*8]
mov rax, qword [rcx + r8 + 8]
mov qword [rcx + r14 + 8], rax
inc edx
mov r8, qword [r15 + 0x160]
cmp edx, dword [r8]
jb 0x1400495d0
mov rcx, r8
call fcn.140066a18
mov qword [r15 + 0x160], r14
mov dword [r15 + 0x168], r12d
mov rdx, qword [r15 + 0x160]
mov ecx, dword [rdx]
mov rax, qword [rdi + 0x10]
mov qword [rdx + rcx*8 + 8], rax
mov rax, qword [r15 + 0x160]
inc dword [rax]
cmp rbx, qword [r15 + 0xa8]
jne 0x140049570
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x50]
mov rax, qword [r15 + 0x170]
cmp rax, rdi
cmova rdi, rax
mov qword [rsp + 0x50], rdi
test r13b, r13b
jne 0x14004965c
cmp qword [r15 + 0xe8], 0
je 0x14004965f
mov r13b, 1
mov rax, qword [r15 + 0xe0]
mov rbx, qword [rax]
cmp rbx, rax
je 0x14004974a
xor esi, esi
nop dword [rax]
nop dword [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov rax, qword [r15 + 0x178]
mov edx, dword [rax]
inc edx
mov ecx, dword [r15 + 0x180]
cmp edx, ecx
jbe 0x140049718
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.1400665f0
mov r14, rax
mov rcx, qword [r15 + 0x178]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, esi
mov r8, qword [r15 + 0x178]
cmp dword [r8], esi
jbe 0x140049702
nop dword [rax]
nop word [rax + rax]
mov eax, edx
lea rcx, [rax*8]
mov rax, qword [rcx + r8 + 8]
mov qword [rcx + r14 + 8], rax
inc edx
mov r8, qword [r15 + 0x178]
cmp edx, dword [r8]
jb 0x1400496e0
mov rcx, r8
call fcn.140066a18
mov qword [r15 + 0x178], r14
mov dword [r15 + 0x180], r12d
mov rdx, qword [r15 + 0x178]
mov ecx, dword [rdx]
mov rax, qword [rdi + 0x10]
mov qword [rdx + rcx*8 + 8], rax
mov rax, qword [r15 + 0x178]
inc dword [rax]
cmp rbx, qword [r15 + 0xe0]
jne 0x140049680
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x50]
mov rax, qword [r15 + 0x188]
cmp rax, rdi
cmova rdi, rax
test r13b, r13b
jne 0x14004976b
cmp qword [r15 + 0x120], 0
jne 0x14004976b
xor bl, bl
jmp 0x14004976d
mov bl, 1
lea rcx, [r15 + 0x160]
mov r8, rsi
lea rdx, [r15 + 0x110]
call fcn.14004a020
mov rax, qword [r15 + 0x170]
cmp rax, rdi
cmova rdi, rax
lea rcx, [r15 + 0x178]
mov r8, rsi
lea rdx, [r15 + 0x110]
call fcn.14004a020
mov r12, qword [r15 + 0x188]
cmp r12, rdi
cmovbe r12, rdi
mov ecx, dword [rsp + 0x44]
test ecx, ecx
jne 0x1400497c5
test bl, bl
je 0x140049bd5
xor eax, eax
mov qword [rsp + 0x48], rax
test ecx, ecx
je 0x140049827
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x140049806
nop word [rax + rax]
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 0x1400497f0
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x48], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0x4c], ecx
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [rsp + 0x78], 0
call fcn.140066430
mov rbx, qword [r15 + 0x178]
mov rdi, qword [r15 + 0x160]
mov r14, qword [r15 + 0x148]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test r14, r14
jne 0x1400498b0
test rdi, rdi
jne 0x1400498b0
test rbx, rbx
jne 0x1400498b0
mov eax, 0x10624dd3
imul dword [rsp + 0x4c]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0x48], 0x3e8
add ecx, eax
mov r14d, 1
cmove ecx, r14d
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140066430
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movzx eax, r14b
mov byte [rsp + 0x78], al
jmp 0x140049bac
cmp dword [rsp + 0x48], 0
jne 0x1400498cf
mov ecx, dword [rsp + 0x4c]
lea eax, [rcx - 1]
mov edx, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, edx
mov dword [rsp + 0x4c], ecx
lea ecx, [r12 + 1]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9, rbx
mov r8, rdi
mov rdx, r14
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
call fcn.140066430
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
js 0x140049905
call fcn.140066430
test edi, edi
jle 0x140049a35
mov rdx, qword [r15 + 0x148]
mov rcx, qword [r15 + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140049a35
lea rax, [rbp - 0x80]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x58], 0x400
call fcn.140066430
mov rbx, qword [r15 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor r12d, r12d
mov dword [rsp + 0x44], r12d
mov dword [rsp + 0x50], r12d
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
mov r14d, 1
mov r8d, r14d
lea rdx, [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.140066430
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x14004999b
cmp eax, 0x4d2
jne 0x1400499a0
call fcn.140066430
test ebx, ebx
jne 0x140049a31
call fcn.140066430
cmp dword [rsp + 0x44], 0x400
jne 0x140049a31
nop word [rax + rax]
mov rbx, qword [r15 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x44], r12d
mov dword [rsp + 0x50], r12d
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
mov r8d, r14d
lea rdx, [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.140066430
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x140049a19
cmp eax, 0x4d2
jne 0x140049a1e
call fcn.140066430
test ebx, ebx
jne 0x140049a31
call fcn.140066430
cmp dword [rsp + 0x44], 0x400
je 0x1400499c0
dec edi
jmp 0x140049a38
xor r12d, r12d
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x78], al
test edi, edi
jle 0x140049bac
mov r8, rsi
lea rdx, [r15 + 0x110]
lea rcx, [r15 + 0x178]
call fcn.1400449c0
mov r8, rsi
lea rdx, [r15 + 0x110]
lea rcx, [r15 + 0x160]
call fcn.1400449c0
mov eax, 2
mov qword [rsp + 0x58], rax
lea r13, [r15 + 0x178]
lea r14, [r15 + 0xe0]
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [r13]
cmp dword [rcx], 0
jbe 0x140049b8b
nop dword [rax]
mov eax, r12d
mov r8, qword [rcx + rax*8 + 8]
mov rcx, qword [r14 + 0x28]
test rcx, rcx
je 0x140049b76
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 0x140049b76
mov rax, qword [rax + rdx*8 + 8]
mov rcx, qword [rax]
cmp rbx, rcx
je 0x140049b76
cmp qword [rbx + 0x10], r8
je 0x140049b05
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140049af2
jmp 0x140049b76
cmp rbx, qword [r14]
je 0x140049b76
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x140049b6a
mov rcx, rdi
call qword [rdi + 0x50]
test eax, eax
je 0x140049b76
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140049b45
mov rax, qword [rcx + 0x20]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x140049b3d
mov qword [rbx + 0x20], rax
mov qword [rcx + 0x20], rax
jmp 0x140049b47
xor eax, eax
mov qword [rcx + 0x20], rax
jmp 0x140049b47
xor eax, eax
mov qword [rdi + 0x20], rax
mov rax, qword [rsi + 8]
test rax, rax
je 0x140049b5a
mov qword [rax + 0x20], rdi
jmp 0x140049b5d
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rdi, qword [rbx + 0x18]
test rdi, rdi
jne 0x140049b13
lea rcx, [r14 - 8]
mov rdx, rbx
call fcn.1400437e0
inc r12d
mov rcx, qword [r13]
cmp r12d, dword [rcx]
jb 0x140049ab0
mov rax, qword [rsp + 0x58]
dec rax
mov qword [rsp + 0x58], rax
sub r14, 0x38
sub r13, 0x18
test rax, rax
mov r12d, 0
jns 0x140049aa0
mov al, 1
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x140049bd7
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 0x140049bc0
mov al, 1
mov rbx, qword [rsp + 0x68]
test al, al
je 0x140049be9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1400664b0
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x490
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret