Function at 0x4f0746
Capabilities:
Convert ip address from string
Set socket configuration

Disassembly:
push 0x198
mov eax, 0x7c5eca
call fcn.00720838
movzx eax, word [ebp + 0xc]
xor esi, esi
mov edi, dword [ebp + 8]
inc esi
mov bl, byte [ebp + 0x10]
mov bh, byte [ebp + 0x1c]
mov dword [ebp - 0x19c], eax
mov al, byte [ebp + 0x18]
mov dword [ebp - 0x1a4], edi
mov byte [ebp - 0x191], al
mov dword [ebp - 0x1a0], esi
call fcn.00405a2d
push 4
push eax
lea ecx, [ebp - 0xd8]
call fcn.00404fa8
and dword [ebp - 4], 0
lea eax, [ebp - 0xd8]
push str.Configuring_Listener_socket_on_port
push eax
call fcn.00401ea3
cmp byte [ebp - 0x191], 0
mov edx, str.generic_access
pop ecx
pop ecx
mov ecx, str.local_access_only
mov dword [ebp - 0x198], 0x7dc0cc
cmove ecx, edx
mov edx, str.true
push ecx
push str._and
mov ecx, edx
test bh, bh
cmove ecx, dword [ebp - 0x198]
test bl, bl
push ecx
cmove edx, dword [ebp - 0x198]
mov ecx, eax
push str._for_NonBlockingAccept__
push edx
push str._for_SO_REUSEADDR__
push dword [ebp - 0x19c]
call fcn.004f0435
push eax
call fcn.00401ea3
pop ecx
pop ecx
push eax
call fcn.00401ea3
pop ecx
pop ecx
push eax
call fcn.00401ea3
pop ecx
pop ecx
push eax
call fcn.00401ea3
pop ecx
pop ecx
push eax
call fcn.00401ea3
pop ecx
pop ecx
push eax
call fcn.00401ea3
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
call fcn.004052de
test bl, bl
je 0x4f089a
push 4
lea eax, [ebp - 0x1a0]
push eax
push 4
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x4f089a
call fcn.00405a2d
push 2
push eax
lea ecx, [ebp - 0xd8]
call fcn.00404fa8
push str.Failed_to_set_SO_REUSEADDR_for_listener
lea eax, [ebp - 0xd8]
mov dword [ebp - 4], esi
push eax
call fcn.00401ea3
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
call fcn.004052de
xor al, al
jmp 0x4f0986
test bh, bh
je 0x4f08ca
xor ebx, ebx
inc ebx
push ebx
push edi
call fcn.0050e82c
pop ecx
pop ecx
test al, al
jne 0x4f08cd
call fcn.00405a2d
push 2
pop esi
push esi
push eax
lea ecx, [ebp - 0xd8]
call fcn.00404fa8
push str.Failed_to_set_NonBlockingState_for_listener
jmp 0x4f0877
xor ebx, ebx
inc ebx
xor eax, eax
lea edi, [ebp - 0x20]
cmp byte [ebp - 0x191], 0
stosd dword es:[edi], eax
push 2
pop esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov word [ebp - 0x20], si
je 0x4f0940
lea eax, [ebp - 0x1c]
push eax
push str.127.0.0.1
push esi
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x4f094b
push ebx
push str.AgentErrors.log
lea ecx, [ebp - 0x190]
call fcn.00404fa8
lea eax, [ebp - 0x190]
mov dword [ebp - 4], 3
push str.inet_pton_failed:
push eax
call fcn.00401ea3
pop ecx
pop ecx
mov esi, eax
call fcn.00749863
mov ecx, esi
push dword [eax]
call fcn.0040ae63
lea ecx, [ebp - 0x190]
jmp 0x4f088e
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x19c]
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [ebp - 0x1a4]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x4f0982
push dword [ebp + 0x14]
push dword [esi]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4f0984
xor bl, bl
mov al, bl
call fcn.007207e2
ret