Function at 0x47f2cc
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
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x47f2d5
mov eax, dword [ebp - 4]
add esp, 0xfffffe7c
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x2184], edx
mov dword [ebp - 0x2188], edx
mov dword [ebp - 0x2178], edx
mov dword [ebp - 0x217c], edx
mov dword [ebp - 0x2180], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x47f6ec
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
mov eax, dword [ebp - 8]
cmp dword [eax + 0x48], 0
jne 0x47f6c6
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x47f6c6
mov word [ebp - 0x2174], 2
mov eax, dword [0x49248c]
movzx eax, word [eax]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x2172], ax
mov eax, dword [0x4925e8]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_inet_addr
mov esi, eax
mov dword [ebp - 0x2170], esi
inc esi
jne 0x47f39e
mov eax, dword [0x4925e8]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x47f6c6
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2170], eax
push 0x10
lea eax, [ebp - 0x2174]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_connect
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47f68b
push 0x47f704
mov eax, dword [ebp - 8]
call fcn.0047f760
push edx
push eax
lea eax, [ebp - 0x217c]
call fcn.00409e4c
push dword [ebp - 0x217c]
push 0x47f71c
lea edx, [ebp - 0x2180]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x44]
call fcn.00409d60
push dword [ebp - 0x2180]
lea eax, [ebp - 0x2178]
mov edx, 4
call fcn.004058e0
mov edx, dword [ebp - 0x2178]
mov eax, dword [ebp - 0x10]
call fcn.00474dbc
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47f68b
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x40]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x47f667
inc eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 4]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x40]
mov edx, dword [ebp - 0x14]
mov esi, dword [eax]
call dword [esi + 0xc]
push 0x47f728
push dword [ebp - 4]
push 0x47f71c
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.0047f1ac
push edx
push eax
lea eax, [ebp - 0x2188]
call fcn.00409e4c
push dword [ebp - 0x2188]
lea eax, [ebp - 0x2184]
mov edx, 4
call fcn.004058e0
mov edx, dword [ebp - 0x2184]
mov eax, dword [ebp - 0x10]
call fcn.00474e58
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47f667
mov eax, dword [ebp - 4]
call fcn.0040a25c
test al, al
je 0x47f502
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.0047f1ac
cmp edx, 0
jne 0x47f500
cmp eax, 0
ja 0x47f532
jmp 0x47f502
jg 0x47f532
mov edx, 0x47f738
mov eax, dword [ebp - 0x10]
call fcn.00474e58
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47f667
jmp 0x47f65b
xor eax, eax
push ebp
push 0x47f5f3
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x2164]
call fcn.00403770
mov eax, dword [0x49268c]
mov byte [eax], 0
mov edx, 1
lea eax, [ebp - 0x2164]
call fcn.00403e68
mov bl, 1
lea eax, [ebp - 0x2018]
xor ecx, ecx
mov edx, 0x2000
call fcn.00403af4
lea eax, [ebp - 0xc]
push eax
lea edx, [ebp - 0x2018]
mov ecx, 0x2000
lea eax, [ebp - 0x2164]
call fcn.004038d8
cmp dword [ebp - 0xc], 0
jle 0x47f5d3
push 0
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_send
inc eax
je 0x47f5d3
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47f5d3
cmp dword [ebp - 0xc], 0
jne 0x47f568
test bl, bl
je 0x47f5e7
lea eax, [ebp - 0x2164]
call fcn.00403918
call fcn.0040305c
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x47f634
mov edx, 0x47f748
mov eax, dword [ebp - 0x10]
call fcn.00474e58
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
inc eax
je 0x47f667
inc dword [ebp - 0x14]
dec dword [ebp - 0x18]
jne 0x47f465
mov edx, 0x47f758
mov eax, dword [ebp - 0x10]
call fcn.00474e58
push 0
push 0x2000
lea eax, [ebp - 0x2018]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_recv
test bl, bl
je 0x47f69f
lea eax, [ebp - 0x2164]
call fcn.00403918
call fcn.0040305c
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_closesocket
mov eax, dword [ebp - 8]
add eax, 0x40
call fcn.0040f934
mov eax, dword [ebp - 8]
call fcn.0041fe98
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47f6f3
lea eax, [ebp - 0x2188]
mov edx, 5
call fcn.00405554
lea eax, [ebp - 4]
call fcn.00405530
ret