Function at 0x577330
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [sym.postgres.exe_pg_signal_queue]
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x43c], eax
mov eax, dword [sym.postgres.exe_pg_signal_mask]
push ebx
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x10]
not eax
mov dword [ebp - 0x440], edi
mov dword [ebp - 0x458], ecx
mov dword [ebp - 0x444], ebx
mov dword [ebp - 0x450], 0xffffffff
mov dword [ebp - 0x44c], ebx
test eax, edx
je 0x5773ad
call sym.postgres.exe_pgwin32_dispatch_queued_signals
call dword [sym.imp.MSVCR100.dll__errno]
pop edi
mov dword [eax], 0x2714
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push esi
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x334], ebx
cmp edi, ebx
je 0x5774c9
mov dword [ebp - 0x448], ebx
cmp dword [edi], ebx
jbe 0x5774c9
lea esi, [edi + 4]
push 0
push 0
push 0
lea ecx, [ebp - 0x464]
push ecx
lea eax, [ebp - 0x451]
push 1
lea edx, [ebp - 0x460]
mov dword [ebp - 0x45c], eax
mov eax, dword [esi]
push edx
push eax
mov dword [ebp - 0x460], 0
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
jne 0x577434
test ebx, ebx
je 0x577420
mov ecx, dword [esi]
cmp dword [ebp + eax*4 - 0x330], ecx
je 0x577420
inc eax
cmp eax, ebx
jb 0x577412
cmp eax, ebx
jne 0x57747d
cmp ebx, 0x40
jae 0x57747d
mov ecx, dword [esi]
mov dword [ebp + eax*4 - 0x330], ecx
jmp 0x577470
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x57747d
xor eax, eax
test ebx, ebx
je 0x57745e
mov ecx, dword [esi]
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x330], ecx
je 0x57745e
inc eax
cmp eax, ebx
jb 0x577450
cmp eax, ebx
jne 0x57747d
cmp ebx, 0x40
jae 0x57747d
mov edx, dword [esi]
mov dword [ebp + eax*4 - 0x330], edx
mov ebx, dword [ebp - 0x334]
inc ebx
mov dword [ebp - 0x334], ebx
mov eax, dword [ebp - 0x448]
inc eax
add esi, 4
mov dword [ebp - 0x448], eax
cmp eax, dword [edi]
jb 0x5773d3
test ebx, ebx
je 0x5774c9
mov eax, dword [ebp - 0x43c]
mov ecx, 0x41
lea esi, [ebp - 0x334]
rep movsd dword es:[edi], dword [esi]
test eax, eax
je 0x5774b6
mov dword [eax], 0
pop esi
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x458], 0
je 0x5774fa
mov esi, dword [ebp - 0x458]
mov ecx, dword [esi]
mov eax, 0x10624dd3
imul ecx, ecx, 0x3e8
imul dword [esi + 4]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ecx
mov dword [ebp - 0x450], eax
mov esi, dword [ebp - 0x43c]
mov ebx, dword [sym.imp.WS2_32.dll_WSACreateEvent]
test esi, esi
je 0x57753e
cmp dword [esi], 0
jbe 0x57753e
mov edi, dword [ebp - 0x444]
add esi, 4
call ebx
mov edx, dword [esi]
mov dword [ebp + edi*4 - 0x664], eax
mov eax, dword [ebp - 0x43c]
mov dword [ebp + edi*4 - 0x204], edx
inc edi
add esi, 4
cmp edi, dword [eax]
jb 0x577518
mov dword [ebp - 0x444], edi
cmp dword [ebp - 0x440], 0
je 0x57759f
mov esi, dword [ebp - 0x440]
xor edi, edi
cmp dword [esi], edi
jbe 0x57759f
add esi, 4
cmp dword [ebp - 0x43c], 0
je 0x577572
mov ecx, dword [ebp - 0x43c]
mov edx, dword [esi]
push ecx
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x577591
call ebx
mov ecx, dword [ebp - 0x444]
mov dword [ebp + ecx*4 - 0x664], eax
mov eax, dword [esi]
mov dword [ebp + ecx*4 - 0x204], eax
inc ecx
mov dword [ebp - 0x444], ecx
mov ecx, dword [ebp - 0x440]
inc edi
add esi, 4
cmp edi, dword [ecx]
jb 0x577556
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
xor esi, esi
cmp dword [ebp - 0x444], esi
jle 0x57761f
nop
xor edi, edi
cmp dword [ebp - 0x43c], edi
je 0x5775d7
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp + esi*4 - 0x204]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x5775d7
mov edi, 0x29
cmp dword [ebp - 0x440], 0
je 0x5775fb
mov ecx, dword [ebp - 0x440]
mov edx, dword [ebp + esi*4 - 0x204]
push ecx
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x5775fb
or edi, 0x22
mov eax, dword [ebp + esi*4 - 0x664]
mov ecx, dword [ebp + esi*4 - 0x204]
push edi
push eax
push ecx
call ebx
test eax, eax
jne 0x577845
inc esi
cmp esi, dword [ebp - 0x444]
jl 0x5775b0
mov edx, dword [ebp - 0x450]
mov ecx, dword [0x869244]
mov ebx, dword [ebp - 0x444]
push 1
push edx
push 0
lea eax, [ebp - 0x664]
mov dword [ebp + ebx*4 - 0x664], ecx
push eax
lea ecx, [ebx + 1]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
mov dword [ebp - 0x450], eax
cmp eax, 0x102
je 0x5777d0
cmp eax, 0xc0
je 0x5777d0
cmp eax, ebx
je 0x5777d0
mov dword [ebp - 0x448], 0
test ebx, ebx
jle 0x5777d0
mov ebx, dword [ebp - 0x438]
mov edi, dword [ebp - 0x334]
push 0x2c
lea edx, [ebp - 0x230]
push 0
push edx
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x448]
mov esi, dword [ebp + eax*4 - 0x204]
add esp, 0xc
lea ecx, [ebp - 0x230]
mov edx, eax
mov eax, dword [ebp + edx*4 - 0x664]
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
je 0x5776f9
push 0x732e10
push 0x246
push str.src_backendportwin32_socket.c
call sym.postgres.exe_elog_start
add esp, 0xc
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.failed_to_enumerate_network_events:_error_code__u
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0xc
cmp dword [ebp - 0x43c], 0
je 0x577753
mov ecx, dword [ebp - 0x43c]
push ecx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x577753
test byte [ebp - 0x230], 0x29
je 0x577753
xor eax, eax
test ebx, ebx
je 0x577730
cmp dword [ebp + eax*4 - 0x434], esi
je 0x577730
inc eax
cmp eax, ebx
jb 0x577722
cmp eax, ebx
jne 0x57774d
cmp ebx, 0x40
jae 0x57774d
mov dword [ebp + eax*4 - 0x434], esi
mov ebx, dword [ebp - 0x438]
inc ebx
mov dword [ebp - 0x438], ebx
inc dword [ebp - 0x44c]
cmp dword [ebp - 0x440], 0
je 0x5777b1
mov edx, dword [ebp - 0x440]
push edx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x5777b1
test byte [ebp - 0x230], 0x22
je 0x5777b1
xor eax, eax
test edi, edi
je 0x57778e
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x330], esi
je 0x57778e
inc eax
cmp eax, edi
jb 0x577780
cmp eax, edi
jne 0x5777ab
cmp edi, 0x40
jae 0x5777ab
mov dword [ebp + eax*4 - 0x330], esi
mov edi, dword [ebp - 0x334]
inc edi
mov dword [ebp - 0x334], edi
inc dword [ebp - 0x44c]
mov eax, dword [ebp - 0x448]
inc eax
mov dword [ebp - 0x448], eax
cmp eax, dword [ebp - 0x444]
jl 0x577690
mov ebx, dword [ebp - 0x444]
xor esi, esi
test ebx, ebx
jle 0x577801
mov edi, dword [sym.imp.WS2_32.dll_WSACloseEvent]
lea esp, [esp]
mov eax, dword [ebp + esi*4 - 0x204]
push 0
push 0
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov ecx, dword [ebp + esi*4 - 0x664]
push ecx
call edi
inc esi
cmp esi, ebx
jl 0x5777e0
mov eax, dword [ebp - 0x450]
cmp eax, 0x102
jne 0x577893
mov eax, dword [ebp - 0x43c]
test eax, eax
je 0x577822
mov dword [eax], 0
mov eax, dword [ebp - 0x440]
test eax, eax
je 0x577832
mov dword [eax], 0
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
call fcn.00576b70
dec esi
js 0x577861
lea ecx, [ecx]
mov edx, dword [ebp + esi*4 - 0x204]
push 0
push 0
push edx
call ebx
dec esi
jns 0x577850
mov edi, dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ebx, dword [ebp - 0x444]
xor esi, esi
nop
mov eax, dword [ebp + esi*4 - 0x664]
push eax
call edi
inc esi
cmp esi, ebx
jl 0x577870
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
cmp eax, ebx
jne 0x5778dc
call sym.postgres.exe_pgwin32_dispatch_queued_signals
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 0x2714
mov eax, dword [ebp - 0x43c]
test eax, eax
je 0x5778b8
mov dword [eax], 0
mov eax, dword [ebp - 0x440]
test eax, eax
je 0x5778c8
mov dword [eax], 0
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x43c], 0
je 0x5778f8
mov edi, dword [ebp - 0x43c]
mov ecx, 0x41
lea esi, [ebp - 0x438]
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x440], 0
je 0x577914
mov edi, dword [ebp - 0x440]
mov ecx, 0x41
lea esi, [ebp - 0x334]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x44c]
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret