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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x535b70]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test byte [esi + 0x18], 2
je 0x49f342
mov ebx, dword [esi + 0x24]
test ebx, ebx
jne 0x49f205
push 0xfde8
call dword [0x5351d4]
mov ebx, eax
add esp, 4
mov dword [esi + 0x24], ebx
test ebx, ebx
je 0x49f355
mov dword [esi + 0x34], 0xfde8
mov dword [esi + 0x30], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov edx, dword [esi + 0x30]
lea eax, [ebx + 0x1000]
mov dword [ebp - 0x10c], edx
cmp edx, eax
jbe 0x49f241
mov eax, dword [esi + 0x2c]
mov edi, edx
sub eax, edx
sub edi, ebx
push eax
push edx
push ebx
call fcn.004bd670
sub dword [esi + 0x30], edi
add esp, 0xc
mov eax, dword [esi + 0x30]
sub dword [esi + 0x28], edi
sub dword [esi + 0x2c], edi
mov ebx, dword [esi + 0x24]
mov dword [ebp - 0x10c], eax
mov edi, dword [esi + 0x2c]
mov edx, dword [esi + 0x34]
lea eax, [edi + 0x1000]
lea ecx, [edx + ebx]
cmp ecx, eax
jae 0x49f29c
mov eax, dword [esi + 0x28]
sub eax, ebx
mov dword [ebp - 0x110], eax
lea eax, [edx + edx]
push eax
push ebx
mov dword [esi + 0x34], eax
call dword [0x5351d8]
mov edx, eax
add esp, 8
mov dword [esi + 0x24], edx
test edx, edx
je 0x49f385
mov eax, dword [ebp - 0x10c]
sub edi, ebx
mov ecx, dword [ebp - 0x110]
add edi, edx
add ecx, edx
mov dword [esi + 0x2c], edi
sub eax, ebx
mov dword [esi + 0x28], ecx
add eax, edx
mov dword [esi + 0x30], eax
push 0
push 0x1000
push edi
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [esi + 0x38], eax
test eax, eax
jg 0x49f3ec
je 0x49f342
cmp eax, 0xffffffff
jne 0x49f2e7
call fcn.0049df20
cmp eax, 0x70
jg 0x49f2dc
je 0x49f2e7
cmp eax, 0xb
je 0x49f2e7
cmp eax, 0x6c
jmp 0x49f3c1
cmp eax, 0x8c
jne 0x49f3bc
mov eax, dword [0x535848]
lea ecx, [ebp - 0x118]
push ecx
push 0
mov dword [ebp - 0x118], eax
lea ecx, [ebp - 0x108]
mov eax, dword [esi + 0x14]
push 0
mov dword [ebp - 0x104], eax
inc eax
push ecx
push eax
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jge 0x49f338
call fcn.0049df20
cmp eax, 4
jne 0x49f342
test byte [esi + 0x18], 2
jne 0x49f1d3
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a55ed
mov esp, ebp
pop ebp
ret
push str.allocating_input
push 0
push 0
push 2
push 0xa
call fcn.004659f0
add esp, 0x14
mov dword [esi + 0x38], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a55ed
mov esp, ebp
pop ebp
ret
push str.allocating_input_buffer
push 0
push 0
push 2
push 0xa
call fcn.004659f0
push ebx
call dword [0x5351dc]
add esp, 0x18
mov dword [esi + 0x38], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a55ed
mov esp, ebp
pop ebp
ret
cmp eax, 0x274a
je 0x49f342
push str.recv_failed_n
push 0
push 0xa
call fcn.0048b8c0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a55ed
mov esp, ebp
pop ebp
ret
add dword [esi + 0x2c], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a55ed
mov esp, ebp
pop ebp
ret