Function at 0x47ab18
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbf8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x408], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.00404bd4
mov eax, dword [ebp - 8]
call fcn.00404bd4
xor eax, eax
push ebp
push 0x47ad80
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov al, 1
call fcn.00407738
mov ebx, eax
mov eax, dword [ebp + 8]
call fcn.00404724
lea eax, [ebp - 0x3d2]
mov edx, dword [ebp - 4]
call fcn.004098c8
lea eax, [ebp - 0x404]
mov edx, dword [ebp - 8]
call fcn.004098c8
lea eax, [ebp - 0x19c]
push eax
push ebx
call sub.wsock32.dll_WSAStartup
mov ebx, eax
test ebx, ebx
je 0x47aba6
call sub.wsock32.dll_WSAGetLastError
mov ebx, eax
sub ebx, 0x2710
jmp 0x47ad55
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x47abcc
call sub.wsock32.dll_WSAGetLastError
mov ebx, eax
sub ebx, 0x2710
jmp 0x47ad4c
mov word [ebp - 0x1ac], 2
lea eax, [ebp - 0x3d2]
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1a8], eax
push 0x2b
call sub.wsock32.dll_htons
mov word [ebp - 0x1aa], ax
cmp word [esi + 0x52], 0
je 0x47ac04
mov edx, esi
mov eax, dword [esi + 0x54]
call dword [esi + 0x50]
push 0x10
lea eax, [ebp - 0x1ac]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_connect
mov ebx, eax
cmp word [esi + 0x5a], 0
je 0x47ac2e
push ebx
cmp ebx, 0xffffffff
setne cl
mov edx, esi
mov eax, dword [esi + 0x5c]
call dword [esi + 0x58]
inc ebx
jne 0x47ac43
call sub.wsock32.dll_WSAGetLastError
mov ebx, eax
sub ebx, 0x2710
jmp 0x47ad41
mov edx, 0x47ad94
lea eax, [ebp - 0x404]
call fcn.0040990c
cmp word [esi + 0x62], 0
je 0x47ac62
mov edx, esi
mov eax, dword [esi + 0x64]
call dword [esi + 0x60]
push 0
mov eax, dword [ebp - 8]
call fcn.004049e4
inc eax
push eax
lea eax, [ebp - 0x404]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_send
mov ebx, eax
cmp word [esi + 0x6a], 0
je 0x47ac96
push ebx
cmp ebx, 0xffffffff
setne cl
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
cmp ebx, 0xffffffff
jne 0x47acad
call sub.wsock32.dll_WSAGetLastError
mov ebx, eax
sub ebx, 0x2710
jmp 0x47ad41
cmp word [esi + 0x72], 0
je 0x47acbc
mov edx, esi
mov eax, dword [esi + 0x74]
call dword [esi + 0x70]
lea eax, [ebp - 0x3a0]
xor ecx, ecx
mov edx, 0x1f4
call fcn.004030d8
push 0
push 0x1f4
lea eax, [ebp - 0x3a0]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_recv
mov edi, eax
mov eax, edi
sub eax, 0xffffffff
je 0x47acf3
dec eax
je 0x47ad2d
jmp 0x47ad02
call sub.wsock32.dll_WSAGetLastError
mov ebx, eax
sub ebx, 0x2710
jmp 0x47ad29
lea eax, [ebp - 0x408]
lea edx, [ebp - 0x3a0]
mov ecx, 0x1f4
call fcn.00404994
mov edx, dword [ebp - 0x408]
mov eax, dword [ebp + 8]
call fcn.004049ec
mov eax, dword [ebp + 8]
test edi, edi
jg 0x47acbc
cmp word [esi + 0x7a], 0
je 0x47ad41
push ebx
inc edi
setne cl
mov edx, esi
mov eax, dword [esi + 0x7c]
call dword [esi + 0x78]
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_closesocket
call sub.wsock32.dll_WSACleanup
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47ad87
lea eax, [ebp - 0x408]
call fcn.00404724
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404748
ret