Function at 0x5c2f70
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov edx, dword [sym.postgres.exe_ActivePortal]
push ebx
push esi
mov dword [ebp - 0x60], ecx
mov ecx, dword [sym.postgres.exe_PortalContext]
mov dword [ebp - 0x5c], eax
mov eax, dword [sym.postgres.exe_CurrentResourceOwner]
push edi
mov dword [ebp - 0x48], ecx
xor esi, esi
mov dword [ebp - 0x58], edx
mov edx, dword [sym.postgres.exe_PG_exception_stack]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.postgres.exe_error_context_stack]
lea ecx, [ebp - 0x44]
push esi
push ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], eax
call sub.MSVCR100.dll__setjmp3
add esp, 8
test eax, eax
jne 0x5c317a
mov edi, dword [ebp - 0x5c]
mov dword [sym.postgres.exe_ActivePortal], edi
lea edx, [ebp - 0x44]
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov eax, dword [edi + 0xc]
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
mov dword [sym.postgres.exe_CurrentResourceOwner], eax
mov ecx, dword [edi + 8]
mov dword [sym.postgres.exe_PortalContext], ecx
mov eax, dword [edi + 8]
mov ecx, dword [ebp + 0xc]
mov dword [sym.postgres.exe_CurrentMemoryContext], eax
mov dword [ebp - 0x68], edx
mov dword [edi + 0x28], ecx
mov edx, dword [edi + 0x20]
push edx
call sym.postgres.exe_ChoosePortalStrategy
add esp, 4
mov dword [edi + 0x2c], eax
cmp eax, 4
ja case.default.0x5c3023
jmp dword [eax*4 + 0x5c31c0]
mov eax, dword [ebp - 0x60]
cmp eax, esi
jne 0x5c3036
call sym.postgres.exe_GetTransactionSnapshot
push eax
call sym.postgres.exe_PushActiveSnapshot
mov eax, dword [edi + 0x20]
add esp, 4
cmp eax, esi
je 0x5c3049
mov esi, dword [eax + 8]
mov eax, dword [sym.postgres.exe_None_Receiver]
mov dword [ebp - 0x64], eax
call sym.postgres.exe_GetActiveSnapshot
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
mov ecx, dword [edi + 0x18]
mov ebx, dword [esi]
push 0x34
push edx
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x70], ecx
call sym.postgres.exe_MemoryContextAlloc
mov edx, dword [ebp - 0x70]
mov esi, eax
mov eax, dword [ebx + 4]
mov dword [esi], eax
mov eax, dword [ebp - 0x6c]
mov dword [esi + 4], ebx
mov ecx, dword [ebx + 0x1c]
push eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
call sym.postgres.exe_RegisterSnapshot
xor ebx, ebx
push ebx
mov dword [esi + 0x10], eax
call sym.postgres.exe_RegisterSnapshot
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x10]
add esp, 0x10
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
test byte [edi + 0x30], 2
je 0x5c30c6
or eax, 6
push eax
push esi
call sym.postgres.exe_ExecutorStart
mov dword [edi + 0x3c], esi
mov eax, dword [esi + 0x24]
mov dword [edi + 0x40], eax
mov word [edi + 0x50], 1
mov dword [edi + 0x54], ebx
add esp, 8
mov byte [edi + 0x52], bl
call sym.postgres.exe_PopActiveSnapshot
jmp case.default.0x5c3023
mov ecx, dword [edi + 0x20]
push ecx
call sym.postgres.exe_PortalListGetPrimaryStmt
mov edx, dword [eax + 0x10]
mov eax, dword [edx + 0x24]
push esi
push eax
call sym.postgres.exe_ExecCleanTypeFromTL
add esp, 0xc
mov dword [edi + 0x40], eax
mov word [edi + 0x50], 1
mov dword [edi + 0x54], esi
mov byte [edi + 0x52], 0
jmp case.default.0x5c3023
mov ecx, dword [edi + 0x20]
push ecx
call sym.postgres.exe_PortalListGetPrimaryStmt
push eax
call sym.postgres.exe_UtilityTupleDescriptor
add esp, 8
jmp 0x5c3105
mov dword [edi + 0x40], esi
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x68]
mov dword [sym.postgres.exe_CurrentMemoryContext], ecx
mov ecx, dword [ebp - 0x48]
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov edx, dword [ebp - 0x58]
mov dword [sym.postgres.exe_error_context_stack], eax
mov eax, dword [ebp - 0x4c]
mov dword [sym.postgres.exe_PortalContext], ecx
mov ecx, dword [ebp - 4]
mov dword [sym.postgres.exe_ActivePortal], edx
mov dword [sym.postgres.exe_CurrentResourceOwner], eax
mov dword [edi + 0x34], 2
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
push ecx
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov dword [sym.postgres.exe_error_context_stack], eax
call sym.postgres.exe_MarkPortalFailed
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
add esp, 4
mov dword [sym.postgres.exe_ActivePortal], edx
mov dword [sym.postgres.exe_CurrentResourceOwner], eax
mov dword [sym.postgres.exe_PortalContext], ecx
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
mov edi, edi
sub dh, byte [eax]
pop esp
add ah, ch
xor byte [eax + eax - 0x14], bl
xor byte [eax + eax + 0x17], bl
xor dword [eax + eax + 0x2b], ebx
xor dword [eax + eax - 0x34], ebx
int3