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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ff87d
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 + 0x440]
push edi
xor edi, edi
cmp eax, edi
je 0x4edd1e
push str.PORT
push eax
call fcn.004ecac0
add esp, 8
jmp 0x4edd73
push 0x20
call sub.MFC71.DLL_operator_new_1
mov ebx, eax
add esp, 4
mov dword [esp + 0x14], ebx
cmp ebx, edi
mov dword [esp + 0x464], edi
je 0x4edd60
mov ecx, ebx
call sub.MFC71.DLL_CAsyncSocket::CAsyncSocket
lea ecx, [ebx + 0x14]
mov dword [ebx], 0x521218
call dword [0x502480]
mov dword [ebx + 8], esi
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
jmp 0x4edd62
xor ebx, ebx
mov dword [esp + 0x464], 0xffffffff
mov dword [esi + 0x440], ebx
mov eax, dword [esi + 0x440]
mov edi, 1
mov dword [eax + 0x18], edi
mov eax, dword [esi + 0x440]
mov dword [eax + 0x10], edi
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 0x4eddce
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 edi
push ecx
mov ecx, dword [esi + 0x440]
call sub.MFC71.DLL_CAsyncSocket::Create
test eax, eax
jne 0x4eddff
mov ecx, dword [esi + 0x440]
push 0
inc ebx
push 0x3f
movzx edx, bx
push edi
push edx
call sub.MFC71.DLL_CAsyncSocket::Create
test eax, eax
je 0x4edde6
mov eax, dword [esi + 0x440]
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 0x4ede93
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 + 0x440]
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 0x4edf33
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 + 0x440]
lea edx, [esp + 0x14]
push edx
lea ecx, [eax + 0x14]
mov byte [esp + 0x468], 4
call dword [0x502474]
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov dword [esi + 0x418], 2
mov esi, dword [esi + 0x440]
lea ecx, [esi + 0x14]
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