Function at 0x402830
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
call fcn.0040651c
mov edi, dword [ebp + 8]
mov dword [eax], 0
test edi, edi
je 0x402a81
push 0x1e4
call fcn.004057d0
add esp, 4
mov esi, eax
mov dword [ebp - 0xc], esi
push 0x1e4
test esi, esi
je 0x402a77
push 0
push esi
call fcn.00407370
mov ecx, str._UNKNOWN_
mov edx, esi
add esp, 0xc
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x402882
push edi
call sub.WS2_32.dll_inet_addr
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x4029a4
cmp word [ebp + 0xc], 0
push edi
jne 0x402a5c
call sub.WS2_32.dll_gethostbyname
mov ebx, eax
mov dword [ebp + 8], ebx
test ebx, ebx
je 0x402a66
push 0x100
push dword [ebx]
push esi
call fcn.00406a60
mov eax, dword [ebx + 0xc]
add esp, 0xc
cmp dword [eax], 0
je 0x402924
lea ecx, [esi + 0x1c0]
lea ebx, [esi + 0x100]
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 8], ecx
lea ebx, [ebx]
cmp edi, 0x20
jge 0x402921
mov eax, dword [edi + eax]
push 0x18
mov eax, dword [eax]
push eax
mov dword [edi + ecx], eax
call sub.WS2_32.dll_inet_ntoa
push eax
push ebx
call fcn.00406a60
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 8]
add edi, 4
add esp, 0xc
add ebx, 0x18
cmp dword [edi + eax], 0
jne 0x4028f0
mov esi, dword [ebp - 0xc]
cmp word [0x41d1f0], 0
je 0x402a53
lea edi, [esi + 0x1c0]
xor ebx, ebx
cmp dword [edi], ebx
je 0x402a53
lea eax, [esi + 0x100]
mov dword [ebp + 8], eax
jmp 0x402950
cmp ebx, 8
jge 0x402a53
push 2
push 4
push edi
call sub.WS2_32.dll_gethostbyaddr
test eax, eax
je 0x402978
cmp dword [eax], 0
je 0x402978
push eax
push esi
call fcn.00402210
add esp, 8
jmp 0x40298e
call sub.WS2_32.dll_WSAGetLastError
push eax
push dword [ebp + 8]
push str.Warning:_inverse_host_lookup_failed_for__s:_h_errno__d
call fcn.00402c20
add esp, 0xc
add dword [ebp + 8], 0x18
add edi, 4
inc ebx
cmp dword [edi], 0
jne 0x402950
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xc0
mov dword [esi + 0x1c0], eax
push dword [ebp - 4]
call sub.WS2_32.dll_inet_ntoa
push eax
lea eax, [esi + 0x100]
push eax
call fcn.00406a60
add esp, 0xc
cmp word [ebp + 0xc], 0
jne 0x402a53
cmp word [0x41d1f0], 0
je 0x402a53
push 2
push 4
lea eax, [ebp - 4]
push eax
call sub.WS2_32.dll_gethostbyaddr
test eax, eax
jne 0x402a0a
call sub.WS2_32.dll_WSAGetLastError
push eax
push edi
push str._s:_inverse_host_lookup_failed:_h_errno__d
call fcn.00402c20
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xfe
push dword [eax]
push esi
call fcn.00406a60
add esp, 0xc
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x402a3f
mov ecx, dword [eax + 0xc]
cmp dword [ecx], 0
je 0x402a3f
push eax
push esi
call fcn.00402210
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call sub.WS2_32.dll_WSAGetLastError
push eax
push esi
push str.Warning:_forward_host_lookup_failed_for__s:_h_errno__d
call fcn.00402c20
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Cant_parse__s_as_an_IP_address
call fcn.004021c0
call sub.WS2_32.dll_WSAGetLastError
push eax
push edi
push str._s:_forward_host_lookup_failed:_h_errno__d
call fcn.004021c0
push str.Hmalloc__d_failed
call fcn.004021c0
push str.gethostpoop_fuxored
call fcn.004021c0
int3