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

Disassembly:
push 0x198
mov eax, 0x79fe1e
call fcn.006fee7b
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.004056b5
push 4
push eax
lea ecx, [ebp - 0xd8]
call fcn.00404c30
and dword [ebp - 4], 0
lea eax, [ebp - 0xd8]
push str.Configuring_Listener_socket_on_port
push eax
call fcn.00401b53
cmp byte [ebp - 0x191], 0
mov edx, str.generic_access
pop ecx
pop ecx
mov ecx, str.local_access_only
mov dword [ebp - 0x198], 0x7b7068
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.004d26d3
push eax
call fcn.00401b53
pop ecx
pop ecx
push eax
call fcn.00401b53
pop ecx
pop ecx
push eax
call fcn.00401b53
pop ecx
pop ecx
push eax
call fcn.00401b53
pop ecx
pop ecx
push eax
call fcn.00401b53
pop ecx
pop ecx
push eax
call fcn.00401b53
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
call fcn.00404f66
test bl, bl
je 0x4d2b38
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 0x4d2b38
call fcn.004056b5
push 2
push eax
lea ecx, [ebp - 0xd8]
call fcn.00404c30
push str.Failed_to_set_SO_REUSEADDR_for_listener
lea eax, [ebp - 0xd8]
mov dword [ebp - 4], esi
push eax
call fcn.00401b53
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
call fcn.00404f66
xor al, al
jmp 0x4d2c24
test bh, bh
je 0x4d2b68
xor ebx, ebx
inc ebx
push ebx
push edi
call fcn.004fc84a
pop ecx
pop ecx
test al, al
jne 0x4d2b6b
call fcn.004056b5
push 2
pop esi
push esi
push eax
lea ecx, [ebp - 0xd8]
call fcn.00404c30
push str.Failed_to_set_NonBlockingState_for_listener
jmp 0x4d2b15
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 0x4d2bde
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 0x4d2be9
push ebx
push str.AgentErrors.log
lea ecx, [ebp - 0x190]
call fcn.00404c30
lea eax, [ebp - 0x190]
mov dword [ebp - 4], 3
push str.inet_pton_failed:
push eax
call fcn.00401b53
pop ecx
pop ecx
mov esi, eax
call fcn.00727de3
mov ecx, esi
push dword [eax]
call fcn.0040aa1d
lea ecx, [ebp - 0x190]
jmp 0x4d2b2c
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 0x4d2c20
push dword [ebp + 0x14]
push dword [esi]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4d2c22
xor bl, bl
mov al, bl
call fcn.006fee25
ret