Function at 0x401c3e
Capabilities:
Create tcp socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x4a0
cmp dword [0x40c040], 4
mov dword [ebp - 0x4a8], eax
ja 0x401e46
add eax, 7
lea ebx, [ebp - 0x48c]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpyA
push eax
call sub.KERNEL32.DLL_lstrlenA
mov dword [ebp - 0x4a4], eax
mov edx, 0x2f
mov eax, ebx
call fcn.0040134d
mov edi, eax
xor eax, eax
test edi, edi
je 0x401efe
mov byte [edi], 0
mov edx, 0x3a
mov eax, ebx
call fcn.0040134d
mov dword [ebp - 0x4ac], 0x50
test eax, eax
je 0x401ccb
mov byte [eax], 0
lea edx, [ebp - 0x4a0]
inc eax
push 0
call fcn.0040136b
movzx eax, ax
mov dword [ebp - 0x4ac], eax
pop eax
push dword [ebp - 0x4ac]
call sub.WS2_32.DLL_htons
mov word [ebp - 0x49a], ax
test esi, esi
je 0x401ce5
mov eax, dword [esi]
jmp 0x401d17
lea ebx, [ebp - 0x48c]
push ebx
call sub.WS2_32.DLL_inet_addr
mov dword [ebp - 0x498], eax
inc eax
jne 0x401d1d
push ebx
call sub.WS2_32.DLL_gethostbyname
test eax, eax
je 0x401e46
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x401e46
mov eax, dword [eax]
mov dword [ebp - 0x498], eax
push 6
push 1
push 2
mov word [ebp - 0x49c], 2
call sub.WS2_32.DLL_socket
cmp eax, 0xffffffff
mov esi, eax
je 0x401e46
push 0x28
lea edx, [ebp - 0x49c]
call fcn.00401983
pop ebx
test eax, eax
je 0x401d59
push esi
call sub.WS2_32.DLL_closesocket
jmp 0x401e46
mov eax, dword [ebp - 0x4a4]
add eax, 0x92
and eax, 0xfffffffc
call fcn.00405ba0
lea ebx, [esp + 0xf]
push dword [ebp - 0x4ac]
and ebx, 0xfffffff0
cmp word [ebp - 0x4ac], 0x50
lea eax, [ebp - 0x48c]
push eax
lea eax, [edi + 1]
push eax
mov eax, 0x40a5c0
je 0x401d98
mov eax, 0x40a560
push eax
push ebx
call sub.USER32.dll_wsprintfA
push 0
push eax
push ebx
lea ebx, [ebp - 0x40c]
push esi
mov dword [ebp - 0x4a4], eax
call sub.WS2_32.DLL_send
push 0x28
mov edx, ebx
mov eax, esi
push 0x400
call fcn.0040187b
add esp, 0x1c
cmp eax, 0xb
jle 0x401d4e
push 0x40a4fc
push ebx
mov byte [ebp - 0x405], 0x30
mov byte [ebp - 0x400], 0
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401d4e
jmp 0x401df7
inc eax
je 0x401d4e
push 0x28
lea edx, [ebp - 0x40c]
mov eax, esi
push 0x400
call fcn.0040187b
pop edx
test eax, eax
mov dword [ebp - 0x4a4], eax
pop ecx
jne 0x401df0
cmp dword [ebp + 8], 0
je 0x401e27
mov dword [0x40c040], 0
mov eax, 0x14
call fcn.00401000
mov dword [eax], 0
mov dword [eax + 0x10], 0
mov dword [eax + 4], esi
jmp 0x401efe
cmp dword [0x40c1a0], 0
je 0x401efc
call fcn.00401a88
push 0
push 0
push 0
push 4
push 0x40a520
call dword [0x40c1a0]
test eax, eax
mov esi, eax
je 0x401efc
push 4
lea ebx, [ebp - 0x4a4]
push ebx
push 2
mov dword [ebp - 0x4a4], 0x9c40
push eax
call dword [0x40c1d0]
push 4
push ebx
push 6
push esi
call dword [0x40c1d0]
push 4
push ebx
push 5
push esi
call dword [0x40c1d0]
push 0
push 0x84280300
push 0
push 0
push dword [ebp - 0x4a8]
push esi
call dword [0x40c1b0]
test eax, eax
mov ebx, eax
je 0x401ef5
cmp dword [ebp + 8], 0
je 0x401edd
mov eax, dword [0x40c040]
cmp eax, 4
ja 0x401edd
inc eax
mov dword [0x40c040], eax
mov eax, 0x14
call fcn.00401000
mov dword [eax], esi
mov dword [eax + 0x10], 0
mov dword [eax + 4], ebx
jmp 0x401efe
push esi
call dword [0x40c1e0]
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret