Function at 0x4b9cec
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff428
push ebx
xor ebx, ebx
mov dword [ebp - 0xbd4], ebx
mov dword [ebp - 0xbd8], ebx
mov dword [ebp - 0xbd0], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4b9fbb
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
call fcn.004ba4a0
lea eax, [ebp - 0xbcc]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4b9f9d
xor eax, eax
push ebp
push 0x4b9f96
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.004b91e4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4b9d73
call fcn.00404930
jmp 0x4b9f9d
mov word [ebp - 0x2c], 2
mov eax, dword [ebp - 8]
mov ax, word [eax + 0xc]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x2a], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.004053ec
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x28], eax
push pe_nt_image_headers32
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_connect
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4b9f6a
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x4b9f6a
lea eax, [ebp - 0x234]
call fcn.00497548
lea eax, [ebp - 0x130]
call fcn.00497548
lea edx, [ebp - 0x234]
mov eax, dword [ebp - 0x10]
call fcn.00497538
lea edx, [ebp - 0x130]
mov eax, dword [ebp - 0x10]
call fcn.00497538
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
mov ecx, 0x3e8
xor edx, edx
div ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
mov ecx, 0x3e8
xor edx, edx
div ecx
imul eax, edx, 0x3e8
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x234]
push eax
push 0
push 0
call sub.wsock32.dll_select
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x4b9f6a
lea eax, [ebp - 0xa3a]
xor ecx, ecx
mov edx, 0x401
call fcn.004035b8
push dword [ebp - 0xc]
push 0x4b9fd0
push 0x4b9fd0
lea eax, [ebp - 0xbd0]
mov edx, 3
call fcn.004052ac
mov eax, dword [ebp - 0xbd0]
call fcn.004053ec
mov edx, eax
lea eax, [ebp - 0xa3a]
call fcn.0040a348
push 0
push 0x401
lea eax, [ebp - 0xa3a]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_send
lea eax, [ebp - 0x130]
call fcn.00497548
lea edx, [ebp - 0x130]
mov eax, dword [ebp - 0x10]
call fcn.00497538
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
lea eax, [ebp - 0x130]
push eax
push 0
call sub.wsock32.dll_select
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x4b9f6a
lea eax, [ebp - 0x639]
xor ecx, ecx
mov edx, 0x401
call fcn.004035b8
jmp 0x4b9f4f
lea edx, [ebp - 0xbd4]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
lea eax, [ebp - 0xbd4]
push eax
lea eax, [ebp - 0xbd8]
lea edx, [ebp - 0x639]
call fcn.00405108
mov edx, dword [ebp - 0xbd8]
pop eax
call fcn.004051f4
mov edx, dword [ebp - 0xbd4]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
lea eax, [ebp - 0x639]
xor ecx, ecx
mov edx, 0x401
call fcn.004035b8
push 0
push 0x401
lea eax, [ebp - 0x639]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
test eax, eax
jg 0x4b9ef7
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004b9230
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b9f9d
call sub.wsock32.dll_WSACleanup
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x18]
mov eax, dword [ebp - 4]
call fcn.004ba25c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b9fc2
lea eax, [ebp - 0xbd8]
mov edx, 3
call fcn.00404f34
ret