Function at 0x456920
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x604
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
sete bl
mov byte [ebp - 0x5be], 0
call sym.postgres.exe_RecoveryInProgress
mov byte [ebp - 0x5bd], al
call sym.postgres.exe_superuser
test al, al
jne 0x4569ae
call sym.postgres.exe_GetUserId
push eax
call sym.postgres.exe_has_rolreplication
add esp, 4
test al, al
jne 0x4569ae
push 0
push 0x6b5940
push 0x2615
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4569ae
push str.must_be_superuser_or_replication_role_to_run_a_backup
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x1005084
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp byte [ebp - 0x5bd], 0
je 0x4569f3
test bl, bl
je 0x456a4d
push 0
push 0x6b5940
push 0x261e
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456a4d
push str.WAL_control_functions_cannot_be_executed_during_recovery.
call sym.postgres.exe_errhint
add esp, 4
push eax
push str.recovery_is_in_progress
jmp 0x456a2e
cmp dword [sym.postgres.exe_wal_level], 1
jge 0x456a4d
push 0
push 0x6b5940
push 0x2628
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456a4d
push str.wal_level_must_be_set_to__archive__or__hot_standby__at_server_start.
call sym.postgres.exe_errhint
add esp, 4
push eax
push str.WAL_level_not_sufficient_for_making_an_online_backup
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
push 0
push 7
call sym.postgres.exe_LWLockAcquire
mov eax, dword [0x83350c]
add esp, 8
test bl, bl
je 0x456a68
mov byte [eax + 0x1e], 0
jmp 0x456a6b
dec dword [eax + 0x20]
cmp byte [eax + 0x1e], 0
jne 0x456a7b
cmp dword [eax + 0x20], 0
jne 0x456a7b
mov byte [eax + 0x1c], 0
push 7
call sym.postgres.exe_LWLockRelease
add esp, 4
test bl, bl
je 0x456c73
lea eax, [ebp - 0x5bc]
push eax
push str.backup_label
call sym.postgres.exe_pgwin32_safestat
add esp, 8
test eax, eax
je 0x456b37
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 2
je 0x456af4
push 0
push 0x6b5940
push 0x2651
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456af4
push str.backup_label
push str.could_not_stat_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
push 0
push 0x6b5940
push 0x2654
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456b37
push str.a_backup_is_not_in_progress
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
push 0x6b2698
push str.backup_label
call sym.postgres.exe_AllocateFile
mov esi, eax
add esp, 8
test esi, esi
jne 0x456b8e
push eax
push 0x6b5940
push 0x265d
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456b8e
push str.backup_label
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
mov ecx, dword [ebp - 0x5a8]
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
inc ecx
push ecx
push edx
call sym.postgres.exe_MemoryContextAlloc
push esi
mov edi, eax
mov eax, dword [ebp - 0x5a8]
push 1
push eax
push edi
call dword [sym.imp.MSVCR100.dll_fread]
mov ecx, dword [ebp - 0x5a8]
add esp, 0x18
mov byte [edi + ecx], 0
cmp eax, 1
jne 0x456be2
push esi
call dword [sym.imp.MSVCR100.dll_ferror]
add esp, 4
test eax, eax
jne 0x456be2
push esi
call sym.postgres.exe_FreeFile
add esp, 4
test eax, eax
je 0x456c22
push 0
push 0x6b5940
push 0x266a
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456c22
push str.backup_label
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
push str.backup_label
call sym.postgres.exe_pgunlink
add esp, 4
test eax, eax
je 0x456c73
push 0
push 0x6b5940
push 0x266f
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456c73
push str.backup_label
push str.could_not_remove_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 esi, dword [sym.imp.MSVCR100.dll_sscanf]
lea edx, [ebp - 0x5bf]
push edx
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x5c4]
push ecx
lea edx, [ebp - 0x5c8]
push edx
push str.START_WAL_LOCATION:__X__X__file__24s__c
push edi
call esi
add esp, 0x18
cmp eax, 4
jne 0x456cae
cmp byte [ebp - 0x5bf], 0xa
je 0x456cf6
push 0
push 0x6b5940
push 0x267b
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456cf6
push str.backup_label
push str.invalid_data_in_file___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
push 0xa
push edi
call dword [sym.imp.MSVCR100.dll_strchr]
inc eax
push str.BACKUP_FROM:
push eax
mov dword [ebp - 0x5d4], eax
call dword [sym.imp.MSVCR100.dll_strstr]
xor edi, edi
add esp, 0x10
cmp eax, edi
je 0x456d2f
lea ecx, [ebp - 0x18]
push ecx
push str.BACKUP_FROM:__19s_n
push eax
call esi
add esp, 0xc
cmp eax, 1
je 0x456d76
push edi
push 0x6b5940
push 0x2687
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456d76
push str.backup_label
push str.invalid_data_in_file___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ecx, str.standby
lea eax, [ebp - 0x18]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x456da0
test dl, dl
je 0x456d9c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x456da0
add eax, 2
add ecx, 2
test dl, dl
jne 0x456d80
xor eax, eax
jmp 0x456da5
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x4571a4
cmp byte [ebp - 0x5bd], 0
jne 0x4571b1
push edi
push 0x6b5940
push 0x268e
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456e0a
push str.This_means_that_the_backup_being_taken_is_corrupt_and_should_not_be_used._Try_taking_another_online_backup.
call sym.postgres.exe_errhint
add esp, 4
push eax
push str.the_standby_was_promoted_during_online_backup
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
lea eax, [ebp - 0x604]
push eax
lea edx, [ebp - 0x5c8]
push 0x50
push edi
mov dword [ebp - 0x604], edx
mov dword [ebp - 0x600], 8
mov dword [ebp - 0x5fc], edi
mov dword [ebp - 0x5f4], edi
call sym.postgres.exe_XLogInsert
lea ecx, [ebp - 0x5f0]
push ecx
mov ebx, eax
xor eax, eax
mov esi, edx
push 0x40
push eax
mov dword [ebp - 0x5d0], ebx
mov dword [ebp - 0x5cc], esi
mov dword [ebp - 0x5e8], eax
mov dword [ebp - 0x5f0], eax
mov dword [ebp - 0x5ec], eax
mov dword [ebp - 0x5e0], eax
call sym.postgres.exe_XLogInsert
mov edx, dword [sym.postgres.exe_ThisTimeLineID]
lea edi, [esi - 1]
shr edi, 0x18
push edi
push ebx
push edx
push str._08X_08X_08X
lea eax, [ebp - 0x118]
push 0x40
push eax
call sym.postgres.exe_pg_snprintf
push 0
call dword [sym.imp.MSVCR100.dll__time32]
mov ecx, dword [sym.postgres.exe_log_timezone]
cdq
mov dword [ebp - 0x5d8], edx
push ecx
lea edx, [ebp - 0x5dc]
push edx
mov dword [ebp - 0x5dc], eax
call sym.postgres.exe_pg_localtime
push eax
push str._Y__m__d__H:_M:_S__Z
lea eax, [ebp - 0x198]
push 0x80
push eax
call sym.postgres.exe_pg_strftime
mov eax, dword [ebp - 0x5c4]
mov edx, dword [ebp - 0x5c8]
add esp, 0x4c
mov ecx, eax
and ecx, 0xffffff
push ecx
shr eax, 0x18
push eax
mov eax, dword [sym.postgres.exe_ThisTimeLineID]
push edx
push eax
push str.pg_xlog__08X_08X_08X._08X.backup
lea ecx, [ebp - 0x598]
push 0x400
push ecx
call sym.postgres.exe_pg_snprintf
lea edx, [ebp - 0x598]
push 0x6b1fb8
push edx
call sym.postgres.exe_AllocateFile
mov esi, eax
add esp, 0x24
test esi, esi
jne 0x456f69
push eax
push 0x6b5940
push 0x26ed
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456f69
lea eax, [ebp - 0x598]
push eax
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 edx, dword [ebp - 0x5c4]
mov eax, dword [ebp - 0x5c8]
lea ecx, [ebp - 0x98]
push ecx
push edx
push eax
push str.START_WAL_LOCATION:__X__X__file__s__n
push esi
call sym.postgres.exe_pg_fprintf
mov edx, dword [ebp - 0x5cc]
lea ecx, [ebp - 0x118]
push ecx
push edx
push ebx
push str.STOP_WAL_LOCATION:__X__X__file__s__n
push esi
call sym.postgres.exe_pg_fprintf
mov eax, dword [ebp - 0x5d4]
push eax
push 0x6ab5fc
push esi
call sym.postgres.exe_pg_fprintf
lea ecx, [ebp - 0x198]
push ecx
push str.STOP_TIME:__s_n
push esi
call sym.postgres.exe_pg_fprintf
add esp, 0x40
push esi
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
test eax, eax
jne 0x456ff3
push esi
call dword [sym.imp.MSVCR100.dll_ferror]
add esp, 4
test eax, eax
jne 0x456ff3
push esi
call sym.postgres.exe_FreeFile
add esp, 4
test eax, eax
je 0x457035
push 0
push 0x6b5940
push 0x26f9
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x457035
lea edx, [ebp - 0x598]
push edx
push str.could_not_write_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
call fcn.0044b880
cmp byte [ebp + 0xc], 0
je 0x4572c3
cmp byte [sym.postgres.exe_XLogArchiveMode], 0
je 0x4572dc
cmp dword [sym.postgres.exe_wal_level], 1
jl 0x4572dc
mov eax, dword [sym.postgres.exe_ThisTimeLineID]
push edi
push ebx
push eax
push str._08X_08X_08X
lea ecx, [ebp - 0xd8]
push 0x40
push ecx
call sym.postgres.exe_pg_snprintf
mov eax, dword [ebp - 0x5c4]
mov ecx, dword [sym.postgres.exe_ThisTimeLineID]
mov edx, eax
and edx, 0xffffff
push edx
shr eax, 0x18
push eax
mov eax, dword [ebp - 0x5c8]
push eax
push ecx
push str._08X_08X_08X._08X.backup
lea edx, [ebp - 0x58]
push 0x40
push edx
call sym.postgres.exe_pg_snprintf
add esp, 0x34
mov edi, 0x3c
xor ebx, ebx
lea esi, [ebp - 0xd8]
call fcn.0044a460
test al, al
jne 0x4570d3
lea esi, [ebp - 0x58]
call fcn.0044a460
test al, al
je 0x45728b
mov eax, dword [sym.postgres.exe_pg_signal_mask]
mov ecx, dword [sym.postgres.exe_pg_signal_queue]
not eax
test eax, ecx
je 0x4570e9
call sym.postgres.exe_pgwin32_dispatch_queued_signals
mov dl, byte [sym.postgres.exe_InterruptPending]
test dl, dl
je 0x4570f8
call sym.postgres.exe_ProcessInterrupts
cmp byte [ebp - 0x5be], 0
jne 0x45713f
cmp ebx, 5
jle 0x45713f
push 0
push 0x6b5940
push 0x2729
push str.src_backend_access_transamxlog.c
push 0x12
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x457138
push str.pg_stop_backup_cleanup_done__waiting_for_required_WAL_segments_to_be_archived
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov byte [ebp - 0x5be], 1
push 0xf4240
call sym.postgres.exe_pg_usleep
inc ebx
add esp, 4
cmp ebx, edi
jl 0x4570b4
push 0
push 0x6b5940
push 0x2737
push str.src_backend_access_transamxlog.c
push 0x13
add edi, edi
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4570b4
push str.Check_that_your_archive_command_is_executing_properly.__pg_stop_backup_can_be_canceled_safely__but_the_database_backup_will_not_be_usable_without_all_the_WAL_segments.
call sym.postgres.exe_errhint
add esp, 4
push eax
push ebx
push str.pg_stop_backup_still_waiting_for_all_required_WAL_segments_to_be_archived___d_seconds_elapsed_
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errfinish
add esp, 8
jmp 0x4570b4
cmp byte [ebp - 0x5bd], 0
je 0x456e0a
mov esi, dword [0x83350c]
push 0
mov edi, esi
push 1
add esi, 0x51c
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x4571e1
push 0x26b4
push str.src_backend_access_transamxlog.c
push esi
call sym.postgres.exe_s_lock
add esp, 0xc
mov eax, dword [edi + 0x514]
mov edi, dword [edi + 0x518]
mov dword [esi], 0
mov ecx, dword [ebp - 0x5c8]
cmp ecx, eax
jb 0x457207
jne 0x457258
cmp dword [ebp - 0x5c4], edi
ja 0x457258
push 0
push 0x6b5940
push 0x26c0
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x457258
push str.This_means_that_the_backup_being_taken_on_the_standby_is_corrupt_and_should_not_be_used._Enable_full_page_writes_and_run_CHECKPOINT_on_the_master__and_then_try_an_online_backup_again.
call sym.postgres.exe_errhint
add esp, 4
push eax
push str.WAL_generated_with_full_page_writesoff_was_replayed_during_online_backup
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
push 1
push 9
call sym.postgres.exe_LWLockAcquire
mov eax, dword [0x833510]
mov esi, dword [eax + 0x70]
mov edi, dword [eax + 0x74]
push 9
call sym.postgres.exe_LWLockRelease
add esp, 0xc
mov edx, edi
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push 0
push 0x6b5940
push 0x273c
push str.src_backend_access_transamxlog.c
push 0x12
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4572bd
push str.pg_stop_backup_complete__all_required_WAL_segments_have_been_archived
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ebx, dword [ebp - 0x5d0]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x5cc]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push 0
push 0x6b5940
push 0x2740
push str.src_backend_access_transamxlog.c
push 0x12
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4572c3
push str.WAL_archiving_is_not_enabled__you_must_ensure_that_all_required_WAL_segments_are_copied_through_other_means_to_complete_the_backup
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 8
jmp 0x4572c3