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

Disassembly:
sub esp, 0x214
push esi
mov esi, ecx
cmp byte [esi + 0x41], 0
je 0x4bfb70
call fcn.004bd810
cmp edx, dword [esi + 4]
jb 0x4bfb13
ja 0x4bfaf3
cmp eax, dword [esi]
jbe 0x4bfb13
movzx eax, word [esi + 0xc]
push 5
push eax
call fcn.004be870
add esp, 8
mov ecx, esi
push 0
call fcn.004be8f0
pop esi
add esp, 0x214
ret
mov eax, dword [esi + 8]
lea ecx, [esp + 8]
push ecx
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x120], eax
push ecx
lea ecx, [esp + 0x120]
mov dword [esp + 0x20], eax
push ecx
inc eax
mov dword [esp + 0x124], 1
push eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
setle cl
mov byte [esi + 0x41], cl
test eax, eax
jle 0x4bfe12
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 8]
push ebx
mov dword [esp + 0xc], eax
mov ecx, dword [edx + 0xc]
mov ebx, dword [edx]
push ebp
mov ebp, dword [edx + 8]
sub ecx, ebp
mov dword [esp + 0xc], edx
mov eax, ecx
sar eax, 0x1f
push edi
lea edx, [ebx + ecx]
and edx, eax
not eax
and eax, ecx
or edx, eax
lea eax, [ebx - 1]
dec edx
mov ecx, edx
sar ecx, 0x1f
and eax, ecx
mov edi, ecx
not edi
and edi, edx
xor edx, edx
or edi, eax
mov eax, SysReAllocString
sub eax, edi
sar eax, 0x1f
mov ecx, eax
not ecx
and ecx, edi
or ecx, eax
push 0
lea eax, [ecx + ebp]
div ebx
mov eax, dword [esp + 0x14]
mov dword [eax + 8], edx
xor edx, edx
mov ebp, dword [esi + 0x2c]
mov eax, dword [esi + 0x24]
add ebp, ecx
mov ecx, dword [esi + 0x28]
mov dword [esi + 0x2c], ebp
mov edi, dword [esi + 0x30]
mov ebx, dword [eax]
add edi, ecx
lea eax, [ecx + ebp]
div ebx
sub ebx, ecx
cmp edx, ecx
cmovae ebx, ebp
push ebx
push edi
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, eax
mov dword [esp + 0x10], ecx
test ecx, ecx
jle 0x4bfc5f
add dword [esi + 0x28], ecx
xor edx, edx
mov ebp, dword [esi + 0x24]
mov eax, dword [esi + 0x28]
div dword [ebp]
sub dword [esi + 0x2c], ecx
mov dword [esi + 0x28], edx
mov ecx, dword [ebp + 8]
sub ecx, dword [ebp + 4]
mov edi, dword [ebp]
mov eax, ecx
sar eax, 0x1f
lea edx, [edi + ecx]
and edx, eax
not eax
and eax, ecx
mov ecx, dword [esp + 0x10]
or edx, eax
and ecx, 0x7fffffff
sub ecx, edx
sar ecx, 0x1f
mov eax, ecx
and ecx, dword [esp + 0x10]
not eax
and eax, edx
xor edx, edx
or eax, ecx
mov ecx, dword [esp + 0x10]
add eax, dword [ebp + 4]
div edi
mov dword [ebp + 4], edx
cmp ecx, 1
jge 0x4bfc9d
test ecx, ecx
jne 0x4bfc7c
push 1
mov ecx, esi
call fcn.004be8f0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4bfc9d
push 2
mov ecx, esi
call fcn.004be8f0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret
cmp byte [esi + 0x42], 0
jne 0x4bfe0f
cmp byte [esi + 0x40], 0
je 0x4bfd64
cmp dword [esi + 0x38], 0
je 0x4bfe0f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov eax, dword [eax + 8]
test eax, eax
je 0x4bfe0f
nop dword [eax + eax]
mov edx, dword [eax]
movzx ecx, byte [edx - 2]
test ecx, ecx
je 0x4bfce5
push eax
push ecx
mov ecx, esi
call fcn.004bedd0
jmp 0x4bfcf2
movzx eax, word [eax + 4]
mov ecx, esi
push eax
push edx
call fcn.004bf380
test al, al
je 0x4bfe0f
mov edi, dword [esi + 0x38]
test edi, edi
je 0x4bfd29
mov eax, dword [esi + 0x34]
push 0xc
mov edx, dword [eax]
lea eax, [edi - 1]
push edx
mov ebx, dword [edx + 8]
mov ecx, dword [edx]
mov dword [esi + 0x38], eax
mov eax, dword [edx + 4]
mov dword [eax], ecx
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
call fcn.004c2b57
add esp, 8
jmp 0x4bfd2b
xor ebx, ebx
mov ecx, dword [0x571004]
push 0
push 0
push 0
mov eax, dword [ecx]
push 0
push ebx
call dword [eax + 4]
cmp dword [esi + 0x38], 0
je 0x4bfe0f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov eax, dword [eax + 8]
test eax, eax
jne 0x4bfcd0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret
cmp dword [esi + 0x38], 0
je 0x4bfe0f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov edx, dword [eax + 8]
test edx, edx
je 0x4bfe0f
nop
mov ecx, dword [edx]
mov ax, word [edx + 4]
movzx edi, byte [ecx - 2]
mov word [ecx - 2], ax
mov ecx, esi
test edi, edi
je 0x4bfd9d
push edx
push edi
call fcn.004bedd0
jmp 0x4bfdb0
movzx eax, word [edx + 4]
add eax, 2
push eax
mov eax, dword [edx]
sub eax, 2
push eax
call fcn.004bf380
test al, al
je 0x4bfe0f
mov edi, dword [esi + 0x38]
test edi, edi
je 0x4bfde3
mov eax, dword [esi + 0x34]
push 0xc
mov edx, dword [eax]
lea eax, [edi - 1]
push edx
mov ebx, dword [edx + 8]
mov ecx, dword [edx]
mov dword [esi + 0x38], eax
mov eax, dword [edx + 4]
mov dword [eax], ecx
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
call fcn.004c2b57
add esp, 8
jmp 0x4bfde5
xor ebx, ebx
mov ecx, dword [0x571004]
push 0
push 0
push 0
mov eax, dword [ecx]
push 0
push ebx
call dword [eax + 4]
cmp dword [esi + 0x38], 0
je 0x4bfe0f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov edx, dword [eax + 8]
test edx, edx
jne 0x4bfd80
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret