Function at 0x408ec0
Capabilities:
Act as tcp client
Allocate or change rwx memory
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
add esp, 0xffffff90
push edi
push esi
push ebx
mov ebx, 0xffffffff
push 0x40
push 0x1000
push 0x3000
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0x70], eax
push 0
push 0x50
lea eax, [ebp - 0x64]
push eax
call fcn.00408554
call fcn.0040856c
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x14], 0
je 0x408f0c
push dword [ebp - 0x14]
push dword [ebp + 0x14]
call fcn.00408500
jmp 0x408f14
push dword [ebp - 0x14]
call fcn.0040d600
push 0
push 1
push 2
call sub.ws2_32.dll_socket
cmp eax, 0xffffffff
je 0x4090e0
mov dword [ebp - 0x6c], eax
mov word [ebp - 0x10], 2
push dword [ebp + 0x10]
call sub.ws2_32.dll_htons
mov word [ebp - 0xe], ax
push dword [ebp + 0xc]
call sub.ws2_32.dll_gethostbyname
or eax, eax
je 0x408f52
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x408f5a
push dword [ebp + 0xc]
call sub.ws2_32.dll_inet_addr
cmp eax, 0xffffffff
je 0x4090e0
mov dword [ebp - 0xc], eax
push 0x10
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x6c]
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x4090e0
push dword [ebp - 0x70]
push 0x1b
push 0
push 0
call fcn.0040d4e0
push 0
push ecx
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_send
cmp eax, 0xffffffff
je 0x4090e0
push 0
push 0x300
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_recv
mov esi, eax
push eax
push dword [ebp - 0x70]
call fcn.0040d540
lea eax, [edx + eax]
add esi, eax
cmp esi, 0x45
jne 0x4090e0
mov esi, dword [ebp - 0x70]
add esi, 0xa
push ecx
push esi
lea eax, [ebp - 0x64]
push eax
call fcn.0040858c
push dword [ebp - 0x14]
lea eax, [ebp - 0x64]
push eax
push 0x20
call fcn.0040be40
lea eax, [ebp - 0x64]
push eax
call fcn.0040d5b0
push dword [ebp - 0x70]
push 9
push 0x20
lea eax, [ebp - 0x64]
push eax
call fcn.0040d4e0
push 0
push ecx
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_send
cmp eax, 0xffffffff
je 0x4090e0
push 0
push 0x3000
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_recv
mov esi, eax
push eax
push dword [ebp - 0x70]
call fcn.0040d540
lea eax, [edx + eax]
add esi, eax
cmp esi, 0x14
jne 0x4090e0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
push dword [ebp - 0x70]
push 0x1a
push 4
lea eax, [ebp - 0x68]
push eax
call fcn.0040d4e0
push 0
push ecx
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_send
push 0
push 0x3000
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_recv
push eax
push dword [ebp - 0x70]
call fcn.0040d540
cmp edx, 0x1a
jne 0x4090ae
push 0x8000
push 0
push dword [ebp - 0x70]
call sub.kernel32.dll_VirtualFree
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, dword [ebp - 0x6c]
pop ebx
pop esi
pop edi
leave
ret 0x14
push 0x8000
push 0
push dword [ebp - 0x70]
call sub.kernel32.dll_VirtualFree
push 0x8000
push 0
push dword [ebp - 0x14]
call sub.kernel32.dll_VirtualFree
push dword [ebp - 0x6c]
call sub.ws2_32.dll_closesocket
mov eax, 6
pop ebx
pop esi
pop edi
leave
ret 0x14
push 0x8000
push 0
push dword [ebp - 0x14]
call sub.kernel32.dll_VirtualFree
push 0x8000
push 0
push dword [ebp - 0x70]
call sub.kernel32.dll_VirtualFree
push dword [ebp - 0x6c]
call sub.ws2_32.dll_closesocket
mov eax, ebx
pop ebx
pop esi
pop edi
leave
ret 0x14