Function at 0x40d584
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
call fcn.00401893
call fcn.00401460
push 0x458700
call fcn.00401bc2
add esp, 4
push 0x40
lea eax, [ebp - 0xc0]
push eax
call sub.WSOCK32.dll_gethostname
test eax, eax
jge 0x40d5d7
push str.Cant_get_hostname
push 2
push 0xce
push 0x458724
call fcn.0040111d
add esp, 0x10
or eax, 0xffffffff
jmp 0x40d8ad
lea ecx, [ebp - 0xc0]
push ecx
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 0x1c8], eax
cmp dword [ebp - 0x1c8], 0
jne 0x40d613
push str.Cant_get_host_address
push 2
push 0xd2
push 0x458754
call fcn.0040111d
add esp, 0x10
or eax, 0xffffffff
jmp 0x40d8ad
mov edx, dword [ebp - 0x1c8]
movsx eax, word [edx + 0xa]
push eax
mov ecx, dword [ebp - 0x1c8]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x1cc]
push ecx
call fcn.0042e3c0
add esp, 0xc
push 0x80
lea edx, [ebp - 0x24c]
push edx
call fcn.004444d0
add esp, 8
lea eax, [ebp - 0x24c]
mov dword [ebp - 0xc4], eax
jmp 0x40d66a
mov ecx, dword [ebp - 0xc4]
add ecx, 1
mov dword [ebp - 0xc4], ecx
mov edx, dword [ebp - 0xc4]
movsx eax, byte [edx]
test eax, eax
je 0x40d690
mov ecx, dword [ebp - 0xc4]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x40d68e
mov eax, dword [ebp - 0xc4]
mov byte [eax], 0x2f
jmp 0x40d65b
push 0x2f
lea ecx, [ebp - 0x24c]
push ecx
call fcn.0042e8d0
add esp, 8
mov dword [ebp - 0xc4], eax
cmp dword [ebp - 0xc4], 0
je 0x40d6b9
mov edx, dword [ebp - 0xc4]
mov byte [edx], 0
push 0x80
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x80]
push ecx
call fcn.00401b4f
add esp, 0xc
mov edx, dword [0x4586cc]
push edx
lea eax, [ebp - 0x80]
push eax
push 0x45876c
lea ecx, [ebp - 0x1c4]
push ecx
call fcn.0042f0b0
add esp, 0x10
lea edx, [ebp - 0x1c4]
push edx
call fcn.0040146f
add esp, 4
mov eax, dword [ebp - 0x1cc]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov dword [ebp - 0xc4], eax
mov ecx, dword [ebp - 0xc4]
push ecx
call fcn.0042c0e0
add esp, 4
add eax, 1
cmp eax, 0x100
jae 0x40d744
mov edx, dword [ebp - 0xc4]
push edx
call fcn.0042c0e0
add esp, 4
add eax, 1
mov dword [ebp - 0x250], eax
jmp 0x40d74e
mov dword [ebp - 0x250], 0x100
mov eax, dword [ebp - 0x250]
push eax
mov ecx, dword [ebp - 0xc4]
push ecx
lea edx, [ebp - 0x1c4]
push edx
call fcn.00401b4f
add esp, 0xc
lea eax, [ebp - 0x1c4]
push eax
call fcn.004016fe
add esp, 4
mov ecx, dword [ebp - 0x1c8]
mov edx, dword [ecx]
push edx
call fcn.0042c0e0
add esp, 4
add eax, 1
cmp eax, 0x100
jae 0x40d7b1
mov eax, dword [ebp - 0x1c8]
mov ecx, dword [eax]
push ecx
call fcn.0042c0e0
add esp, 4
add eax, 1
mov dword [ebp - 0x254], eax
jmp 0x40d7bb
mov dword [ebp - 0x254], 0x100
mov edx, dword [ebp - 0x254]
push edx
mov eax, dword [ebp - 0x1c8]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x1c4]
push edx
call fcn.00401b4f
add esp, 0xc
lea eax, [ebp - 0x1c4]
push eax
call fcn.004017e9
add esp, 4
push str.default.asp
call fcn.004016b8
add esp, 4
mov ecx, dword [0x4586d0]
push ecx
call fcn.00401b04
add esp, 4
mov edx, dword [0x4586d8]
push edx
mov eax, dword [0x4586d4]
push eax
call fcn.0040127b
add esp, 8
push 1
push 0x401bd1
push 0
push 0
push 0x460b90
call fcn.00401370
add esp, 0x14
push 0
push 0x40169f
push 0
push 0
push str._goform
call fcn.00401370
add esp, 0x14
push 0
push 0x401569
push 0
push 0
push str._cgi_bin
call fcn.00401370
add esp, 0x14
push 2
push 0x40167c
push 0
push 0
push 0x460b94
call fcn.00401370
add esp, 0x14
call fcn.00401b81
call fcn.0040114f
call fcn.00401339
push 0
push 0x40ea22
push 0
push 0
push 0x458794
call fcn.00401370
add esp, 0x14
mov dword [0x460b8c], 0x14
xor eax, eax
mov esp, ebp
pop ebp
ret