Function at 0x5a1800
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, eax
cmp dword [esi + 0xc], 0xffffffff
mov eax, dword [ebp + 0x1c]
mov byte [eax], 0
mov ecx, dword [sym.postgres.exe_CurrentResourceOwner]
push edi
push ecx
setne byte [ebp - 1]
call sym.postgres.exe_ResourceOwnerEnlargeBuffers
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
add esp, 4
cmp ebx, 0xffffffff
sete al
mov byte [ebp - 3], al
test al, al
je 0x5a184a
push edi
push esi
call sym.postgres.exe_smgrnblocks
add esp, 8
mov dword [ebp + 0x10], eax
mov ebx, eax
cmp byte [ebp - 1], 0
je 0x5a18c3
lea edx, [ebp - 2]
push edx
push ebx
push edi
push esi
call sym.postgres.exe_LocalBufferAlloc
add esp, 0x10
cmp byte [ebp - 2], 0
mov edi, eax
je 0x5a18a7
inc dword [0x8692f0]
cmp byte [ebp - 3], 0
jne 0x5a192a
mov ecx, dword [ebp + 0x1c]
mov byte [ecx], 1
inc dword [sym.postgres.exe_VacuumPageHit]
cmp byte [sym.postgres.exe_VacuumCostActive], 0
je 0x5a1c33
mov edx, dword [sym.postgres.exe_VacuumCostPageHit]
add dword [sym.postgres.exe_VacuumCostBalance], edx
mov eax, dword [edi + 0x24]
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc dword [0x8692f4]
mov edx, dword [edi + 0x24]
mov ecx, dword [sym.postgres.exe_LocalBufferBlockPointers]
lea eax, [edx*4 + 8]
sub ecx, eax
mov ebx, dword [ecx]
jmp 0x5a18fa
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
push ebx
push edi
push eax
push esi
lea ecx, [ebp - 2]
call fcn.005a12b0
add esp, 0x10
cmp byte [ebp - 2], 0
mov edi, eax
je 0x5a18e8
inc dword [sym.postgres.exe_pgBufferUsage]
jmp 0x5a186d
inc dword [0x8692e4]
mov ebx, dword [edi + 0x24]
shl ebx, 0xd
add ebx, dword [sym.postgres.exe_BufferBlocks]
cmp byte [ebp - 3], 0
je 0x5a1a1c
push 0x2000
push 0
push ebx
call sub.MSVCR100.dll_memset
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push 0
push ebx
push edx
push eax
push esi
call sym.postgres.exe_smgrextend
add esp, 0x20
jmp 0x5a1bae
cmp byte [ebp - 1], 0
mov eax, dword [edi + 0x24]
je 0x5a1946
mov edx, dword [sym.postgres.exe_LocalBufferBlockPointers]
lea ecx, [eax*4 + 8]
sub edx, ecx
mov eax, dword [edx]
jmp 0x5a194f
shl eax, 0xd
add eax, dword [sym.postgres.exe_BufferBlocks]
cmp word [eax + 0xe], 0
je 0x5a19bd
push 0
push str.ReadBuffer_common
push 0x17c
push str.src_backend_storage_buffer_bufmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a19bd
push str.This_has_been_seen_to_occur_with_buggy_kernels__consider_updating_your_system.
call sym.postgres.exe_errhint
mov ecx, dword [esi + 0xc]
mov edx, dword [esi]
add esp, 4
push eax
mov eax, dword [ebp + 0xc]
push eax
push ecx
mov ecx, dword [esi + 4]
sub esp, 0xc
mov eax, esp
mov dword [eax], edx
mov edx, dword [esi + 8]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
call sym.postgres.exe_relpathbackend
push eax
push ebx
push str.unexpected_data_beyond_EOF_in_block__u_of_relation__s
call sym.postgres.exe_errmsg
add esp, 0x20
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp byte [ebp - 1], 0
je 0x5a19d3
movzx eax, word [edi + 0x14]
and eax, 0xfffffffd
mov word [edi + 0x14], ax
jmp 0x5a18ad
lea ebx, [edi + 0x20]
push 0
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x5a19f8
push 0x193
push str.src_backend_storage_buffer_bufmgr.c
push ebx
call sym.postgres.exe_s_lock
add esp, 0xc
movzx ecx, word [edi + 0x14]
and ecx, 0xfffffffd
mov word [edi + 0x14], cx
push 1
mov dword [ebx], 0
call fcn.005a04a0
add esp, 4
test al, al
je 0x5a19d6
jmp 0x5a18ee
cmp dword [ebp + 0x14], 1
je 0x5a1b9e
cmp byte [sym.postgres.exe_track_io_timing], 0
je 0x5a1a39
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
push edx
push eax
push esi
call sym.postgres.exe_smgrread
add esp, 0x10
cmp byte [sym.postgres.exe_track_io_timing], 0
je 0x5a1aa5
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x14]
sub dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x1c]
sbb dword [ebp - 8], eax
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0xc]
fmul qword [0x6cb7e8]
fild qword [ebp - 0x1c]
fdivp st(1)
call fcn.006a8d46
add dword [sym.postgres.exe_pgStatBlockReadTime], eax
mov eax, dword [ebp - 8]
adc dword [0x8363b4], edx
mov edx, dword [ebp - 0xc]
add dword [0x869308], edx
adc dword [0x86930c], eax
push ebx
call sym.postgres.exe_PageHeaderIsValid
add esp, 4
test al, al
jne 0x5a1bae
cmp dword [ebp + 0x14], 2
je 0x5a1b34
cmp byte [sym.postgres.exe_zero_damaged_pages], al
jne 0x5a1b34
push 0
push str.ReadBuffer_common
push 0x1dc
push str.src_backend_storage_buffer_bufmgr.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a1bae
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi + 0xc]
push ecx
mov ecx, dword [esi]
push edx
mov edx, dword [esi + 4]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esi + 8]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
call sym.postgres.exe_relpathbackend
mov edx, dword [ebp + 0x10]
push eax
push edx
push str.invalid_page_header_in_block__u_of_relation__s
call sym.postgres.exe_errmsg
add esp, 0x20
push eax
push 0x1000a28
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
jmp 0x5a1bae
push 0
push str.ReadBuffer_common
push 0x1d4
push str.src_backend_storage_buffer_bufmgr.c
push 0x13
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5a1b9e
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi]
push eax
push ecx
mov ecx, dword [esi + 4]
sub esp, 0xc
mov eax, esp
mov dword [eax], edx
mov edx, dword [esi + 8]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
call sym.postgres.exe_relpathbackend
push eax
mov eax, dword [ebp + 0x10]
push eax
push str.invalid_page_header_in_block__u_of_relation__s__zeroing_out_page
call sym.postgres.exe_errmsg
add esp, 0x20
push eax
push 0x1000a28
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
push 0x2000
push 0
push ebx
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x5a1bc1
movzx ecx, word [edi + 0x14]
or ecx, 2
mov word [edi + 0x14], cx
jmp 0x5a1c18
push 0
push 1
lea esi, [edi + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x5a1be6
push 0xb1d
push str.src_backend_storage_buffer_bufmgr.c
push esi
call sym.postgres.exe_s_lock
add esp, 0xc
movzx edx, word [edi + 0x14]
and edx, 0xffffffe7
mov word [edi + 0x14], dx
movzx eax, word [edi + 0x14]
or eax, 2
mov word [edi + 0x14], ax
mov dword [esi], 0
mov ecx, dword [edi + 0x2c]
push ecx
mov dword [0x836f08], 0
call sym.postgres.exe_LWLockRelease
add esp, 4
inc dword [sym.postgres.exe_VacuumPageMiss]
cmp byte [sym.postgres.exe_VacuumCostActive], 0
je 0x5a1c33
mov edx, dword [sym.postgres.exe_VacuumCostPageMiss]
add dword [sym.postgres.exe_VacuumCostBalance], edx
mov eax, dword [edi + 0x24]
pop edi
pop esi
inc eax
pop ebx
mov esp, ebp
pop ebp
ret