Function at 0x456120
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x17c
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x15c], esi
mov dword [ebp - 0x158], eax
sete byte [ebp - 0x129]
call sym.postgres.exe_RecoveryInProgress
mov bl, al
mov byte [ebp - 0x12b], bl
call sym.postgres.exe_superuser
test al, al
jne 0x4561bd
call sym.postgres.exe_GetUserId
push eax
call sym.postgres.exe_has_rolreplication
add esp, 4
test al, al
jne 0x4561bd
push edi
push 0x6b554c
push 0x24cb
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4561bd
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
test bl, bl
je 0x45621e
cmp byte [ebp - 0x129], 0
je 0x45621a
push edi
push 0x6b554c
push 0x24d4
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x45621a
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
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
test bl, bl
jne 0x456277
cmp dword [sym.postgres.exe_wal_level], 1
jge 0x456277
push edi
push 0x6b554c
push 0x24de
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456277
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
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x456280
sub eax, edx
cmp eax, 0x400
jbe 0x4562d7
push edi
push 0x6b554c
push 0x24e4
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4562d7
push 0x400
push str.backup_label_too_long__max__d_bytes_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x3080082
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
push edi
push 7
call sym.postgres.exe_LWLockAcquire
mov bl, byte [ebp - 0x129]
mov eax, dword [0x83350c]
add esp, 8
test bl, bl
je 0x456359
cmp byte [eax + 0x1e], 0
je 0x456353
push 7
call sym.postgres.exe_LWLockRelease
push edi
push 0x6b554c
push 0x2503
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x18
test al, al
je 0x45634e
push str.Run_pg_stop_backup___and_try_again.
call sym.postgres.exe_errhint
add esp, 4
push eax
push str.a_backup_is_already_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, 0xc
mov eax, dword [0x83350c]
mov byte [eax + 0x1e], 1
jmp 0x45635c
inc dword [eax + 0x20]
push 7
mov byte [eax + 0x1c], 1
call sym.postgres.exe_LWLockRelease
xor eax, eax
test bl, bl
setne al
push eax
push 0x44f740
call sym.postgres.exe_on_shmem_exit
mov ecx, dword [sym.postgres.exe_PG_exception_stack]
mov edx, dword [sym.postgres.exe_error_context_stack]
lea eax, [ebp - 0x104]
push edi
push eax
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 0x138], edx
call sub.MSVCR100.dll__setjmp3
add esp, 0x14
test eax, eax
jne 0x4568a1
lea ecx, [ebp - 0x104]
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov byte [ebp - 0x12a], al
cmp byte [ebp - 0x12b], al
jne 0x4563ed
lea edx, [ebp - 0x17c]
push edx
push 0x40
push edi
mov dword [ebp - 0x174], edi
mov dword [ebp - 0x17c], edi
mov dword [ebp - 0x178], edi
mov dword [ebp - 0x16c], edi
call sym.postgres.exe_XLogInsert
add esp, 0xc
movsx eax, byte [ebp + 0xc]
neg eax
sbb eax, eax
and eax, 4
or eax, 0x18
mov dword [ebp - 0x160], eax
jmp 0x456409
mov eax, dword [ebp - 0x160]
push eax
call sym.postgres.exe_RequestCheckpoint
push 1
push 9
call sym.postgres.exe_LWLockAcquire
mov eax, dword [0x833510]
mov ecx, dword [eax + 0x20]
mov edx, dword [eax + 0x24]
mov esi, dword [eax + 0x30]
mov edi, dword [eax + 0x34]
mov bl, byte [eax + 0x3c]
push 9
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x130], edi
call sym.postgres.exe_LWLockRelease
add esp, 0x10
cmp byte [ebp - 0x12b], 0
je 0x456517
mov edi, dword [0x83350c]
push 0
push 1
lea esi, [edi + 0x51c]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x456489
push 0x2559
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
test bl, bl
je 0x4564b3
mov ecx, dword [ebp - 0x134]
cmp ecx, eax
jb 0x4564b3
jne 0x456504
cmp dword [ebp - 0x130], edi
ja 0x456504
push 0
push 0x6b554c
push 0x2565
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456504
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_since_last_restartpoint
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
mov edi, dword [ebp - 0x130]
mov esi, dword [ebp - 0x134]
mov byte [ebp - 0x12a], 1
push 1
push 7
call sym.postgres.exe_LWLockAcquire
mov eax, dword [0x83350c]
mov ecx, dword [eax + 0x24]
add esp, 8
cmp ecx, esi
jb 0x456536
jne 0x456543
cmp dword [eax + 0x28], edi
jae 0x456543
mov dword [eax + 0x24], esi
mov dword [eax + 0x28], edi
mov byte [ebp - 0x12a], 1
push 7
call sym.postgres.exe_LWLockRelease
add esp, 4
cmp byte [ebp - 0x12a], 0
je 0x456403
mov ecx, dword [sym.postgres.exe_ThisTimeLineID]
mov eax, edi
shr eax, 0x18
push eax
push esi
push ecx
push str._08X_08X_08X
lea edx, [ebp - 0x44]
push 0x40
push edx
call sym.postgres.exe_pg_snprintf
lea eax, [ebp - 0x14c]
push eax
call sym.postgres.exe_initStringInfo
push 0
call dword [sym.imp.MSVCR100.dll__time32]
mov ecx, dword [sym.postgres.exe_log_timezone]
cdq
mov dword [ebp - 0x164], edx
push ecx
lea edx, [ebp - 0x168]
push edx
mov dword [ebp - 0x168], eax
call sym.postgres.exe_pg_localtime
push eax
push str._Y__m__d__H:_M:_S__Z
lea eax, [ebp - 0xc4]
push 0x80
push eax
call sym.postgres.exe_pg_strftime
lea ecx, [ebp - 0x44]
push ecx
push edi
push esi
lea edx, [ebp - 0x14c]
push str.START_WAL_LOCATION:__X__X__file__s__n
push edx
call sym.postgres.exe_appendStringInfo
mov eax, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x154]
add esp, 0x4c
push eax
push ecx
lea edx, [ebp - 0x14c]
push str.CHECKPOINT_LOCATION:__X__X_n
push edx
call sym.postgres.exe_appendStringInfo
mov bl, byte [ebp - 0x129]
add esp, 0x10
mov eax, 0x6b5274
test bl, bl
jne 0x456613
mov eax, str.streamed
push eax
lea eax, [ebp - 0x14c]
push str.BACKUP_METHOD:__s_n
push eax
call sym.postgres.exe_appendStringInfo
add esp, 0xc
cmp byte [ebp - 0x12b], 0
mov eax, str.standby
jne 0x45663b
mov eax, str.master
push eax
lea ecx, [ebp - 0x14c]
push str.BACKUP_FROM:__s_n
push ecx
call sym.postgres.exe_appendStringInfo
lea edx, [ebp - 0xc4]
push edx
lea eax, [ebp - 0x14c]
push str.START_TIME:__s_n
push eax
call sym.postgres.exe_appendStringInfo
mov ecx, dword [ebp - 0x15c]
push ecx
lea edx, [ebp - 0x14c]
push str.LABEL:__s_n
push edx
call sym.postgres.exe_appendStringInfo
add esp, 0x24
test bl, bl
je 0x456851
lea eax, [ebp - 0x128]
push eax
push str.backup_label
call sym.postgres.exe_pgwin32_safestat
add esp, 8
test eax, eax
je 0x4566f1
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 2
je 0x456747
push 0
push 0x6b554c
push 0x25ad
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456747
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
jmp 0x456747
push 0
push 0x6b554c
push 0x25b4
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x456747
push str.backup_label
push str.If_youre_sure_there_is_no_backup_in_progress__remove_file___s__and_try_again.
call sym.postgres.exe_errhint
add esp, 8
push eax
push str.a_backup_is_already_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, 0xc
push 0x6b1fb8
push str.backup_label
call sym.postgres.exe_AllocateFile
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x45679e
push eax
push 0x6b554c
push 0x25bc
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x45679e
push str.backup_label
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 ecx, dword [ebp - 0x148]
mov edx, dword [ebp - 0x14c]
push ebx
push 1
push ecx
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x4567fa
push ebx
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
test eax, eax
jne 0x4567fa
push ebx
call dword [sym.imp.MSVCR100.dll__fileno]
push eax
call sym.postgres.exe_pg_fsync
add esp, 8
test eax, eax
jne 0x4567fa
push ebx
call dword [sym.imp.MSVCR100.dll_ferror]
add esp, 4
test eax, eax
jne 0x4567fa
push ebx
call sym.postgres.exe_FreeFile
add esp, 4
test eax, eax
je 0x45683a
push 0
push 0x6b554c
push 0x25c5
push str.src_backend_access_transamxlog.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x45683a
push str.backup_label
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
mov eax, dword [ebp - 0x14c]
push eax
call sym.postgres.exe_pfree
mov bl, byte [ebp - 0x129]
add esp, 4
jmp 0x45685f
mov ecx, dword [ebp - 0x14c]
mov edx, dword [ebp - 0x158]
mov dword [edx], ecx
xor eax, eax
test bl, bl
setne al
push eax
push 0x44f740
call sym.postgres.exe_cancel_shmem_exit
mov edx, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x13c]
add esp, 8
mov dword [sym.postgres.exe_error_context_stack], edx
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov ecx, dword [ebp - 4]
mov edx, edi
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov bl, byte [ebp - 0x129]
mov eax, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x138]
xor edx, edx
test bl, bl
setne dl
mov dword [sym.postgres.exe_PG_exception_stack], eax
mov dword [sym.postgres.exe_error_context_stack], ecx
push edx
push 0x44f740
call sym.postgres.exe_cancel_shmem_exit
push edi
push 7
call sym.postgres.exe_LWLockAcquire
mov eax, dword [0x83350c]
add esp, 0x10
test bl, bl
je 0x4568ea
mov byte [eax + 0x1e], 0
jmp 0x4568ed
dec dword [eax + 0x20]
cmp byte [eax + 0x1e], 0
jne 0x4568fc
cmp dword [eax + 0x20], edi
jne 0x4568fc
mov byte [eax + 0x1c], 0
push 7
call sym.postgres.exe_LWLockRelease
add esp, 4
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3