Function at 0x4021a0
Capabilities:
Resolve dns

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
test esi, esi
mov dword [0x40e7cc], 0
je 0x402221
push ebx
push 0x1e4
call fcn.00404125
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 8], ebx
je 0x402212
push edi
xor eax, eax
mov ecx, 0x79
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, str._UNKNOWN_
mov edx, ebx
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4021e1
push ebp
push esi
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x402322
cmp word [esp + 0x1c], 0
push esi
je 0x40222b
push str.Cant_parse__s_as_an_IP_address
call fcn.004020f0
push 0x1e4
push str.Hmalloc__d_failed
call fcn.004020f0
push str.gethostpoop_fuxored
call fcn.004020f0
call sub.WS2_32.dll_gethostbyname
mov ebp, eax
test ebp, ebp
jne 0x402247
call sub.WS2_32.dll_WSAGetLastError
push eax
push esi
push str._s:_forward_host_lookup_failed:_h_errno__d
call fcn.004020f0
mov eax, dword [ebp]
push 0x100
push eax
push ebx
call fcn.00404620
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x4022a6
xor esi, esi
lea edi, [ebx + 0x100]
add ebx, 0x1c0
cmp esi, 0x20
jge 0x4022a2
mov ecx, dword [esi + eax]
mov eax, dword [ecx]
push 0x18
push eax
mov dword [ebx], eax
call sub.WS2_32.dll_inet_ntoa
push eax
push edi
call fcn.00404620
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + eax + 4]
add esi, 4
add esp, 0xc
add edi, 0x18
add ebx, 4
test ecx, ecx
jne 0x402270
mov ebx, dword [esp + 0x10]
cmp word [0x40e7b4], 0
je 0x4023d4
mov eax, dword [ebx + 0x1c0]
lea esi, [ebx + 0x1c0]
xor ebp, ebp
test eax, eax
je 0x4023d4
lea edi, [ebx + 0x100]
cmp ebp, 8
jge 0x4023d4
push 2
push 4
push esi
call sub.WS2_32.dll_gethostbyaddr
test eax, eax
je 0x4022f8
cmp dword [eax], 0
je 0x4022f8
push eax
push ebx
call fcn.00402150
add esp, 8
jmp 0x40230c
call sub.WS2_32.dll_WSAGetLastError
push eax
push edi
push str.Warning:_inverse_host_lookup_failed_for__s:_h_errno__d
call fcn.00402060
add esp, 0xc
mov eax, dword [esi + 4]
add esi, 4
inc ebp
add edi, 0x18
test eax, eax
jne 0x4022d0
pop ebp
pop edi
mov eax, ebx
pop ebx
pop esi
pop ecx
ret
mov dword [ebx + 0x1c0], eax
mov edx, dword [esp + 0x18]
push 0xc0
push edx
call sub.WS2_32.dll_inet_ntoa
push eax
lea eax, [ebx + 0x100]
push eax
call fcn.00404620
add esp, 0xc
cmp word [esp + 0x1c], 0
jne 0x4023d4
cmp word [0x40e7b4], 0
je 0x4023d4
push 2
push 4
lea ecx, [esp + 0x20]
push ecx
call sub.WS2_32.dll_gethostbyaddr
test eax, eax
jne 0x40238b
call sub.WS2_32.dll_WSAGetLastError
push eax
push esi
push str._s:_inverse_host_lookup_failed:_h_errno__d
call fcn.00402060
add esp, 0xc
pop ebp
pop edi
mov eax, ebx
pop ebx
pop esi
pop ecx
ret
mov edx, dword [eax]
push 0xfe
push edx
push ebx
call fcn.00404620
add esp, 0xc
push ebx
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4023c0
mov ecx, dword [eax + 0xc]
cmp dword [ecx], 0
je 0x4023c0
push eax
push ebx
call fcn.00402150
add esp, 8
pop ebp
pop edi
mov eax, ebx
pop ebx
pop esi
pop ecx
ret
call sub.WS2_32.dll_WSAGetLastError
push eax
push ebx
push str.Warning:_forward_host_lookup_failed_for__s:_h_errno__d
call fcn.00402060
add esp, 0xc
pop ebp
pop edi
mov eax, ebx
pop ebx
pop esi
pop ecx
ret