Function at 0x4865e0
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
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x4865e9
mov eax, dword [ebp - 4]
add esp, 0xffffffbc
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x2048], edx
mov dword [ebp - 0x2040], edx
mov dword [ebp - 0x2044], edx
mov dword [ebp - 0x203c], edx
mov dword [ebp - 4], edx
mov edi, eax
xor eax, eax
push ebp
push 0x4868d4
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
mov eax, dword [0x494808]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
cmp ebx, eax
jle 0x48663e
xor ebx, ebx
lea ecx, [ebp - 0x203c]
mov eax, dword [0x494808]
mov eax, dword [eax]
mov edx, ebx
call fcn.00465178
mov eax, dword [ebp - 0x203c]
call fcn.004059dc
mov edx, dword [0x494b30]
mov dword [edx], eax
mov eax, dword [0x494808]
mov eax, dword [eax]
mov edx, ebx
call fcn.0046509c
mov edx, dword [0x4949d4]
mov word [edx], ax
inc ebx
push 0xc8
call sub.KERNEL32.DLL_Sleep
jmp 0x4866a1
lea eax, [ebp - 0x2038]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x2038]
push eax
call sub.user32.dll_DispatchMessageA
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x2038]
push eax
call sub.user32.dll_PeekMessageA
test eax, eax
jne 0x486689
lea eax, [ebp - 0x1c]
xor ecx, ecx
mov edx, 0x10
call fcn.00403af4
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov edx, dword [0x494af0]
mov dword [edx], eax
mov eax, dword [0x494af0]
cmp dword [eax], 0xffffffff
je 0x48662b
mov word [ebp - 0x1c], 2
mov eax, dword [0x4949d4]
movzx eax, word [eax]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x1a], ax
mov eax, dword [0x494b30]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x486736
mov eax, dword [0x494b30]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x48662b
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
push 0x10
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [0x494af0]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_connect
test eax, eax
jne 0x48686c
test esi, esi
je 0x48675c
mov eax, esi
call fcn.0041ff18
mov cl, 1
mov dl, 1
mov eax, dword [0x486314]
call fcn.0041fa34
mov esi, eax
mov byte [esi + 0xf], 1
mov dl, 5
mov eax, esi
call fcn.0041fc40
mov edx, dword [0x494af0]
mov edx, dword [edx]
mov eax, esi
call fcn.004864b4
mov edx, edi
mov eax, esi
call fcn.004864b8
mov eax, esi
call fcn.0041fef0
mov eax, dword [0x494a74]
mov byte [eax], 1
jmp 0x486860
lea eax, [ebp - 0x201c]
xor ecx, ecx
mov edx, 0x2000
call fcn.00403af4
push 0
push 0x2000
lea eax, [ebp - 0x201c]
push eax
mov eax, dword [0x494af0]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_recv
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x4867e7
mov eax, edi
call fcn.00486528
jmp 0x48662b
lea eax, [ebp - 0x2044]
lea edx, [ebp - 0x201c]
call fcn.00405e3c
mov eax, dword [ebp - 0x2044]
lea edx, [ebp - 0x2040]
call fcn.00409bd0
mov edx, dword [ebp - 0x2040]
lea eax, [ebp - 4]
call fcn.004057d4
lea ecx, [ebp - 0x2048]
mov edx, dword [0x494b58]
mov edx, dword [edx]
mov eax, dword [ebp - 4]
call fcn.004616b4
mov edx, dword [ebp - 0x2048]
lea eax, [ebp - 4]
call fcn.004055c8
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x486852
mov eax, dword [ebp - 0xc]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x486860
mov eax, dword [ebp - 4]
call fcn.004760a4
cmp byte [edi + 0xd], 0
je 0x4867a5
jmp 0x486898
test esi, esi
je 0x486877
mov eax, esi
call fcn.0041ff18
push 1
mov eax, dword [0x494af0]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [0x494af0]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_closesocket
jmp 0x48662b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4868db
lea eax, [ebp - 0x2048]
call fcn.00405530
lea eax, [ebp - 0x2044]
mov edx, 2
call fcn.00405d40
lea eax, [ebp - 0x203c]
call fcn.00405530
lea eax, [ebp - 4]
call fcn.00405530
ret