Function at 0x409fb0
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x479691
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x740
push ebx
push esi
push edi
mov esi, ecx
call fcn.0040ba30
test al, al
je 0x40a123
push 0x100
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x409ffc
mov byte [esp + 0x38], 0
mov ecx, dword [esi + 0x10]
mov eax, 1
xor ebx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov al, byte [esi + 0xd]
test al, al
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov eax, str.localhost
jne 0x40a036
lea eax, [esp + 0x38]
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
push 0x48294c
push eax
call fcn.0040ba60
add esp, 0x10
cmp eax, ebx
je 0x40a08b
push eax
push str.getaddrinfo
lea ecx, [esp + 0x140]
call fcn.0044ba90
push 0x499810
lea edx, [esp + 0x240]
mov ecx, 0x41
lea esi, [esp + 0x13c]
lea edi, [esp + 0x240]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
mov esi, dword [esp + 0x14]
cmp esi, ebx
je 0x40a103
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x18]
push 2
push ebx
push ebx
push 0x401
lea eax, [esp + 0x350]
push eax
push ecx
push edx
call fcn.0040ba80
add esp, 0x1c
test eax, eax
jne 0x40a0f8
lea eax, [esp + 0x340]
push 0xffffffffffffffff
push eax
call fcn.0044b020
mov edi, eax
add esp, 8
mov dword [esp + 0x10], edi
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x758], ebx
call fcn.004069d0
push edi
mov dword [esp + 0x758], 0xffffffff
call fcn.00459039
add esp, 4
mov esi, dword [esi + 0x1c]
cmp esi, ebx
jne 0x40a093
mov esi, dword [esp + 0x14]
push esi
call fcn.0040bab0
add esp, 4
mov ecx, dword [esp + 0x74c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov al, byte [esi + 0xd]
test al, al
je 0x40a177
push 0xffffffffffffffff
push str.127.0.0.1
call fcn.0044b020
mov esi, eax
add esp, 8
mov dword [esp + 0x10], esi
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x758], 1
call fcn.004069d0
push esi
call fcn.00459039
add esp, 4
mov ecx, dword [esp + 0x74c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
jne 0x40a1c4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.gethostbyname
lea ecx, [esp + 0x244]
call fcn.0044ba90
push 0x499810
lea eax, [esp + 0x13c]
mov ecx, 0x41
lea esi, [esp + 0x240]
lea edi, [esp + 0x13c]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
cmp word [ebx + 8], 2
je 0x40a20b
push str.getMyAddresses:_bad_family
lea ecx, [esp + 0x3c]
push 0x100
push ecx
mov byte [esp + 0x44], 0
call fcn.0044c260
add esp, 0xc
push 0x498d60
lea edx, [esp + 0x13c]
mov ecx, 0x40
lea esi, [esp + 0x3c]
lea edi, [esp + 0x13c]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
mov eax, dword [ebx + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x40a26a
xor esi, esi
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push 0xffffffffffffffff
push eax
call fcn.0044b020
mov edi, eax
add esp, 8
mov dword [esp + 0x10], edi
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x758], 2
call fcn.004069d0
push edi
mov dword [esp + 0x758], 0xffffffff
call fcn.00459039
mov eax, dword [ebx + 0xc]
mov eax, dword [esi + eax + 4]
add esi, 4
add esp, 4
test eax, eax
jne 0x40a216
mov ecx, dword [esp + 0x74c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4