Function at 0x47e3f4
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x431
push 0
push 0
dec ecx
jne 0x47e3fc
push ecx
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push ebp
push 0x47e7fa
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
cmp dword [edi + 0x48], 0
jne 0x47e7af
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x47e7af
mov word [ebp - 0x216c], 2
mov eax, dword [0x4914bc]
movzx eax, word [eax]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x216a], ax
mov eax, dword [0x491668]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_inet_addr
mov esi, eax
mov dword [ebp - 0x2168], esi
inc esi
jne 0x47e493
mov eax, dword [0x491668]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x47e7af
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2168], eax
push 0x10
lea eax, [ebp - 0x216c]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_connect
push 0
push 0x2000
lea eax, [ebp - 0x2010]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47e780
lea edx, [ebp - 0x2174]
mov eax, dword [edi + 0x44]
call fcn.00409ce0
mov ecx, dword [ebp - 0x2174]
lea eax, [ebp - 0x2170]
mov edx, 0x47e810
call fcn.00405848
mov edx, dword [ebp - 0x2170]
mov eax, dword [ebp - 4]
call fcn.0047424c
push 0
push 0x2000
lea eax, [ebp - 0x2010]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47e780
jmp 0x47e776
lea eax, [ebp - 0x2010]
xor ecx, ecx
mov edx, 0x2000
call fcn.00403af4
push 0
push 0x2000
lea eax, [ebp - 0x2010]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_recv
mov esi, eax
test esi, esi
jg 0x47e559
cmp byte [edi + 0x40], 0
jne 0x47e559
mov eax, edi
call fcn.0041fdc4
jmp 0x47e780
lea eax, [ebp - 0x217c]
lea edx, [ebp - 0x2010]
call fcn.00405e20
mov eax, dword [ebp - 0x217c]
lea edx, [ebp - 0x2178]
call fcn.00409b40
mov edx, dword [ebp - 0x2178]
lea eax, [ebp - 8]
call fcn.004057b8
lea eax, [ebp - 0x2180]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405a28
mov eax, dword [ebp - 0x2180]
mov edx, 0x47e824
call fcn.00405958
jne 0x47e660
lea eax, [ebp - 8]
mov ecx, 7
mov edx, 1
call fcn.00405a68
mov eax, dword [0x491350]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x47e834
call fcn.00405b0c
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405a28
mov edx, dword [ebp - 8]
mov eax, 0x47e834
call fcn.00405b0c
mov ecx, eax
lea eax, [ebp - 8]
mov edx, 1
call fcn.00405a68
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 8]
call fcn.004055c8
mov ecx, dword [0x491350]
mov ecx, dword [ecx]
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x10]
call fcn.00405848
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x215c]
call fcn.00403770
mov eax, dword [0x491710]
mov byte [eax], 1
mov edx, 1
lea eax, [ebp - 0x215c]
call fcn.00403e84
call fcn.0040305c
mov bl, 1
push ebp
call fcn.0047e3d4
pop ecx
jmp 0x47e776
lea eax, [ebp - 0x2184]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405a28
mov eax, dword [ebp - 0x2184]
mov edx, 0x47e840
call fcn.00405958
jne 0x47e6bf
lea eax, [ebp - 8]
mov ecx, 7
mov edx, 1
call fcn.00405a68
test bl, bl
je 0x47e6b1
lea eax, [ebp - 0x215c]
call fcn.00403918
call fcn.0040305c
xor ebx, ebx
push ebp
call fcn.0047e3d4
pop ecx
jmp 0x47e776
lea eax, [ebp - 0x2188]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405a28
mov eax, dword [ebp - 0x2188]
mov edx, 0x47e850
call fcn.00405958
jne 0x47e70b
mov byte [edi + 0x40], 1
push 2
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_closesocket
mov eax, edi
call fcn.0041fdc4
jmp 0x47e780
lea eax, [ebp - 0x218c]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405a28
mov eax, dword [ebp - 0x218c]
mov edx, 0x47e860
call fcn.00405958
jne 0x47e755
test bl, bl
je 0x47e74a
lea eax, [ebp - 0x215c]
call fcn.00403918
call fcn.0040305c
xor ebx, ebx
push ebp
call fcn.0047e3d4
pop ecx
jmp 0x47e776
push 0
lea edx, [ebp - 0x2010]
mov ecx, esi
lea eax, [ebp - 0x215c]
call fcn.004038f8
call fcn.0040305c
push ebp
call fcn.0047e3d4
pop ecx
cmp byte [edi + 0xd], 0
je 0x47e518
test bl, bl
je 0x47e794
lea eax, [ebp - 0x215c]
call fcn.00403918
call fcn.0040305c
push 2
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_closesocket
mov eax, edi
call fcn.0041fdc4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47e801
lea eax, [ebp - 0x218c]
mov edx, 4
call fcn.00405554
lea eax, [ebp - 0x217c]
mov edx, 2
call fcn.00405d24
lea eax, [ebp - 0x2174]
mov edx, 2
call fcn.00405554
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00405554
ret