Function at 0x4fe450
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x808
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x81c]
mov ebx, ecx
push edi
call fcn.004fdfa0
test eax, eax
je 0x4fe6a2
push 0x800
call fcn.00517a77
add esp, 4
mov ebp, eax
lea eax, [esp + 0x10]
mov byte [esp + 0x10], 5
push 0
push 4
push eax
push edi
mov byte [esp + 0x21], 2
mov byte [esp + 0x22], 0
mov byte [esp + 0x23], 2
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4fe699
push 0
lea ecx, [esp + 0x1c]
push 0x800
push ecx
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4fe699
cmp eax, 0xffffffff
je 0x4fe699
cmp byte [esp + 0x18], 5
jne 0x4fe699
mov al, byte [esp + 0x19]
movsx edx, al
cmp edx, 0xff
je 0x4fe699
cmp al, 2
jne 0x4fe5b5
mov byte [ebp], 1
mov eax, dword [ebx + 0x24]
mov byte [ebp + 1], al
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x24]
test eax, eax
jne 0x4fe510
mov eax, 0xfba8bc
mov edx, ecx
mov esi, eax
lea edi, [ebp + 2]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x34]
mov byte [ecx + ebp + 2], al
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x34]
test eax, eax
jne 0x4fe53c
mov eax, 0xfba8bc
mov edx, dword [ebx + 0x24]
mov esi, eax
mov eax, ecx
push 0
lea edi, [edx + ebp + 3]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x24]
mov ebx, dword [ebx + 0x34]
mov esi, dword [esp + 0x820]
lea ecx, [ebx + eax + 3]
push ecx
push ebp
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4fe699
push 0
lea edx, [esp + 0x1c]
push 0x800
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4fe699
cmp eax, 0xffffffff
je 0x4fe699
cmp byte [esp + 0x18], 1
jne 0x4fe699
mov al, byte [esp + 0x19]
test al, al
jne 0x4fe699
mov edi, esi
mov ebx, dword [esp + 0x820]
mov eax, dword [ebx + 4]
test eax, eax
jne 0x4fe5c8
mov eax, 0xfba8bc
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
mov eax, dword [esp + 0x824]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, 0xffffffff
mov byte [ebp], 5
mov byte [ebp + 1], 1
mov byte [ebp + 2], 0
jne 0x4fe633
mov byte [ebp + 3], 3
mov ecx, dword [ebx + 8]
mov byte [ebp + 4], cl
mov edx, dword [ebx + 4]
mov ecx, dword [ebx + 8]
test edx, edx
jne 0x4fe609
mov edx, 0xfba8bc
mov esi, edx
mov edx, ecx
lea edi, [ebp + 5]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 8]
mov edi, dword [esp + 0x81c]
mov word [ecx + ebp + 5], ax
mov eax, dword [ebx + 8]
add eax, 7
jmp 0x4fe643
mov word [ebp + 8], ax
mov byte [ebp + 3], 1
mov dword [ebp + 4], esi
mov eax, 0xa
push 0
push eax
push ebp
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4fe699
push 0
lea edx, [esp + 0x1c]
push 0x800
push edx
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4fe699
cmp eax, 0xffffffff
je 0x4fe699
cmp byte [esp + 0x18], 5
jne 0x4fe699
mov al, byte [esp + 0x19]
test al, al
jne 0x4fe699
push ebp
call fcn.0051798e
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x808
ret 0xc
push ebp
call fcn.0051798e
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x808
ret 0xc