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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1124
call fcn.004a6720
mov eax, dword [0x535b70]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea ebx, [ebp - 0x1004]
push edi
mov dword [ebp - 0x110c], ebx
xor eax, eax
mov edx, dword [esi + 0x30]
nop
mov edi, ebx
mov dword [ebp - 0x111c], eax
mov dword [ebp - 0x1118], edi
cmp edx, dword [esi + 0x2c]
jne 0x49f0ad
test byte [esi + 0x18], 2
je 0x49f07d
mov ebx, dword [esi + 0x24]
test ebx, ebx
jne 0x49ef33
push 0xfde8
call dword [0x5351d4]
mov ebx, eax
add esp, 4
mov dword [esi + 0x24], ebx
test ebx, ebx
je 0x49f0f2
mov dword [esi + 0x34], 0xfde8
mov dword [esi + 0x30], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov edi, dword [esi + 0x30]
lea eax, [ebx + 0x1000]
mov dword [ebp - 0x1110], edi
cmp edi, eax
jbe 0x49ef6f
mov eax, dword [esi + 0x2c]
sub edi, ebx
mov ecx, dword [ebp - 0x1110]
sub eax, ecx
push eax
push ecx
push ebx
call fcn.004bd670
sub dword [esi + 0x30], edi
add esp, 0xc
sub dword [esi + 0x28], edi
mov ecx, dword [esi + 0x30]
sub dword [esi + 0x2c], edi
mov edi, ecx
mov ebx, dword [esi + 0x24]
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x34]
add ecx, ebx
mov dword [ebp - 0x1114], edx
lea eax, [edx + 0x1000]
cmp ecx, eax
jae 0x49efd1
mov eax, dword [esi + 0x28]
sub eax, ebx
mov dword [ebp - 0x1110], eax
mov eax, dword [esi + 0x34]
add eax, eax
push eax
push ebx
mov dword [esi + 0x34], eax
call dword [0x5351d8]
add esp, 8
mov dword [esi + 0x24], eax
test eax, eax
je 0x49f121
mov edx, dword [ebp - 0x1114]
mov ecx, eax
sub ecx, ebx
sub edi, ebx
add edx, ecx
mov ecx, dword [ebp - 0x1110]
add ecx, eax
mov dword [esi + 0x2c], edx
add edi, eax
mov dword [esi + 0x28], ecx
mov dword [esi + 0x30], edi
push 0
push 0x1000
push edx
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [esi + 0x38], eax
test eax, eax
jg 0x49f09e
je 0x49f077
cmp eax, 0xffffffff
jne 0x49f01c
call fcn.0049df20
cmp eax, 0x70
jg 0x49f011
je 0x49f01c
cmp eax, 0xb
je 0x49f01c
cmp eax, 0x6c
jmp 0x49f15c
cmp eax, 0x8c
jne 0x49f157
mov eax, dword [0x535848]
lea ecx, [ebp - 0x1124]
push ecx
push 0
mov dword [ebp - 0x1124], eax
lea ecx, [ebp - 0x1108]
mov eax, dword [esi + 0x14]
push 0
mov dword [ebp - 0x1104], eax
inc eax
push ecx
push eax
mov dword [ebp - 0x1120], 0
mov dword [ebp - 0x1108], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jge 0x49f06d
call fcn.0049df20
cmp eax, 4
jne 0x49f077
test byte [esi + 0x18], 2
jne 0x49ef01
mov ebx, dword [ebp - 0x110c]
lea eax, [ebp - 0x1004]
cmp ebx, eax
jne 0x49f186
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
add dword [esi + 0x2c], eax
mov ebx, dword [ebp - 0x110c]
mov edi, dword [ebp - 0x1118]
mov eax, dword [esi + 0x30]
mov cl, byte [eax]
lea edx, [eax + 1]
mov byte [ebx], cl
mov dword [esi + 0x30], edx
cmp cl, 0xa
je 0x49f186
cmp cl, 0xd
lea ebx, [edi + 1]
cmove ebx, edi
mov edi, dword [ebp - 0x111c]
mov dword [ebp - 0x110c], ebx
lea eax, [edi + 1]
cmove eax, edi
cmp eax, 0xfff
jl 0x49eee0
mov byte [ebp - 5], 0
jmp 0x49f189
push str.allocating_input
push 0
push 0
push 2
push 0xa
call fcn.004659f0
add esp, 0x14
mov dword [esi + 0x38], 0xffffffff
xor eax, eax
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
xor eax, eax
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 0x49f077
push str.recv_failed_n
push 0
push 0xa
call fcn.0048b8c0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a55ed
mov esp, ebp
pop ebp
ret
mov byte [ebx], 0
lea eax, [ebp - 0x1004]
push eax
call dword [0x5351e0]
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a55ed
mov esp, ebp
pop ebp
ret