Function at 0x4bfe10
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 0x4bfeb0
call fcn.004bdb50
cmp edx, dword [esi + 4]
jb 0x4bfe53
ja 0x4bfe33
cmp eax, dword [esi]
jbe 0x4bfe53
movzx eax, word [esi + 0xc]
push 5
push eax
call fcn.004bebb0
add esp, 8
mov ecx, esi
push 0
call fcn.004bec30
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 0x4c0152
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 0x4bff9f
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 0x4bffdd
test ecx, ecx
jne 0x4bffbc
push 1
mov ecx, esi
call fcn.004bec30
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4bffdd
push 2
mov ecx, esi
call fcn.004bec30
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret
cmp byte [esi + 0x42], 0
jne 0x4c014f
cmp byte [esi + 0x40], 0
je 0x4c00a4
cmp dword [esi + 0x38], 0
je 0x4c014f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov eax, dword [eax + 8]
test eax, eax
je 0x4c014f
nop dword [eax + eax]
mov edx, dword [eax]
movzx ecx, byte [edx - 2]
test ecx, ecx
je 0x4c0025
push eax
push ecx
mov ecx, esi
call fcn.004bf110
jmp 0x4c0032
movzx eax, word [eax + 4]
mov ecx, esi
push eax
push edx
call fcn.004bf6c0
test al, al
je 0x4c014f
mov edi, dword [esi + 0x38]
test edi, edi
je 0x4c0069
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.004c2e97
add esp, 8
jmp 0x4c006b
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 0x4c014f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov eax, dword [eax + 8]
test eax, eax
jne 0x4c0010
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret
cmp dword [esi + 0x38], 0
je 0x4c014f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov edx, dword [eax + 8]
test edx, edx
je 0x4c014f
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 0x4c00dd
push edx
push edi
call fcn.004bf110
jmp 0x4c00f0
movzx eax, word [edx + 4]
add eax, 2
push eax
mov eax, dword [edx]
sub eax, 2
push eax
call fcn.004bf6c0
test al, al
je 0x4c014f
mov edi, dword [esi + 0x38]
test edi, edi
je 0x4c0123
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.004c2e97
add esp, 8
jmp 0x4c0125
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 0x4c014f
mov eax, dword [esi + 0x34]
mov eax, dword [eax]
mov edx, dword [eax + 8]
test edx, edx
jne 0x4c00c0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x214
ret