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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4ac
mov dword [ebp - 0x4b4], eax
mov esi, edx
mov dword [ebp - 0x4b8], ecx
cmp dword [0x412040], 4
ja 0x40227a
sub esp, 8
add eax, 7
push eax
lea ebx, [ebp - 0x494]
push ebx
call sub.KERNEL32.dll_lstrcpyA
sub esp, 4
push eax
call sub.KERNEL32.dll_lstrlenA
mov dword [ebp - 0x10], eax
mov edx, 0x2f
mov eax, ebx
call fcn.00401057
mov edi, eax
add esp, 0xc
test eax, eax
je 0x402346
mov byte [eax], 0
mov edx, 0x3a
mov eax, ebx
call fcn.00401057
test eax, eax
jne 0x4020a9
mov ebx, 0x50
jmp 0x4020bc
mov byte [eax], 0
lea edx, [ebp - 0x14]
inc eax
mov ecx, 0
call fcn.0040106e
mov ebx, eax
movzx eax, bx
mov dword [ebp - 0x4b0], eax
sub esp, 0xc
push eax
call sub.WS2_32.DLL_htons
mov word [ebp - 0x4a2], ax
add esp, 0xc
test esi, esi
je 0x4020e6
mov eax, dword [esi]
mov dword [ebp - 0x4a0], eax
jmp 0x40212c
sub esp, 0xc
lea esi, [ebp - 0x494]
push esi
call sub.WS2_32.DLL_inet_addr
mov dword [ebp - 0x4a0], eax
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40212c
sub esp, 0xc
push esi
call sub.WS2_32.DLL_gethostbyname
add esp, 0xc
test eax, eax
je 0x40227a
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x40227a
mov eax, dword [eax]
mov dword [ebp - 0x4a0], eax
mov word [ebp - 0x4a4], 2
sub esp, 4
push 6
push 1
push 2
call sub.WS2_32.DLL_socket
mov esi, eax
add esp, 4
cmp eax, 0xffffffff
je 0x40227a
lea edx, [ebp - 0x4a4]
mov ecx, 0x28
call fcn.00401d76
test eax, eax
je 0x402176
sub esp, 0xc
push esi
call sub.WS2_32.DLL_closesocket
add esp, 0xc
jmp 0x40227a
cmp bx, 0x50
jne 0x402183
mov edx, 0x4073a0
jmp 0x402188
mov edx, 0x407400
mov eax, dword [ebp - 0x10]
add eax, 0x9e
and eax, 0xfffffff0
call fcn.00406420
lea ebx, [esp + 0xf]
and ebx, 0xfffffff0
sub esp, 0xc
push dword [ebp - 0x4b0]
lea eax, [ebp - 0x494]
push eax
lea eax, [edi + 1]
push eax
push edx
push ebx
call sub.USER32.dll_wsprintfA
mov dword [ebp - 0x10], eax
add esp, 0x20
push 0
push eax
push ebx
push esi
call sub.WS2_32.DLL_send
sub esp, 0xc
lea ebx, [ebp - 0x414]
push 0x28
mov ecx, 0x400
mov edx, ebx
mov eax, esi
call fcn.00401ec9
add esp, 0x10
cmp eax, 0xb
jle 0x402165
mov byte [ebp - 0x40d], 0x30
mov byte [ebp - 0x408], 0
sub esp, 8
push 0x40748a
push ebx
call sub.KERNEL32.dll_lstrcmpiA
add esp, 8
test eax, eax
jne 0x402165
jmp 0x402223
cmp edx, 0xffffffff
je 0x402165
jmp 0x402229
lea ebx, [ebp - 0x414]
sub esp, 0xc
push 0x28
mov ecx, 0x400
mov edx, ebx
mov eax, esi
call fcn.00401ec9
mov edx, eax
mov dword [ebp - 0x10], eax
add esp, 0x10
test eax, eax
jne 0x402218
cmp dword [ebp - 0x4b8], 0
je 0x40225b
mov dword [0x412040], 0
mov eax, 0x14
call fcn.0040162c
mov dword [eax], 0
mov dword [eax + 0x10], 0
mov dword [eax + 4], esi
jmp 0x40234b
cmp dword [0x4121b0], 0
je 0x402346
call fcn.004016e1
sub esp, 0xc
push 0
push 0
push 0
push 4
push 0x407460
call dword [0x4121b0]
mov esi, eax
add esp, 0xc
test eax, eax
je 0x402346
mov dword [ebp - 0x10], 0x9c40
push 4
lea ebx, [ebp - 0x10]
push ebx
push 2
push eax
call dword [0x4121e0]
push 4
push ebx
push 6
push esi
call dword [0x4121e0]
push 4
push ebx
push 5
push esi
call dword [0x4121e0]
sub esp, 8
push 0
push 0x84280300
push 0
push 0
push dword [ebp - 0x4b4]
push esi
call dword [0x4121c0]
mov ebx, eax
add esp, 8
test eax, eax
je 0x402332
cmp dword [ebp - 0x4b8], 0
je 0x40231a
mov eax, dword [0x412040]
cmp eax, 4
ja 0x40231a
inc eax
mov dword [0x412040], eax
mov eax, 0x14
call fcn.0040162c
mov dword [eax], esi
mov dword [eax + 0x10], 0
mov dword [eax + 4], ebx
jmp 0x40234b
sub esp, 0xc
push esi
call dword [0x4121f0]
mov eax, 0
add esp, 0xc
jmp 0x40234b
mov eax, 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret