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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
fldz
mov ecx, dword [ebp + 0x14]
fstp qword [ebp - 0x128]
mov edx, dword [ebp + 0x18]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x108], eax
mov al, byte [esi + 5]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x114], ecx
mov dword [ebp - 0x10c], edx
test al, al
je 0x4939ed
cmp byte [esi + 8], bl
je 0x4939e4
mov ebx, 1
jmp 0x4939ed
test al, al
je 0x4939ed
mov ebx, 4
cmp byte [esi + 7], 0
je 0x4939f6
or ebx, 2
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
call sym.postgres.exe_GetActiveSnapshot
push eax
call sym.postgres.exe_PushCopiedSnapshot
add esp, 4
call sym.postgres.exe_UpdateActiveSnapshotCommandId
test edi, edi
je 0x493a25
push edi
call sym.postgres.exe_CreateIntoRelDestReceiver
add esp, 4
jmp 0x493a2a
mov eax, dword [sym.postgres.exe_None_Receiver]
mov ecx, dword [ebp - 0x10c]
push ebx
push ecx
push eax
push 0
call sym.postgres.exe_GetActiveSnapshot
mov edx, dword [ebp - 0x114]
push eax
mov eax, dword [ebp - 0x108]
push edx
push eax
call sym.postgres.exe_CreateQueryDesc
xor ecx, ecx
add esp, 0x1c
cmp byte [esi + 5], cl
mov ebx, eax
sete cl
mov dword [ebp - 0x108], ecx
test edi, edi
je 0x493a74
push edi
call sym.postgres.exe_GetIntoRelEFlags
add esp, 4
or dword [ebp - 0x108], eax
mov edx, dword [ebp - 0x108]
push edx
push ebx
call sym.postgres.exe_ExecutorStart
add esp, 8
cmp byte [esi + 5], 0
je 0x493afb
test edi, edi
je 0x493a98
cmp byte [edi + 0x18], 0
je 0x493a98
xor eax, eax
jmp 0x493a9d
mov eax, 1
push 0
push eax
push ebx
call sym.postgres.exe_ExecutorRun
push ebx
call sym.postgres.exe_ExecutorFinish
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [ebp - 0x120]
sub dword [ebp - 0x110], ecx
mov edx, dword [ebp - 0x11c]
lea eax, [ebp - 0x128]
sbb dword [ebp - 0x10c], edx
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0x110]
fild qword [ebp - 0x128]
fdivp st(1)
fadd qword [0x6abb80]
fstp qword [ebp - 0x128]
mov eax, dword [esi + 0xc]
mov edi, 1
sub eax, edi
je 0x493b64
sub eax, edi
je 0x493b34
sub eax, edi
jne 0x493b76
call fcn.00490c60
mov ecx, dword [esi]
push 0x6c0df0
push ecx
call sym.postgres.exe_appendStringInfoString
mov edx, dword [esi + 0x1c]
push edx
push 0
call sym.postgres.exe_lcons_int
add esp, 0x10
mov dword [esi + 0x1c], eax
jmp 0x493b73
call fcn.00490c00
mov eax, dword [esi + 0x18]
mov ecx, dword [esi]
add eax, eax
push eax
push ecx
call sym.postgres.exe_appendStringInfoSpaces
mov edx, dword [esi]
push 0x7b
push edx
call sym.postgres.exe_appendStringInfoChar
mov eax, dword [esi + 0x1c]
push eax
push 0
call sym.postgres.exe_lcons_int
add esp, 0x18
mov dword [esi + 0x1c], eax
jmp 0x493b73
push 0
mov eax, str.Query
call fcn.00490a80
add esp, 4
add dword [esi + 0x18], edi
mov ecx, dword [ebx + 4]
mov dword [esi + 0x10], ecx
mov edx, dword [ebx + 4]
mov eax, dword [edx + 0x14]
push esi
push 0
push 0
mov dword [esi + 0x14], eax
mov ecx, dword [ebx + 0x2c]
push 0
push ecx
call fcn.00491fe0
add esp, 0x14
cmp byte [esi + 5], 0
je 0x493caf
mov eax, dword [ebx + 0x28]
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x10c], eax
push str.Triggers
mov eax, esi
xor cl, cl
mov edi, str.Triggers
mov dword [ebp - 0x114], edx
call fcn.00491100
mov eax, dword [ebp - 0x114]
add esp, 4
cmp eax, 1
jg 0x493be8
cmp dword [ebp - 0x10c], 0
mov byte [ebp - 0x108], 0
je 0x493bef
mov byte [ebp - 0x108], 1
mov ecx, dword [ebx + 0x28]
mov edi, dword [ecx + 0x20]
test eax, eax
jle 0x493c1e
mov dword [ebp - 0x114], eax
nop
mov edx, dword [ebp - 0x108]
push edx
mov edx, esi
mov ecx, edi
call fcn.00491370
add esp, 4
add edi, 0x34
dec dword [ebp - 0x114]
jne 0x493c00
mov eax, dword [ebp - 0x10c]
test eax, eax
je 0x493c4a
mov edi, dword [eax + 8]
test edi, edi
je 0x493c4a
nop
mov eax, dword [ebp - 0x108]
mov ecx, dword [edi]
push eax
mov edx, esi
call fcn.00491370
mov edi, dword [edi + 4]
add esp, 4
test edi, edi
jne 0x493c30
mov eax, dword [esi + 0xc]
dec eax
je 0x493c9d
dec eax
je 0x493c67
dec eax
jne 0x493caf
mov ecx, dword [esi + 0x1c]
dec dword [esi + 0x18]
push ecx
call sym.postgres.exe_list_delete_first
mov dword [esi + 0x1c], eax
jmp 0x493cac
mov edx, dword [esi]
dec dword [esi + 0x18]
push 0xa
push edx
call sym.postgres.exe_appendStringInfoChar
mov eax, dword [esi + 0x18]
mov ecx, dword [esi]
add eax, eax
push eax
push ecx
call sym.postgres.exe_appendStringInfoSpaces
mov edx, dword [esi]
push 0x5d
push edx
call sym.postgres.exe_appendStringInfoChar
mov eax, dword [esi + 0x1c]
push eax
call sym.postgres.exe_list_delete_first
add esp, 0x1c
mov dword [esi + 0x1c], eax
jmp 0x493caf
dec dword [esi + 0x18]
push 1
mov eax, str.Triggers
call fcn.00490a80
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea ecx, [ebp - 0x120]
push ecx
call edi
push ebx
call sym.postgres.exe_ExecutorEnd
push ebx
call sym.postgres.exe_FreeQueryDesc
add esp, 8
call sym.postgres.exe_PopActiveSnapshot
cmp byte [esi + 5], 0
je 0x493cdd
call sym.postgres.exe_CommandCounterIncrement
lea edx, [ebp - 0x110]
push edx
call edi
mov eax, dword [ebp - 0x120]
sub dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x11c]
lea edx, [ebp - 0x118]
sbb dword [ebp - 0x10c], ecx
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0x110]
cmp byte [esi + 5], 0
fild qword [ebp - 0x118]
fdivp st(1)
fadd qword [ebp - 0x128]
je 0x493d7a
fmul qword [0x6c0e88]
sub esp, 8
cmp dword [esi + 0xc], 0
fstp qword [esp]
jne 0x493d49
mov eax, dword [esi]
push str.Total_runtime:__.3f_ms_n
push eax
call sym.postgres.exe_appendStringInfo
add esp, 0x10
jmp 0x493d7c
push 3
push str._.f
lea ecx, [ebp - 0x104]
push pe_nt_image_headers32
push ecx
call sym.postgres.exe_pg_snprintf
push 1
mov eax, esi
lea ecx, [ebp - 0x104]
mov edi, str.Total_Runtime
call fcn.00490ed0
add esp, 0x1c
jmp 0x493d7c
fstp st(0)
mov eax, dword [esi + 0xc]
dec eax
je 0x493df0
dec eax
je 0x493dab
dec eax
jne 0x493e02
mov edx, dword [esi + 0x1c]
dec dword [esi + 0x18]
push edx
call sym.postgres.exe_list_delete_first
add esp, 4
pop edi
mov dword [esi + 0x1c], eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
dec dword [esi + 0x18]
push 0xa
push eax
call sym.postgres.exe_appendStringInfoChar
mov ecx, dword [esi + 0x18]
mov edx, dword [esi]
add ecx, ecx
push ecx
push edx
call sym.postgres.exe_appendStringInfoSpaces
mov eax, dword [esi]
push 0x7d
push eax
call sym.postgres.exe_appendStringInfoChar
mov ecx, dword [esi + 0x1c]
push ecx
call sym.postgres.exe_list_delete_first
add esp, 0x1c
pop edi
mov dword [esi + 0x1c], eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
dec dword [esi + 0x18]
push 1
mov eax, str.Query
call fcn.00490a80
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret