Function at 0x1400012c0
Capabilities:
Get socket status

Disassembly:
push rbp
push r12
push r13
push r15
lea rbp, [rsp - 0x1a8]
sub rsp, 0x2a8
mov rax, qword [0x1400114e0]
xor rax, rsp
mov qword [rbp + 0x190], rax
xor r13d, r13d
or r12, 0xffffffffffffffff
mov qword [rsp + 0x30], r13
mov qword [0x140011530], r13
mov qword [0x140011538], r13
call sub.LIBPQ.dll_Ordinal_77
cmp qword [0x140011da8], r13
mov r15, rax
jne 0x140001328
call fcn.140004c40
mov qword [0x140011da8], rax
test rax, rax
je 0x140001c24
cmp dword [0x140011508], r13d
mov qword [rsp + 0x2d0], rbx
mov qword [rsp + 0x2d8], rsi
mov qword [rsp + 0x2e0], rdi
je 0x140001396
mov rdi, qword [0x140011510]
lea rcx, str._s:_starting_log_streaming_at__X__X__slot__s__n
shr rdi, 0x20
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rbx, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov rax, qword [0x140011da0]
mov r9d, edi
mov qword [rsp + 0x28], rax
mov eax, dword [0x140011510]
mov rdx, rbx
mov dword [rsp + 0x20], eax
call fcn.140007ec0
mov rax, qword [0x140011510]
mov r8, qword [0x140011da0]
lea rdx, str.START_REPLICATION_SLOT___s__LOGICAL__X__X
mov r9, rax
mov rcx, r15
mov dword [rsp + 0x20], eax
shr r9, 0x20
call sub.LIBPQ.dll_Ordinal_91
mov rcx, qword [0x140011520]
test rcx, rcx
je 0x1400013e0
lea rdx, [0x14000cf2c]
mov rcx, r15
call sub.LIBPQ.dll_Ordinal_75
mov rcx, qword [0x140011520]
mov ebx, r13d
test rcx, rcx
je 0x140001468
mov rdi, r13
mov esi, 8
test ebx, ebx
jle 0x140001407
lea rdx, [0x14000cf30]
mov rcx, r15
call sub.LIBPQ.dll_Ordinal_75
mov r8, qword [0x140011550]
lea rdx, str.__s_
mov rcx, r15
mov r8, qword [rdi + r8]
call sub.LIBPQ.dll_Ordinal_91
mov rax, qword [0x140011550]
mov r8, qword [rax + rsi]
test r8, r8
je 0x140001440
lea rdx, str.__s
mov rcx, r15
call sub.LIBPQ.dll_Ordinal_91
mov rcx, qword [0x140011520]
inc ebx
add rdi, 0x10
movsxd rax, ebx
add rsi, 0x10
cmp rax, rcx
jb 0x1400013f4
test rcx, rcx
je 0x140001468
mov dl, 0x29
mov rcx, r15
call sub.LIBPQ.dll_Ordinal_68
mov rdx, qword [r15]
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_21
mov rcx, rax
mov rsi, rax
call sub.LIBPQ.dll_Ordinal_33
mov rcx, rsi
cmp eax, 8
je 0x1400014d0
call sub.LIBPQ.dll_Ordinal_65
lea rcx, str._s:_could_not_send_replication_command___s_:__s
mov rbx, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r9, qword [r15]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call fcn.140007ec0
mov rcx, rsi
call sub.LIBPQ.dll_Ordinal_48
jmp 0x140001bdd
call sub.LIBPQ.dll_Ordinal_48
mov rcx, r15
call sub.LIBPQ.dll_Ordinal_70
cmp dword [0x140011508], r13d
je 0x14000150f
lea rcx, str._s:_streaming_initiated_n
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rbx, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov rdx, rbx
call fcn.140007ec0
mov eax, dword [0x14001151c]
mov qword [rsp + 0x2a0], r14
test eax, eax
jne 0x140001842
lea r14d, [rax + 1]
nop dword [rax]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140001544
call sub.LIBPQ.dll_Ordinal_95
mov qword [rsp + 0x30], r13
call fcn.140005750
cmp dword [0x1400112d0], 0xffffffff
mov rsi, rax
je 0x14000157f
mov r8d, dword [0x1400112c4]
mov rcx, qword [0x1400112d8]
mov rdx, rax
call fcn.1400057e0
test al, al
je 0x14000157f
mov rcx, rsi
call fcn.140001e40
test al, al
je 0x140001bd5
mov r8d, dword [0x1400112c0]
test r8d, r8d
jle 0x1400015ba
mov rdx, rsi
mov rcx, r12
call fcn.1400057e0
test al, al
je 0x1400015ba
mov rcx, qword [0x140011da8]
xor r9d, r9d
mov r8b, 1
mov rdx, rsi
call fcn.140001c80
test al, al
je 0x140001bd5
mov r12, rsi
cmp dword [0x1400112d0], 0xffffffff
je 0x140001619
mov eax, dword [0x140011528]
test eax, eax
je 0x140001619
mov rcx, qword [0x140011500]
movzx eax, byte [rcx]
cmp al, byte [reloc.LIBPQ.dll_Ordinal_45]
jne 0x1400015eb
movzx eax, byte [rcx + 1]
cmp al, byte [0x14000cf95]
je 0x140001619
call fcn.140005750
mov rcx, rax
mov rsi, rax
call fcn.140001e40
test al, al
je 0x140001bd5
mov ecx, dword [0x1400112d0]
call qword [sym.imp.MSVCR120.dll__close]
mov dword [0x1400112d0], 0xffffffff
cmp dword [0x1400112d0], 0xffffffff
mov dword [0x140011528], r13d
jne 0x140001710
mov rcx, qword [0x140011500]
movzx eax, byte [rcx]
cmp al, byte [reloc.LIBPQ.dll_Ordinal_45]
jne 0x14000165d
movzx eax, byte [rcx + 1]
cmp al, byte [0x14000cf95]
jne 0x14000165d
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rcx, [rax + 0x30]
call qword [sym.imp.MSVCR120.dll__fileno]
jmp 0x140001675
mov rcx, qword [0x140011500]
mov edx, 0x8109
mov r8d, 0x180
call qword [sym.imp.MSVCR120.dll__open]
mov dword [0x1400112d0], eax
cmp eax, 0xffffffff
je 0x140001a3e
lea rdx, [rsp + 0x48]
mov ecx, eax
call qword [sym.imp.MSVCR120.dll__fstat64i32]
test eax, eax
je 0x1400016db
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rcx, str._s:_could_not_stat_file___s_:__s_n
mov rbx, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r9, qword [0x140011500]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call fcn.140007ec0
movzx eax, word [rsp + 0x4e]
mov ecx, 0xf000
and ax, cx
mov ecx, 0x8000
cmp ax, cx
jne 0x140001709
mov ecx, dword [0x1400112d0]
call qword [sym.imp.MSVCR120.dll__isatty]
mov byte [0x140011558], 1
test eax, eax
je 0x140001710
mov byte [0x140011558], r13b
mov rcx, qword [0x140011da8]
lea rdx, [rsp + 0x30]
mov r8d, r14d
call sub.LIBPQ.dll_Ordinal_105
mov edi, eax
test eax, eax
jne 0x1400018c3
mov rcx, qword [0x140011da8]
mov rbx, r13
mov rdi, r13
mov r14, r13
call sub.LIBPQ.dll_Ordinal_16
mov rcx, qword [0x140011da8]
test eax, eax
js 0x140001aa3
mov dword [rbp - 0x80], r13d
call sub.LIBPQ.dll_Ordinal_16
inc dword [rbp - 0x80]
movsxd rcx, eax
mov eax, dword [0x1400112c0]
mov qword [rbp - 0x78], rcx
test eax, eax
je 0x14000177e
dec eax
movsxd rcx, eax
imul rbx, rcx, 0x3e8
add rbx, r12
mov eax, dword [0x1400112c4]
test eax, eax
jle 0x1400017a4
cmp byte [0x14001152c], dil
je 0x1400017a4
dec eax
movsxd rcx, eax
imul rdi, rcx, 0x3e8
add rdi, qword [0x1400112d8]
test rbx, rbx
jg 0x1400017ae
test rdi, rdi
jle 0x1400017ee
test rdi, rdi
jle 0x1400017ba
cmp rdi, rbx
cmovl rbx, rdi
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x3c]
mov rdx, rbx
mov rcx, rsi
call fcn.140005790
mov eax, dword [rsp + 0x3c]
mov ecx, 1
test eax, eax
lea r14, [rsp + 0x40]
cmovle eax, ecx
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x44], eax
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_16
lea rdx, [rbp - 0x80]
xor r9d, r9d
lea ecx, [rax + 1]
xor r8d, r8d
mov qword [rsp + 0x20], r14
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x14000182e
jns 0x14000189e
call qword [sym.imp.MSVCR120.dll__errno]
cmp dword [rax], 0x2714
jne 0x140001a89
mov r14d, 1
mov eax, dword [0x14001151c]
test eax, eax
je 0x140001530
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_24
mov rcx, rax
mov rbx, rax
call sub.LIBPQ.dll_Ordinal_33
mov rcx, rbx
cmp eax, 1
je 0x140001b38
call sub.LIBPQ.dll_Ordinal_65
lea rcx, str._s:_unexpected_termination_of_replication_stream:__s
mov rdi, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rbx, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov r9, rdi
mov rdx, rbx
call fcn.140007ec0
jmp 0x140001bd5
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_26
test eax, eax
jne 0x14000182e
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_15
lea rcx, str._s:_could_not_receive_data_from_WAL_stream:__s
jmp 0x140001871
cmp eax, 0xffffffff
je 0x140001842
cmp eax, 0xfffffffe
je 0x140001b20
mov rax, qword [rsp + 0x30]
movzx ecx, byte [rax]
cmp cl, 0x6b
jne 0x140001952
lea rcx, [rax + 1]
call fcn.140005840
mov rcx, qword [0x140011530]
cmp rax, rcx
cmova rcx, rax
mov qword [0x140011530], rcx
cmp edi, 0x12
jl 0x140001ae3
mov rax, qword [rsp + 0x30]
cmp byte [rax + 0x11], r13b
je 0x140001834
mov rcx, rsi
call fcn.140001e40
test al, al
je 0x140001bd5
call fcn.140005750
mov rcx, qword [0x140011da8]
xor r9d, r9d
mov rdx, rax
mov r8b, 1
mov r12, rax
call fcn.140001c80
test al, al
je 0x140001bd5
jmp 0x140001834
cmp cl, 0x77
jne 0x140001aec
cmp edi, 0x1a
jl 0x140001ae3
lea rcx, [rax + 1]
call fcn.140005840
mov rcx, qword [0x140011530]
lea esi, [rdi - 0x19]
cmp rax, rcx
mov ebx, r13d
mov byte [0x14001152c], 1
cmova rcx, rax
mov qword [0x140011530], rcx
test esi, esi
je 0x1400019cc
nop dword [rax]
nop word [rax + rax]
mov rdx, qword [rsp + 0x30]
movsxd rcx, ebx
mov r8d, esi
add rdx, 0x19
add rdx, rcx
mov ecx, dword [0x1400112d0]
call qword [sym.imp.MSVCR120.dll__write]
test eax, eax
js 0x140001ab4
add ebx, eax
sub esi, eax
jne 0x1400019a0
mov ecx, dword [0x1400112d0]
lea rdx, [0x14000d104]
mov r8d, r14d
call qword [sym.imp.MSVCR120.dll__write]
cmp eax, 1
je 0x140001834
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rcx, str._s:_could_not_write__u_bytes_to_log_file___s_:__s_n
mov rbx, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r9d, r14d
mov rcx, qword [0x140011500]
mov r8, qword [0x1400123d8]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rcx
lea rcx, [rax + 0x60]
mov rdx, rdi
call fcn.140007ec0
jmp 0x140001bd5
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rcx, str._s:_could_not_open_log_file___s_:__s_n
mov rbx, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r9, qword [0x140011500]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call fcn.140007ec0
jmp 0x140001bd5
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rcx, str._s:_select___failed:__s_n
jmp 0x140001871
call sub.LIBPQ.dll_Ordinal_15
lea rcx, str._s:_invalid_socket:__s
jmp 0x140001871
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rcx, str._s:_could_not_write__u_bytes_to_log_file___s_:__s_n
mov rbx, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r9d, esi
jmp 0x140001a15
lea rcx, str._s:_streaming_header_too_small:__d_n
jmp 0x140001af6
movsx edi, byte [rax]
lea rcx, str._s:_unrecognized_streaming_header:___c__n
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rbx, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov r9d, edi
mov rdx, rbx
call fcn.140007ec0
jmp 0x140001bd5
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_15
lea rcx, str._s:_could_not_read_COPY_data:__s
jmp 0x140001871
call sub.LIBPQ.dll_Ordinal_48
cmp dword [0x1400112d0], 0xffffffff
je 0x140001bcb
mov rcx, qword [0x140011500]
movzx eax, byte [rcx]
cmp al, byte [reloc.LIBPQ.dll_Ordinal_45]
jne 0x140001b68
movzx eax, byte [rcx + 1]
cmp al, byte [0x14000cf95]
je 0x140001bcb
call fcn.140005750
mov rcx, rax
call fcn.140001e40
mov ecx, dword [0x1400112d0]
call qword [sym.imp.MSVCR120.dll__close]
test eax, eax
je 0x140001bcb
call qword [sym.imp.MSVCR120.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.MSVCR120.dll_strerror]
lea rcx, str._s:_could_not_close_file___s_:__s_n
mov rbx, rax
call qword [sym.imp.libintl.dll_libintl_gettext]
mov rdi, rax
call qword [sym.imp.MSVCR120.dll___iob_func]
mov r9, qword [0x140011500]
mov r8, qword [0x1400123d8]
lea rcx, [rax + 0x60]
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call fcn.140007ec0
mov dword [0x1400112d0], 0xffffffff
mov r14, qword [rsp + 0x2a0]
mov rcx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x2e0]
mov rsi, qword [rsp + 0x2d8]
mov rbx, qword [rsp + 0x2d0]
test rcx, rcx
je 0x140001c09
call sub.LIBPQ.dll_Ordinal_95
mov qword [rsp + 0x30], r13
mov rcx, r15
call sub.LIBPQ.dll_Ordinal_76
mov rcx, qword [0x140011da8]
call sub.LIBPQ.dll_Ordinal_4
mov qword [0x140011da8], r13
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.14000adb0
add rsp, 0x2a8
pop r15
pop r13
pop r12
pop rbp
ret