Function at 0x40deb4
Capabilities:
Act as tcp client
Connect tcp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x34]
sub esp, 0x3c
mov ebx, dword [ebp + 8]
push 0x1c
push 0
push eax
call fcn.00428f38
add esp, 0xc
cmp byte [ebx], 0x5b
jne 0x40df01
push eax
push eax
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0041d441
add esp, 0xc
mov word [ebp - 0x34], 0x17
push 6
push 1
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
mov edx, eax
pop eax
jmp 0x40e076
sub esp, 0xc
push ebx
call fcn.0040de99
add esp, 0x10
test eax, eax
je 0x40e044
sub esp, 0xc
push 0x4658d0
call fcn.00403666
pop esi
pop edi
push 0x20
push ebx
mov edi, 0x4658e0
call fcn.0040ddbc
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov ecx, 0x10
jecxz 0x40df43
cld
repne scasd eax, dword es:[edi]
je 0x40df48
mov edi, 4
sub edi, 4
test edi, edi
jne 0x40dfea
sub esp, 0xc
mov dword [0x4658d0], 0
mov edi, dword [sym.imp.WS2_32.dll_gethostbyname]
push ebx
call edi
add esp, 0xc
test eax, eax
jne 0x40df87
push ecx
push ebx
push str.Cannot_get_host_by_name__s
push dword [0x45c284]
call fcn.0040418c
jmp 0x40e0e3
mov edx, dword [eax + 0xc]
mov edx, dword [edx]
mov esi, dword [edx]
cmp esi, 0x100007f
jne 0x40dfb8
push edx
movsx eax, word [eax + 0xa]
push eax
push str._localhost____u
push dword [0x45c284]
call fcn.0040418c
mov dword [esp], ebx
call edi
add esp, 0xc
test eax, eax
je 0x40df70
sub esp, 0xc
push 0x4658d0
call fcn.00403666
mov eax, dword [0x4658d4]
mov ecx, dword [ebp - 0x3c]
add esp, 0x10
lea edi, [eax*4 + 0x4658e0]
mov dword [eax*4 + 0x4658e0], ecx
inc eax
and eax, 0xf
mov dword [0x4658d4], eax
mov dword [edi + 0x40], esi
mov eax, dword [edi + 0x40]
cmp eax, 0x100007f
mov dword [ebp - 0x30], eax
je 0x40e003
mov dword [0x4658d0], 0
jmp 0x40e059
push eax
mov eax, dword [0x4658d4]
shl eax, 2
sub edi, eax
push edi
push str.2_localhost____u
push dword [0x45c284]
call fcn.0040418c
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
add esp, 0xc
test eax, eax
je 0x40dff7
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, 0x100007f
jne 0x40dfb8
jmp 0x40dff7
lea eax, [ebp - 0x38]
sub esp, 0xc
mov dword [ebp - 0x38], ebx
push eax
call fcn.00410d76
add esp, 0x10
mov dword [ebp - 0x30], eax
mov word [ebp - 0x34], 2
push edi
or edi, 0xffffffff
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edx, eax
test edx, edx
pop eax
jle 0x40e0e9
movzx eax, word [ebp + 0xc]
xchg al, ah
cmp word [ebp - 0x34], 0x17
mov ecx, 0x10
mov word [ebp - 0x32], ax
mov eax, 0x1c
mov dword [ebp - 0x3c], edx
cmovne eax, ecx
push ecx
push eax
lea eax, [ebp - 0x34]
push eax
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov edx, dword [ebp - 0x3c]
test eax, eax
pop esi
mov edi, edx
jns 0x40e0e9
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
sub esp, 0xc
push eax
call fcn.0040376b
mov dword [ebp - 0x3c], eax
call esi
mov edx, dword [ebp - 0x3c]
mov dword [esp], edx
push eax
push ebx
push str.Call_to_connect_to__s_failed___d___s
push dword [0x45c284]
call fcn.0040418c
add esp, 0x14
push edi
call fcn.0040aa80
add esp, 0x10
or edi, 0xffffffff
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret