Function at 0x40e170
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd8
mov dword [ebp - 8], edx
mov dword [ebp - 0x34], eax
mov eax, 0x4db570
call fcn.004b8f5c
mov word [ebp - 0x20], 8
lea eax, [ebp - 4]
call fcn.00401de4
inc dword [ebp - 0x14]
mov word [ebp - 0x20], 0x14
mov word [ebp - 0x42], 2
lea edx, [ebp - 0x228]
push edx
mov cx, word [ebp - 0x42]
push ecx
call sub.WSOCK32.DLL_WSAStartup
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x40e204
mov word [ebp - 0x20], 0x20
lea edx, [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.004c3194
mov eax, dword [ebp - 8]
mov word [ebp - 0x20], 0x2c
push eax
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3164
pop eax
mov word [ebp - 0x20], 0x20
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x40e3e7
mov cl, byte [ebp - 0x228]
and cl, 0xff
cmp cl, 2
je 0x40e269
movzx eax, word [ebp - 0x228]
shr eax, 8
test al, al
je 0x40e269
call sub.WSOCK32.DLL_WSACleanup
mov word [ebp - 0x20], 0x38
lea edx, [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.004c3194
mov eax, dword [ebp - 8]
mov word [ebp - 0x20], 0x44
push eax
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3164
pop eax
mov word [ebp - 0x20], 0x38
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x40e3e7
push 0x50
lea ecx, [ebp - 0x98]
push ecx
call sub.WSOCK32.DLL_gethostname
inc eax
jne 0x40e2be
mov word [ebp - 0x20], 0x50
lea edx, [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.004c3194
mov eax, dword [ebp - 8]
mov word [ebp - 0x20], 0x5c
push eax
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3164
pop eax
mov word [ebp - 0x20], 0x50
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x40e3e7
lea ecx, [ebp - 0x98]
push ecx
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x40e317
mov word [ebp - 0x20], 0x68
lea edx, [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.004c3194
mov eax, dword [ebp - 8]
mov word [ebp - 0x20], 0x74
push eax
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3164
pop eax
mov word [ebp - 0x20], 0x68
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x40e3e7
push 0
push 4
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004b8bc8
add esp, 0xc
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0xc]
mov ecx, dword [edx]
mov eax, dword [ecx]
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x3c]
call sub.WSOCK32.DLL_inet_ntoa
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x40e386
mov word [ebp - 0x20], 0x80
lea edx, [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.004c3194
mov eax, dword [ebp - 8]
mov word [ebp - 0x20], 0x8c
push eax
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3164
pop eax
mov word [ebp - 0x20], 0x80
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x40e3e7
call sub.WSOCK32.DLL_WSACleanup
mov word [ebp - 0x20], 0x98
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x40]
call fcn.004c3004
mov edx, eax
inc dword [ebp - 0x14]
mov eax, dword [ebp - 8]
call fcn.004c3194
mov eax, dword [ebp - 8]
mov word [ebp - 0x20], 0xa4
push eax
dec dword [ebp - 0x14]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004c3164
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3164
pop eax
mov word [ebp - 0x20], 0x98
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret