Function at 0x4eac80
Capabilities:
Get hostname
Initialize winsock library
Read .ini file
Resolve dns

Disassembly:
push 0xffffffffffffffff
push 0x5134cb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5a4
mov al, byte [0x54aebc]
push ebp
push esi
push edi
mov byte [esp + 0x18], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor esi, esi
lea ecx, [esp + 0xc]
stosb byte es:[edi], al
xor ebp, ebp
mov dword [esp + 0x10], esi
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x118]
push 0x104
push ecx
push esi
mov dword [esp + 0x5c4], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x4ead3d
push esi
lea edx, [esp + 0x324]
push esi
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x124]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__splitpath]
push 0x54a294
lea edx, [esp + 0x338]
push str.IPConfig
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x23c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__makepath]
add esp, 0x28
lea edx, [esp + 0x21c]
lea ecx, [esp + 0xc]
push edx
call fcn.004c8322
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x18]
push eax
push 0xff
push ecx
push 0x54aebc
push str.Default
push str.System
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4eadb3
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x5b8], 0xffffffff
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x5c0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x4eaebb
mov eax, dword [esp + 0xc]
push eax
push esi
push str.IPIndex
push str.System
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea ecx, [esp + 0x18]
push 0x100
push ecx
mov edi, eax
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
jne 0x4eae21
lea edx, [esp + 0x420]
mov ebp, 1
push edx
push 0x101
call sub.WSOCK32.dll_WSAStartup
lea eax, [esp + 0x18]
push 0x100
push eax
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
jne 0x4eae21
lea ecx, [esp + 0xc]
mov dword [esp + 0x5b8], eax
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4eaebb
lea ecx, [esp + 0x18]
push ecx
call sub.WSOCK32.dll_gethostbyname
cmp eax, esi
je 0x4eae9a
mov esi, dword [eax + 0xc]
or edx, 0xffffffff
xor ecx, ecx
cmp dword [esi], 0
je 0x4eae9a
mov eax, esi
cmp ecx, edi
je 0x4eae4d
add eax, 4
inc ecx
cmp dword [eax], 0
jne 0x4eae3e
jmp 0x4eae53
test ecx, ecx
mov edx, ecx
jge 0x4eae5f
test ecx, ecx
jle 0x4eae5b
xor edx, edx
jmp 0x4eae5f
test edx, edx
jl 0x4eae9a
mov edx, dword [esi + edx*4]
mov eax, dword [edx]
push eax
call sub.WSOCK32.dll_inet_ntoa
test eax, eax
je 0x4eae9a
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x5c0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebp, ebp
je 0x4eaea3
call sub.WSOCK32.dll_WSACleanup
lea ecx, [esp + 0xc]
mov dword [esp + 0x5b8], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x5b0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x5b0
ret