Function at 0x404480
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1e4
mov eax, dword [0x453544]
xor eax, esp
mov dword [esp + 0x1e0], eax
push ebx
push esi
push edi
lea eax, [esp + 0x48]
push eax
mov esi, ecx
push 0x202
mov dword [esp + 0x38], esi
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov eax, dword [esi]
mov dword [esp + 0xc], eax
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4044c0
sub eax, edx
sar eax, 1
mov esi, eax
lea edi, [esi + esi + 2]
push edi
call fcn.0040c001
mov edx, dword [esp + 0x10]
add esp, 4
lea ecx, [esp + 0x34]
push ecx
push 0
push edi
mov ebx, eax
push ebx
push esi
push edx
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push str.localhost
push ebx
mov byte [eax + ebx], 0
call fcn.004394d0
add esp, 8
test eax, eax
je 0x40478c
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov ecx, str.127.0.0.1
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404547
test dx, dx
je 0x404543
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404547
add eax, 4
add ecx, 4
test dx, dx
jne 0x404521
xor eax, eax
jmp 0x40454c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40478c
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
push ebx
mov esi, eax
call fcn.0040bffc
add esp, 4
test esi, esi
je 0x404775
movsx ecx, word [esi + 0xa]
movsx edx, word [esi + 8]
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esi]
push edx
push eax
push ecx
push str.name_s_naliases_s_naddrtype_d_nlength_d_n
call fcn.00427c67
mov edi, dword [esi + 0xc]
xor eax, eax
add esp, 0x14
cmp dword [edi], eax
je 0x4045b9
test eax, eax
jne 0x4045b9
movsx edx, word [esi + 0xa]
mov eax, dword [edi]
push edx
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.0042edd0
add esp, 0xc
cmp dword [edi + 4], 0
mov eax, 1
jne 0x404595
mov edx, dword [esp + 0x3c]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4045d0
sub eax, edx
add eax, 1
push eax
lea eax, [esp + 0x1dc]
push esi
push eax
call fcn.00427d30
add esp, 0xc
xor edi, edi
mov dword [esp + 0xc], edi
jmp 0x404600
push 0x447e2c
push esi
call fcn.00427e60
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x404635
mov edi, ebx
sub edi, esi
push edi
lea ecx, [esp + 0x1dc]
push esi
push ecx
call fcn.00427d30
mov byte [esp + edi + 0x1e4], 0
mov edi, dword [esp + 0x18]
jmp 0x40465d
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404640
sub eax, edx
add eax, 1
push eax
lea edx, [esp + 0x1dc]
push esi
push edx
call fcn.00427d30
lea eax, [esp + 0x1e4]
add esp, 0xc
push eax
call fcn.00427ef7
mov dword [esp + edi*4 + 0x3c], eax
add edi, 1
add esp, 4
cmp edi, 4
lea esi, [ebx + 1]
mov dword [esp + 0xc], edi
jl 0x404600
mov eax, 0xa
xor edx, edx
mov esi, 0xff
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
xor eax, eax
mov ecx, dword [esp + eax*4 + 0x38]
cmp dword [esp + eax*4 + 0x10], ecx
jg 0x4046cd
cmp ecx, dword [esp + eax*4 + 0x20]
jg 0x4046cd
add eax, 1
cmp eax, 4
jl 0x4046b5
cmp eax, 4
je 0x40478c
mov eax, 0xac
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], 0x1f
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
xor eax, eax
mov ecx, dword [esp + eax*4 + 0x38]
cmp dword [esp + eax*4 + 0x10], ecx
jg 0x40471d
cmp ecx, dword [esp + eax*4 + 0x20]
jg 0x40471d
add eax, 1
cmp eax, 4
jl 0x404705
cmp eax, 4
je 0x40478c
mov eax, 0xa8
mov ecx, 0xc0
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0x22b
xor eax, eax
mov ecx, dword [esp + eax*4 + 0x38]
cmp dword [esp + eax*4 + 0x10], ecx
jg 0x40476a
cmp ecx, dword [esp + eax*4 + 0x20]
jg 0x40476a
add eax, 1
cmp eax, 4
jl 0x404752
cmp eax, 4
je 0x40478c
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1e0]
xor ecx, esp
call fcn.0042769e
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x1ec]
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.0042769e
mov esp, ebp
pop ebp
ret