Function at 0x4b879c
Capabilities:
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x4b87a4
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x4b8a66
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, 0x4b8a7c
mov dl, 8
mov eax, ebx
call fcn.004b8e80
test byte [ebx + 0x20], 0x10
jne 0x4b8a4b
xor eax, eax
push ebp
push 0x4b8a2b
push dword fs:[eax]
mov dword fs:[eax], esp
inc dword [0x538478]
cmp dword [0x538478], 1
jne 0x4b896c
lea eax, [ebx + 0x100cc]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 0x4b8a9c
mov ax, word [ebx + 0x100cc]
call fcn.00407de0
and eax, 0xff
lea edx, [ebp - 0xc]
call fcn.0040932c
push dword [ebp - 0xc]
push 0x4b8ab0
lea edx, [ebp - 0x10]
xor eax, eax
mov al, byte [ebx + 0x100cc]
call fcn.0040932c
push dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edx, 4
call fcn.00404164
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x10080]
mov ecx, dword [eax]
call dword [ecx + 0x34]
push 0x4b8abc
mov ax, word [ebx + 0x100ce]
call fcn.00407de0
and eax, 0xff
lea edx, [ebp - 0x18]
call fcn.0040932c
push dword [ebp - 0x18]
push 0x4b8ab0
lea edx, [ebp - 0x1c]
xor eax, eax
mov al, byte [ebx + 0x100ce]
call fcn.0040932c
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00404164
mov edx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x10080]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea eax, [ebp - 0x24]
lea edx, [ebx + 0x100d0]
mov ecx, 0x101
call fcn.00404054
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov edx, 0x4b8ad4
call fcn.004040f0
mov edx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x10080]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea eax, [ebp - 0x2c]
lea edx, [ebx + 0x101d1]
mov ecx, 0x81
call fcn.00404054
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 0x4b8aec
call fcn.004040f0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebx + 0x10080]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea edx, [ebp - 0x34]
movzx eax, word [ebx + 0x10252]
call fcn.0040932c
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x30]
mov edx, 0x4b8b00
call fcn.004040f0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebx + 0x10080]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea edx, [ebp - 0x3c]
movzx eax, word [ebx + 0x10254]
call fcn.0040932c
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, 0x4b8b18
call fcn.004040f0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebx + 0x10080]
mov ecx, dword [eax]
call dword [ecx + 0x34]
xor eax, eax
push ebp
push 0x4b89fe
push dword fs:[eax]
mov dword fs:[eax], esp
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov esi, eax
cmp esi, 0xffff
jbe 0x4b8994
call fcn.00402ff8
mov word [ebx + 0x10288], si
mov word [ebp - 4], 1
mov word [ebp - 2], 0
push 4
lea eax, [ebp - 4]
push eax
push 0x80
push 0xffff
movzx eax, si
push eax
call sub.wsock32.dll_setsockopt
cmp word [ebx + 0x10288], 0xffff
jne 0x4b89d9
lea ecx, [ebp - 0x40]
mov dx, 0x2733
mov eax, ebx
call fcn.004b8db4
push 0x3d
push 0x465
mov eax, dword [ebx + 0x1028c]
push eax
movzx eax, word [ebx + 0x10288]
push eax
call sub.wsock32.dll_WSAAsyncSelect
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4b8a21
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4b8a4b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b8a6d
lea eax, [ebp - 0x40]
mov edx, 0xf
call fcn.00403e48
ret