Function at 0x699000
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [sym.postgres.exe_FirstSnapshotSet], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
jne 0x699033
call sym.postgres.exe_GetTopTransactionIdIfAny
test eax, eax
jne 0x699033
call sym.postgres.exe_IsSubTransaction
test al, al
je 0x699076
push 0
push 0x771970
push 0x3e4
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x699076
push str.SET_TRANSACTION_SNAPSHOT_must_be_called_before_any_query
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x1000142
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp dword [0x869454], 2
jge 0x6990c2
push 0
push 0x771970
push 0x3ed
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x6990c2
push str.a_snapshot_importing_transaction_must_have_isolation_level_SERIALIZABLE_or_REPEATABLE_READ
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x440
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6990c7
sub eax, edx
push str.0123456789ABCDEF_
push ebx
mov esi, eax
call dword [sym.imp.MSVCR100.dll_strspn]
add esp, 8
cmp eax, esi
je 0x699129
push 0
push 0x771970
push 0x3f6
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x699129
push ebx
push str.invalid_snapshot_identifier:___s_
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 ebx
push str.pg_snapshots__s
lea eax, [ebp - 0x404]
push 0x400
push eax
call sym.postgres.exe_pg_snprintf
lea ecx, [ebp - 0x404]
push 0x6bf9bc
push ecx
call sym.postgres.exe_AllocateFile
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x69919e
push eax
push 0x771970
push 0x3ff
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x69919e
push ebx
push str.invalid_snapshot_identifier:___s_
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
call dword [sym.imp.MSVCR100.dll__fileno]
lea edx, [ebp - 0x428]
push edx
push eax
call dword [sym.imp.MSVCR100.dll__fstat32]
add esp, 0xc
test eax, eax
je 0x6991e4
push 0x771970
push 0x403
push str.src_backendutils_time_snapmgr.c
call sym.postgres.exe_elog_start
lea eax, [ebp - 0x404]
push eax
push str.could_not_stat_file___s_:__m
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x18
mov ecx, dword [ebp - 0x414]
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
inc ecx
push ecx
push edx
call sym.postgres.exe_MemoryContextAlloc
mov esi, eax
mov eax, dword [ebp - 0x414]
push edi
push 1
push eax
push esi
mov dword [ebp - 0x42c], esi
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x18
cmp eax, 1
je 0x699243
push 0x771970
push 0x408
push str.src_backendutils_time_snapmgr.c
call sym.postgres.exe_elog_start
lea ecx, [ebp - 0x404]
push ecx
push str.could_not_read_file___s_:__m
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x18
mov edx, dword [ebp - 0x414]
push edi
mov byte [edx + esi], 0
call sym.postgres.exe_FreeFile
push 0x2c
lea eax, [ebp - 0x468]
push 0
push eax
call sub.MSVCR100.dll_memset
lea ecx, [ebp - 0x42c]
push ecx
lea ebx, [ebp - 0x404]
mov ecx, str.xid:
call fcn.00698a70
lea edx, [ebp - 0x42c]
push edx
mov ecx, str.dbid:
mov dword [ebp - 0x438], eax
call fcn.00698a70
mov dword [ebp - 0x434], eax
lea eax, [ebp - 0x42c]
push eax
mov ecx, str.iso:
call fcn.00698930
lea ecx, [ebp - 0x42c]
push ecx
mov ecx, 0x771880
mov dword [ebp - 0x43c], eax
call fcn.00698930
lea edx, [ebp - 0x42c]
push edx
mov ecx, str.xmin:
mov byte [ebp - 0x42d], al
call fcn.00698a70
mov dword [ebp - 0x464], eax
lea eax, [ebp - 0x42c]
push eax
mov ecx, str.xmax:
call fcn.00698a70
lea ecx, [ebp - 0x42c]
push ecx
mov ecx, str.xcnt:
mov dword [ebp - 0x460], eax
call fcn.00698930
mov esi, eax
add esp, 0x2c
mov dword [ebp - 0x458], esi
test esi, esi
js 0x69931c
call sym.postgres.exe_GetMaxSnapshotXidCount
cmp esi, eax
jle 0x699366
push 0
push 0x771970
push 0x422
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x699366
lea edx, [ebp - 0x404]
push edx
push str.invalid_snapshot_data_in_file___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x2020082
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
lea eax, [esi*4]
push eax
push ecx
call sym.postgres.exe_MemoryContextAlloc
add esp, 8
xor edi, edi
mov dword [ebp - 0x45c], eax
test esi, esi
jle 0x6993b8
lea esp, [esp]
lea edx, [ebp - 0x42c]
push edx
lea ebx, [ebp - 0x404]
mov ecx, str.xip:
call fcn.00698a70
mov ecx, dword [ebp - 0x45c]
mov dword [ecx + edi*4], eax
inc edi
add esp, 4
cmp edi, esi
jl 0x699390
lea edx, [ebp - 0x42c]
push edx
lea ebx, [ebp - 0x404]
mov ecx, str.sof:
call fcn.00698930
xor ecx, ecx
add esp, 4
mov byte [ebp - 0x44c], al
cmp al, cl
jne 0x6994aa
lea eax, [ebp - 0x42c]
push eax
mov ecx, str.sxcnt:
call fcn.00698930
mov edi, eax
add esp, 4
mov dword [ebp - 0x454], edi
test edi, edi
js 0x69940b
call sym.postgres.exe_GetMaxSnapshotSubxidCount
cmp edi, eax
jle 0x699455
push 0
push 0x771970
push 0x432
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x699455
lea ecx, [ebp - 0x404]
push ecx
push str.invalid_snapshot_data_in_file___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x2020082
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
lea edx, [edi*4]
push edx
push eax
call sym.postgres.exe_MemoryContextAlloc
add esp, 8
xor esi, esi
mov dword [ebp - 0x450], eax
test edi, edi
jle 0x6994b6
jmp 0x699480
lea ecx, [ebp - 0x42c]
push ecx
lea ebx, [ebp - 0x404]
mov ecx, str.sxp:
call fcn.00698a70
mov edx, dword [ebp - 0x450]
mov dword [edx + esi*4], eax
inc esi
add esp, 4
cmp esi, edi
jl 0x699480
jmp 0x6994b6
mov dword [ebp - 0x454], ecx
mov dword [ebp - 0x450], ecx
lea eax, [ebp - 0x42c]
push eax
lea ebx, [ebp - 0x404]
mov ecx, str.rec:
call fcn.00698930
mov ebx, dword [ebp - 0x438]
add esp, 4
mov esi, 3
mov byte [ebp - 0x44b], al
pop edi
cmp ebx, esi
jb 0x6994ff
cmp dword [ebp - 0x434], 0
je 0x6994ff
cmp dword [ebp - 0x464], esi
jb 0x6994ff
cmp dword [ebp - 0x460], esi
jae 0x699549
push 0
push 0x771970
push 0x44b
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x699549
lea ecx, [ebp - 0x404]
push ecx
push str.invalid_snapshot_data_in_file___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x2020082
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp dword [0x869454], esi
jne 0x6995f5
cmp dword [ebp - 0x43c], esi
je 0x6995a0
push 0
push 0x771970
push 0x458
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x6995a0
push str.a_serializable_transaction_cannot_import_a_snapshot_from_a_non_serializable_transaction
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x440
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp byte [ebp - 0x42d], 0
je 0x6995f5
cmp byte [0x869458], 0
jne 0x6995f5
push 0
push 0x771970
push 0x45c
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x6995f5
push str.a_non_read_only_serializable_transaction_cannot_import_a_snapshot_from_a_read_only_transaction
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x440
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov edx, dword [ebp - 0x434]
cmp edx, dword [sym.postgres.exe_MyDatabaseId]
je 0x699646
push 0
push 0x771970
push 0x46b
push str.src_backendutils_time_snapmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x699646
push str.cannot_import_a_snapshot_from_a_different_database
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x440
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
lea esi, [ebp - 0x468]
call fcn.00698de0
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret