Function at 0x5a37f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0x10000
call sym.postgres.exe_pgport_palloc
mov edi, dword [ebp + 8]
push 0
push 0x8000
push edi
mov ebx, eax
call sym.postgres.exe_BasicOpenFile
mov esi, eax
add esp, 0x10
mov dword [ebp - 0xc], esi
test esi, esi
jns 0x5a385d
push 0
push 0x739a08
push 0xa5
push str.src_backend_storage_filecopydir.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a385d
push edi
push str.could_not_open_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov edi, dword [ebp + 0xc]
push 0x180
push 0x8502
push edi
call sym.postgres.exe_BasicOpenFile
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
jns 0x5a38b6
push 0
push 0x739a08
push 0xac
push str.src_backend_storage_filecopydir.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a38b6
push edi
push str.could_not_create_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov edi, dword [sym.imp.MSVCR100.dll__errno]
mov dword [ebp - 4], 0
mov eax, dword [sym.postgres.exe_pg_signal_mask]
mov ecx, dword [sym.postgres.exe_pg_signal_queue]
not eax
test eax, ecx
je 0x5a38d9
call sym.postgres.exe_pgwin32_dispatch_queued_signals
mov dl, byte [sym.postgres.exe_InterruptPending]
test dl, dl
je 0x5a38e8
call sym.postgres.exe_ProcessInterrupts
push 0x10000
push ebx
push esi
call dword [sym.imp.MSVCR100.dll__read]
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x5a393f
push 0
push 0x739a08
push 0xba
push str.src_backend_storage_filecopydir.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a393d
mov eax, dword [ebp + 8]
push eax
push str.could_not_read_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
test esi, esi
je 0x5a39ca
call edi
mov ecx, dword [ebp - 8]
push esi
push ebx
push ecx
mov dword [eax], 0
call dword [sym.imp.MSVCR100.dll__write]
add esp, 0xc
cmp eax, esi
je 0x5a39ae
call edi
cmp dword [eax], 0
jne 0x5a396f
call edi
mov dword [eax], 0x1c
push 0
push 0x739a08
push 0xc5
push str.src_backend_storage_filecopydir.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a39ae
mov edx, dword [ebp + 0xc]
push edx
push str.could_not_write_to_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
push esi
push eax
push ecx
call sym.postgres.exe_pg_flush_data
add esp, 0xc
add dword [ebp - 4], esi
mov esi, dword [ebp - 0xc]
jmp 0x5a38c3
mov edx, dword [ebp - 8]
mov esi, dword [sym.imp.MSVCR100.dll__close]
push edx
call esi
add esp, 4
test eax, eax
je 0x5a3a1c
push 0
push 0x739a08
push 0xd3
push str.src_backend_storage_filecopydir.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a3a1c
mov eax, dword [ebp + 0xc]
push eax
push str.could_not_close_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ecx, dword [ebp - 0xc]
push ecx
call esi
push ebx
call sym.postgres.exe_pfree
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret