Function at 0x4e80c0
Capabilities:
Get hostname
Get local ipv4 addresses
Get socket information
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ff60d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x450
mov eax, dword [0x540cc0]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x450], eax
mov eax, dword [esi + 0x448]
test eax, eax
push edi
je 0x4e810c
push 0x520e60
push eax
call fcn.004e7980
add esp, 8
jmp 0x4e8146
push 0x1c
call sub.MFC71.DLL_operator_new_1
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov dword [esp + 0x464], 0
je 0x4e8133
push esi
mov ecx, eax
call fcn.004e7460
jmp 0x4e8135
xor eax, eax
mov dword [esp + 0x464], 0xffffffff
mov dword [esi + 0x448], eax
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 4]
push edx
push eax
mov ebx, 0x613
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4e818a
mov eax, dword [esp + 0x22]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ebx, eax
push 0
push 0x3f
movzx ecx, bx
push 1
push ecx
mov ecx, dword [esi + 0x448]
call sub.MFC71.DLL_CAsyncSocket::Create
test eax, eax
jne 0x4e81bd
mov ecx, dword [esi + 0x448]
push 0
inc ebx
push 0x3f
movzx edx, bx
push 1
push edx
call sub.MFC71.DLL_CAsyncSocket::Create
test eax, eax
je 0x4e81a3
mov eax, dword [esi + 0x448]
mov eax, dword [eax + 4]
push 5
push eax
call dword [sym.imp.WS2_32.dll_listen]
mov byte [esp + 0x50], 0
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x31], ecx
mov dword [esp + 0x35], ecx
mov dword [esp + 0x39], ecx
mov dword [esp + 0x3d], ecx
mov dword [esp + 0x41], ecx
mov dword [esp + 0x45], ecx
mov dword [esp + 0x49], ecx
stosw word es:[edi], ax
mov byte [esp + 0x4d], cl
push 0x515c28
lea ecx, [esp + 0x20]
stosb byte es:[edi], al
mov byte [esp + 0x34], 0
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_2]
movzx edi, bx
push edi
lea edx, [esp + 0x20]
push 0x520e5c
push edx
mov dword [esp + 0x470], 1
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
mov ebx, edi
add esp, 0xc
shr ebx, 8
and edi, 0x800000ff
jns 0x4e8251
dec edi
or edi, 0xffffff00
inc edi
push 0x400
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov eax, dword [eax]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor edx, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x10], 0x10
call dword [0x502480]
mov eax, dword [esi + 0x448]
mov eax, dword [eax + 4]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push eax
mov byte [esp + 0x470], 2
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4e82f1
mov eax, dword [esp + 0x22]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x1c]
call dword [0x502590]
lea ecx, [esp + 0xc]
call dword [0x502480]
push edi
push ebx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x18]
push str._s__d__d
push eax
mov byte [esp + 0x478], 3
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0x14
push 0x2c
push 0x2e
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Replace_1]
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x18]
call dword [0x502470]
mov eax, dword [esi + 0x448]
lea edx, [esp + 0x14]
push edx
lea ecx, [eax + 0x18]
mov byte [esp + 0x468], 4
call dword [0x502474]
lea ecx, [esp + 0x14]
mov byte [esp + 0x464], 3
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov eax, dword [esi + 0x418]
push 2
push eax
push str.chage__d_to_status__d_r_n
push esi
call fcn.004e77b0
add esp, 0x10
lea ecx, [esp + 0xc]
mov dword [esi + 0x418], 2
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
mov ecx, dword [esi + 0x440]
push eax
add ecx, 0x47c
call dword [0x502590]
mov esi, dword [esi + 0x448]
lea ecx, [esi + 0x18]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
lea ecx, [esp + 0xc]
mov esi, eax
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x1c]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov ecx, dword [esp + 0x45c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x454]
mov eax, esi
call fcn.004f2f91
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret