Function at 0x140049530
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 r13, 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 [r13 + 0x198], 0
jne 0x140049dac
lea r14, [r13 + 0x148]
mov rax, qword [r14]
xor r12d, r12d
mov dword [rax], r12d
mov qword [r14 + 0x10], 0xffffffffffffffff
mov rax, qword [r13 + 0x160]
mov dword [rax], r12d
mov qword [r13 + 0x170], 0xffffffffffffffff
mov rax, qword [rbx + 0x148]
mov dword [rax], r12d
mov qword [rbx + 0x158], 0xffffffffffffffff
mov rbx, qword [r13 + 0x58]
mov ecx, r12d
mov r8, qword [r14]
mov edx, dword [r8]
test edx, edx
je 0x1400495ff
nop dword [rax]
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x140049618
inc ecx
cmp ecx, edx
jb 0x1400495f0
inc edx
mov rcx, r14
call fcn.140048c30
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 [r13 + 0x190]
test rbx, rbx
je 0x14004963e
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x140049734
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140049624
xor al, al
test al, al
jne 0x14004964f
cmp qword [r13 + 0x78], r12
mov byte [rsp + 0x40], r12b
je 0x140049654
mov byte [rsp + 0x40], 1
mov rax, qword [r13 + 0x70]
mov rbx, qword [rax]
cmp rbx, rax
je 0x14004970b
nop dword [rax]
nop dword [rax + rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov r15, qword [r14]
mov eax, dword [r15]
lea edx, [rax + 1]
mov ecx, dword [r14 + 8]
cmp edx, ecx
jbe 0x1400496ee
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.140066550
mov r15, 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 0x1400496dc
nop word [rax + rax]
lea rcx, [rdx*8]
mov rax, qword [rcx + r8 + 8]
mov qword [rcx + r15 + 8], rax
inc edx
mov r8, qword [r14]
cmp edx, dword [r8]
jb 0x1400496c0
mov rcx, r8
call fcn.140066978
mov qword [r14], r15
mov dword [r14 + 8], r12d
mov eax, dword [r15]
mov ecx, eax
mov rax, qword [rdi + 0x10]
mov qword [r15 + rcx*8 + 8], rax
mov rax, qword [r14]
inc dword [rax]
cmp rbx, qword [r13 + 0x70]
jne 0x140049670
xor r12d, r12d
mov rdi, qword [r13 + 0x158]
test rdi, rdi
cmove rdi, r12
mov qword [rsp + 0x50], rdi
cmp byte [rsp + 0x40], 0
jne 0x14004973b
cmp qword [r13 + 0xb0], 0
jne 0x14004973b
xor r12b, r12b
jmp 0x14004973e
mov al, 1
jmp 0x140049640
mov r12b, 1
mov rax, qword [r13 + 0xa8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140049822
xor esi, esi
nop dword [rax]
nop word [rax + rax]
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 0x1400497f0
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r15d, edx
lea rcx, [rdx*8 + 8]
call fcn.140066550
mov r14, rax
mov rcx, qword [r13 + 0x160]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, esi
mov r8, qword [r13 + 0x160]
cmp dword [r8], esi
jbe 0x1400497da
nop dword [rax]
nop word [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 0x1400497c0
mov rcx, r8
call fcn.140066978
mov qword [r13 + 0x160], r14
mov dword [r13 + 0x168], r15d
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 0x140049760
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x50]
mov rax, qword [r13 + 0x170]
cmp rax, rdi
cmova rdi, rax
mov qword [rsp + 0x50], rdi
test r12b, r12b
jne 0x140049844
cmp qword [r13 + 0xe8], 0
je 0x140049847
mov r12b, 1
mov rax, qword [r13 + 0xe0]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140049922
xor esi, esi
nop dword [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 0x1400498f0
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r15d, edx
lea rcx, [rdx*8 + 8]
call fcn.140066550
mov r14, rax
mov rcx, qword [r13 + 0x178]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, esi
mov r8, qword [r13 + 0x178]
cmp dword [r8], esi
jbe 0x1400498da
nop dword [rax]
nop word [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 0x1400498c0
mov rcx, r8
call fcn.140066978
mov qword [r13 + 0x178], r14
mov dword [r13 + 0x180], r15d
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 0x140049860
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x50]
mov rax, qword [r13 + 0x188]
cmp rax, rdi
cmova rdi, rax
test r12b, r12b
jne 0x140049943
cmp qword [r13 + 0x120], 0
jne 0x140049943
xor bl, bl
jmp 0x140049945
mov bl, 1
lea rcx, [r13 + 0x160]
mov r8, rsi
lea rdx, [r13 + 0x110]
call fcn.14004a1f0
mov rax, qword [r13 + 0x170]
cmp rax, rdi
cmova rdi, rax
lea rcx, [r13 + 0x178]
mov r8, rsi
lea rdx, [r13 + 0x110]
call fcn.14004a1f0
mov r15, qword [r13 + 0x188]
cmp r15, rdi
cmovbe r15, rdi
mov ecx, dword [rsp + 0x44]
test ecx, ecx
jne 0x14004999d
test bl, bl
je 0x140049da5
xor eax, eax
mov qword [rsp + 0x48], rax
test ecx, ecx
je 0x1400499f7
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x1400499d6
nop
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 0x1400499c0
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, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [rsp + 0x78], 0
call fcn.140066390
mov rbx, qword [r13 + 0x178]
mov rdi, qword [r13 + 0x160]
mov r14, qword [r13 + 0x148]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test r14, r14
jne 0x140049a80
test rdi, rdi
jne 0x140049a80
test rbx, rbx
jne 0x140049a80
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.140066390
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movzx eax, r14b
mov byte [rsp + 0x78], al
jmp 0x140049d7c
cmp dword [rsp + 0x48], 0
jne 0x140049a9f
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, [r15 + 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.140066390
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
js 0x140049ad4
call fcn.140066390
test edi, edi
jle 0x140049c05
mov rdx, qword [r13 + 0x148]
mov rcx, qword [r13 + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140049c05
lea rax, [rbp - 0x80]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x58], 0x400
call fcn.140066390
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 + 0x50], r15d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
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.140066390
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x140049b6a
cmp eax, 0x4d2
jne 0x140049b6f
call fcn.140066390
test ebx, ebx
jne 0x140049c01
call fcn.140066390
cmp dword [rsp + 0x44], 0x400
jne 0x140049c01
nop word [rax + rax]
mov rbx, qword [r13 + 0x58]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x44], r15d
mov dword [rsp + 0x50], r15d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
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.140066390
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x140049be9
cmp eax, 0x4d2
jne 0x140049bee
call fcn.140066390
test ebx, ebx
jne 0x140049c01
call fcn.140066390
cmp dword [rsp + 0x44], 0x400
je 0x140049b90
dec edi
jmp 0x140049c08
xor r15d, r15d
lea rcx, [r13 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x78], al
test edi, edi
jle 0x140049d7c
mov r8, rsi
lea rdx, [r13 + 0x110]
lea rcx, [r13 + 0x178]
call fcn.140044c70
mov r8, rsi
lea rdx, [r13 + 0x110]
lea rcx, [r13 + 0x160]
call fcn.140044c70
mov eax, 2
mov qword [rsp + 0x58], rax
lea r12, [r13 + 0x178]
lea r14, [r13 + 0xe0]
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [r12]
cmp dword [rcx], 0
jbe 0x140049d5b
nop dword [rax]
mov eax, r15d
mov r8, qword [rcx + rax*8 + 8]
mov rcx, qword [r14 + 0x28]
test rcx, rcx
je 0x140049d46
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 0x140049d46
mov rax, qword [rax + rdx*8 + 8]
mov rcx, qword [rax]
cmp rbx, rcx
je 0x140049d46
cmp qword [rbx + 0x10], r8
je 0x140049cd5
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140049cc2
jmp 0x140049d46
cmp rbx, qword [r14]
je 0x140049d46
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x140049d3a
mov rcx, rdi
call qword [rdi + 0x50]
test eax, eax
je 0x140049d46
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140049d15
mov rax, qword [rcx + 0x20]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x140049d0d
mov qword [rbx + 0x20], rax
mov qword [rcx + 0x20], rax
jmp 0x140049d17
xor eax, eax
mov qword [rcx + 0x20], rax
jmp 0x140049d17
xor eax, eax
mov qword [rdi + 0x20], rax
mov rax, qword [rsi + 8]
test rax, rax
je 0x140049d2a
mov qword [rax + 0x20], rdi
jmp 0x140049d2d
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rdi, qword [rbx + 0x18]
test rdi, rdi
jne 0x140049ce3
lea rcx, [r14 - 8]
mov rdx, rbx
call fcn.140043a90
inc r15d
mov rcx, qword [r12]
cmp r15d, dword [rcx]
jb 0x140049c80
mov rax, qword [rsp + 0x58]
dec rax
mov qword [rsp + 0x58], rax
sub r14, 0x38
sub r12, 0x18
test rax, rax
mov r15d, 0
jns 0x140049c70
mov al, 1
mov rbx, qword [r13 + 0x190]
test rbx, rbx
je 0x140049da7
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 0x140049d90
mov al, 1
mov rbx, qword [rsp + 0x68]
test al, al
je 0x140049db9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140066410
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x490
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret