Function at 0x4f9650
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x74], eax
xor eax, eax
push ebx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x90], eax
movzx eax, word [ebp + 0x10]
push eax
mov ecx, 1
push 0x6b3178
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0x8c], ecx
lea ecx, [ebp - 0x24]
xor edi, edi
push 0x20
push ecx
mov dword [ebp - 0x6c], edi
xor ebx, ebx
mov dword [ebp - 0x70], edi
lea edx, [ebp - 0x94]
call sym.postgres.exe_pg_snprintf
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x24]
push ecx
push esi
call sym.postgres.exe_pg_getaddrinfo_all
mov edi, eax
add esp, 0x20
test edi, edi
jne 0x4f9930
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x4f9930
mov esi, eax
mov dword [ebp - 0x68], esi
nop
mov edi, dword [ebp + 0x1c]
cmp ebx, edi
jge 0x4f9725
mov edx, dword [ebp - 0x74]
cmp dword [edx + ebx*4], 0xffffffff
je 0x4f9786
inc ebx
cmp ebx, edi
jl 0x4f9717
push 0
push 0x6d2c50
push 0x152
push str.src_backendlibpqpqcomm.c
push 0xf
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4f9758
push edi
push str.could_not_bind_to_all_requested_addresses:_MAXLISTEN___d__exceeded
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x90]
push edx
push eax
call sym.postgres.exe_pg_freeaddrinfo_all
mov eax, dword [ebp - 0x70]
add esp, 8
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
dec eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
cmp ebx, edi
jge 0x4f9725
mov ecx, dword [esi + 4]
mov eax, ecx
sub eax, 2
je 0x4f97c2
sub eax, 0x15
je 0x4f97bb
push ecx
push str.unrecognized_address_family__d
call sub.libintl.dll_libintl_gettext
add esp, 4
push eax
lea eax, [ebp - 0x64]
push 0x40
push eax
call sym.postgres.exe_pg_snprintf
add esp, 0x10
lea edi, [ebp - 0x64]
jmp 0x4f97d1
push str.IPv6
jmp 0x4f97c7
push str.IPv4
call sub.libintl.dll_libintl_gettext
mov edi, eax
add esp, 4
mov ecx, dword [esi + 4]
push 0
push 1
push ecx
call sym.postgres.exe_pgwin32_socket
mov esi, eax
mov eax, dword [ebp - 0x68]
add esp, 0xc
cmp dword [eax + 4], 0x17
jne 0x4f984f
push 4
lea edx, [ebp - 0x98]
push edx
push 0x1b
push 0x29
push esi
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4f984c
push 0
push 0x6d2c50
push 0x19b
push str.src_backendlibpqpqcomm.c
push 0xf
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4f9840
push str.setsockopt_IPV6_V6ONLY__failed:__m
call sym.postgres.exe_errmsg
add esp, 4
push eax
call sym.postgres.exe_errcode_for_socket_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
jmp 0x4f9918
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
push ecx
push edx
push esi
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jns 0x4f98ba
push 0
push 0x6d2c50
push 0x1b6
push str.src_backendlibpqpqcomm.c
push 0xf
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4f98b1
movzx eax, word [ebp + 0x10]
push eax
push str.Is_another_postmaster_already_running_on_port__d__If_not__wait_a_few_seconds_and_retry.
call sym.postgres.exe_errhint
add esp, 8
push eax
push edi
push str.could_not_bind__s_socket:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_socket_access
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
jmp 0x4f9918
mov eax, dword [sym.postgres.exe_MaxBackends]
add eax, eax
cmp eax, 0x2710
jle 0x4f98cd
mov eax, 0x2710
push eax
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
jns 0x4f990f
push 0
push 0x6d2c50
push 0x1d6
push str.src_backendlibpqpqcomm.c
push 0xf
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4f9840
push edi
push str.could_not_listen_on__s_socket:__m
call sym.postgres.exe_errmsg
add esp, 8
jmp 0x4f9831
mov eax, dword [ebp - 0x74]
inc dword [ebp - 0x70]
mov dword [eax + ebx*4], esi
mov ecx, dword [ebp - 0x68]
mov eax, dword [ecx + 0x1c]
mov dword [ebp - 0x68], eax
test eax, eax
je 0x4f9758
mov esi, eax
jmp 0x4f9710
push 0
push 0x6d2c50
test esi, esi
je 0x4f9974
push 0x133
push str.src_backendlibpqpqcomm.c
push 0xf
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4f99aa
push edi
call sym.postgres.exe_pg_gai_strerror
push eax
lea ecx, [ebp - 0x24]
push ecx
push esi
push str.could_not_translate_host_name___s___service___s__to_address:__s
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 0x18
jmp 0x4f99aa
push 0x137
push str.src_backendlibpqpqcomm.c
push 0xf
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4f99aa
push edi
call sym.postgres.exe_pg_gai_strerror
push eax
lea edx, [ebp - 0x24]
push edx
push str.could_not_translate_service___s__to_address:__s
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 0x14
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x4f99c1
push eax
mov eax, dword [ebp - 0x90]
push eax
call sym.postgres.exe_pg_freeaddrinfo_all
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret