Function at 0x4726a0
Capabilities:
Check if file exists
Get common file path
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x4e412c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push str.LTaddPort_P2P98_OEM___start_n
push 0
call fcn.004718a0
add esp, 8
mov al, byte [0x4cc00f]
mov byte [ebp - 0x130], al
xor ecx, ecx
mov dword [ebp - 0x12f], ecx
mov dword [ebp - 0x12b], ecx
mov dword [ebp - 0x127], ecx
mov word [ebp - 0x123], cx
mov byte [ebp - 0x121], cl
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x472710
cmp dword [ebp - 0x120], 0xffffffff
jne 0x47277f
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
je 0x47277d
push 4
mov ecx, dword [ebp - 0x138]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00489120
add esp, 0xc
mov edx, dword [ebp - 0x13c]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.00489ae0
add esp, 8
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x130]
push edx
push str.LTaddPort_P2P98_OEM___host_addr_is___s____s__n
push 0
call fcn.004718a0
add esp, 0x10
jmp 0x472792
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x130]
push ecx
call fcn.00489ae0
add esp, 8
push 0x104
lea edx, [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x4cc78c
lea eax, [ebp - 0x118]
push eax
call fcn.00489af0
add esp, 8
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x118]
push edx
call fcn.00489af0
add esp, 8
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4727f2
push str.LTaddPort_P2P98_OEM___setting_ini_file_not_found_n
push 0
call fcn.004718a0
add esp, 8
xor eax, eax
jmp 0x472953
push 0x4cc7c4
lea ecx, [ebp - 0x118]
push ecx
call fcn.0048dd3f
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x472825
push str.LTaddPort_P2P98_OEM___cant_open_setting_ini_file_n
push 0
call fcn.004718a0
add esp, 8
xor eax, eax
jmp 0x472953
lea edx, [ebp - 0x11c]
push edx
call fcn.004609e0
add esp, 4
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
jmp 0x472849
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x100
jge 0x4728d7
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0x18]
push edx
lea eax, [ebp - 0x130]
push eax
push str._s:_s_d
push 0x53fc50
call fcn.00489bd8
add esp, 0x14
mov dword [ebp - 0x134], 0
jmp 0x472892
mov ecx, dword [ebp - 0x134]
add ecx, 1
mov dword [ebp - 0x134], ecx
mov edx, dword [ebp - 0x134]
cmp edx, dword [ebp - 4]
jge 0x4728c5
push 0x53fc50
mov eax, dword [ebp - 0x134]
shl eax, 4
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ecx + eax]
push edx
call fcn.004405d0
add esp, 8
test eax, eax
jne 0x4728c3
jmp 0x4728c5
jmp 0x472883
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 4]
jl 0x4728d2
jmp 0x4728d7
jmp 0x472840
mov ecx, dword [ebp - 0x11c]
push ecx
call fcn.00460db0
add esp, 4
push 2
push 0
mov edx, dword [ebp - 0xc]
push edx
call fcn.0048e9b7
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
push 0x53fc50
push str.IP____s___s__9100_n
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.0048e7e1
add esp, 0x10
mov edx, dword [ebp - 0xc]
push edx
call fcn.0048da78
add esp, 4
push 0x53fc51
push str.LTaddPort_P2P98_OEM___successfully_added_port_as__s_n
push 0
call fcn.004718a0
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
call fcn.004609e0
add esp, 4
mov ecx, dword [ebp - 0x11c]
push ecx
call fcn.00460db0
add esp, 4
mov eax, 0x53fc50
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00488550
mov esp, ebp
pop ebp
ret