Function at 0x401200
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40491c
push eax
mov dword fs:[0], esp
sub esp, 0x2c0
push ebx
mov ebx, dword [esp + 0x2d4]
push esi
push edi
push 0xffffffffffffffff
push 0
mov ecx, ebx
call sub.MFC42.DLL_CStringArray::SetSize
lea eax, [esp + 0x13c]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4012dd
lea ecx, [esp + 0x3c]
push 0xff
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x4012d7
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x4012d7
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_inet_ntoa]
xor edi, edi
mov eax, dword [esi + 0xc]
mov ecx, dword [edi + eax]
mov edx, dword [ecx]
push edx
call ebp
push eax
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [ebx + 8]
lea ecx, [esp + 0x28]
push ecx
push eax
mov ecx, ebx
mov dword [esp + 0x2e0], 0
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
mov edx, dword [esi + 0xc]
mov dword [esp + 0x2d8], 0xffffffff
movsx eax, word [esi + 0xa]
mov ecx, dword [edi + edx]
add ecx, eax
mov eax, dword [esi]
cmp ecx, eax
lea ecx, [esp + 0x28]
jae 0x4012d1
call sub.MFC42.DLL_CString::CString
add edi, 4
jmp 0x401276
call sub.MFC42.DLL_CString::CString
pop ebp
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebx + 8]
test eax, eax
jg 0x4012f1
push str.127.0.0.1
push eax
mov ecx, ebx
call sub.MFC42.DLL_CStringArray::SetAtGrow
mov edi, dword [ebx + 8]
cmp edi, 1
jne 0x401300
mov eax, edi
jmp 0x40169a
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [esp + 0x28]
mov dword [esp + 0x2d4], 1
call sub.MFC42.DLL_CStringArray::CStringArray
xor esi, esi
mov byte [esp + 0x2d4], 2
test edi, edi
jle 0x40164e
lea edx, [esp + 0xc]
push esi
push edx
mov ecx, ebx
call fcn.00401e70
push str.0.0.0.0
lea ecx, [esp + 0x10]
mov byte [esp + 0x2d8], 3
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jge 0x401634
push str.127.0.0
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
je 0x401634
push 0x4060fc
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x401399
lea eax, [esp + 0xc]
push 1
push eax
push 0
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.192.168.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4013c1
lea ecx, [esp + 0xc]
push 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.16.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4013e9
lea edx, [esp + 0xc]
push 1
push edx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.17.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
je 0x401382
push str.172.18.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x401423
lea ecx, [esp + 0xc]
push 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.19.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x40144b
lea edx, [esp + 0xc]
push 1
push edx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.20.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
je 0x401382
push str.172.21.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x401489
lea ecx, [esp + 0xc]
push 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.22.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4014b1
lea edx, [esp + 0xc]
push 1
push edx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.23.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
je 0x401382
push str.172.24.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4014ef
lea ecx, [esp + 0xc]
push 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.25.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x401517
lea edx, [esp + 0xc]
push 1
push edx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.26.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
je 0x401382
push str.172.27.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x401555
lea ecx, [esp + 0xc]
push 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.28.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x40157d
lea edx, [esp + 0xc]
push 1
push edx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.29.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
je 0x401382
push str.172.30.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4015b8
lea ecx, [esp + 0xc]
push 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.172.31.
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4015dd
lea edx, [esp + 0xc]
push 1
push edx
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CStringArray::InsertAt
jmp 0x401634
push str.192.10
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x4015ff
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push eax
push ecx
lea ecx, [esp + 0x18]
jmp 0x40162f
push str.192.9
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jne 0x401621
mov eax, dword [esp + 0x18]
lea edx, [esp + 0xc]
push edx
push eax
lea ecx, [esp + 0x18]
jmp 0x40162f
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0xc]
push ecx
push edx
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
lea ecx, [esp + 0xc]
mov byte [esp + 0x2d4], 2
call sub.MFC42.DLL_CString::CString
inc esi
cmp esi, edi
jl 0x40132f
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x401664
lea eax, [esp + 0x28]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42.DLL_CStringArray::Append
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CStringArray::Copy
mov esi, dword [ebx + 8]
lea ecx, [esp + 0x28]
mov byte [esp + 0x2d4], 1
call fcn.004045b0
lea ecx, [esp + 0x10]
mov dword [esp + 0x2d4], 0xffffffff
call fcn.004045b0
mov eax, esi
mov ecx, dword [esp + 0x2cc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2cc
ret