Function at 0x664f20
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x18], 0
push esi
push edi
mov dword [ebp - 0x10c], ebx
mov dword [ebp - 0x120], eax
jne 0x664f57
push ebx
call fcn.00664480
add esp, 4
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
lea esi, [ebx + 0x48]
mov ecx, 0x30
lea edi, [ebp - 0xc4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x68], edx
mov edx, dword [ebp - 0x120]
mov dword [ebp - 0x98], ecx
mov ecx, dword [ebp + 0x1c]
push edx
lea edi, [ebp - 0xc4]
mov dword [ebp - 0x38], eax
mov dword [ebp - 8], ecx
call fcn.00663970
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax + 0x10c]
add esp, 4
mov dword [ebp - 0x11c], eax
test eax, eax
je 0x6651e7
jmp 0x664fc0
mov ecx, dword [ebp - 0x11c]
mov esi, dword [ecx + 8]
cmp byte [esi + 0x1c], 0
mov dword [ebp - 0x148], esi
jne 0x6651d1
mov edx, dword [ebp - 0x13c]
cmp dword [esi + 0x20], edx
jne 0x6651d1
movsx ecx, word [esi + 0x1e]
mov eax, dword [ebp - 0x120]
cmp ecx, eax
jne 0x6651d1
lea ebx, [ebp - 0xc4]
mov ecx, eax
mov dword [ebp - 0x14c], ebx
test eax, eax
je 0x66518f
dec ecx
test byte [ebx], 1
mov dword [ebp - 0x150], ecx
jne 0x6651ca
movzx eax, word [ebx + 4]
test ax, ax
jle 0x66512b
mov edx, dword [esi + 0x34]
movzx ecx, word [edx + 0x12]
and ecx, 0x7ff
cmp ax, cx
jle 0x66504d
mov byte [ebp - 0x105], 1
xor eax, eax
jmp 0x66514a
mov byte [ebp - 0x105], 0
mov edi, dword [esi + 0x34]
test byte [edi + 0x14], 1
jne 0x6650e7
mov edx, dword [ebp - 0x10c]
mov eax, dword [edx + 0x18]
movsx edx, word [ebx + 4]
mov ecx, dword [eax + 4]
mov edi, dword [ecx + edx*4 - 4]
mov ecx, dword [edi + 0x54]
test ecx, ecx
js 0x6650d7
cmp byte [edi + 0x5c], 0
je 0x6650ca
movzx eax, word [edi + 0x4c]
cmp ax, 4
jne 0x66509d
mov eax, dword [esi + 0x34]
movzx edx, byte [eax + 0x16]
add edx, eax
mov eax, dword [edx + ecx]
jmp 0x66514a
cmp ax, 2
mov eax, dword [esi + 0x34]
movzx edx, byte [eax + 0x16]
jne 0x6650ba
add edx, eax
movsx eax, word [edx + ecx]
and eax, 0xffff
jmp 0x66514a
add edx, eax
movsx eax, byte [edx + ecx]
and eax, 0xff
jmp 0x66514a
mov edx, dword [esi + 0x34]
movzx eax, byte [edx + 0x16]
add eax, edx
add eax, ecx
jmp 0x66514a
push eax
push edx
lea eax, [esi + 0x24]
push eax
call sym.postgres.exe_nocachegetattr
add esp, 0xc
jmp 0x66514a
movsx eax, word [ebx + 4]
dec eax
mov ecx, eax
and ecx, 7
mov edx, 1
shl edx, cl
sar eax, 3
mov al, byte [eax + edi + 0x17]
test al, dl
jne 0x66510e
mov byte [ebp - 0x105], 1
xor eax, eax
jmp 0x66514a
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ecx + 0x18]
movsx eax, word [ebx + 4]
push edx
push eax
lea ecx, [esi + 0x24]
push ecx
call sym.postgres.exe_nocachegetattr
add esp, 0xc
jmp 0x66514a
mov ecx, dword [ebp - 0x10c]
lea edx, [ebp - 0x105]
push edx
mov edx, dword [ecx + 0x18]
cwde
push edx
push eax
lea ecx, [esi + 0x24]
push ecx
call sym.postgres.exe_heap_getsysattr
add esp, 0x10
cmp byte [ebp - 0x105], 0
mov dword [ebp - 0x114], eax
jne 0x6651ca
mov edx, dword [ebx + 0x2c]
push edx
push eax
mov eax, dword [ebx + 0xc]
push eax
lea ecx, [ebx + 0x10]
push ecx
call sym.postgres.exe_FunctionCall2Coll
add esp, 0x10
mov dword [ebp - 0x154], eax
test al, al
je 0x6651ca
mov ecx, dword [ebp - 0x150]
add ebx, 0x30
mov dword [ebp - 0x14c], ebx
test ecx, ecx
jne 0x665010
lea eax, [esi + 8]
push eax
call sym.postgres.exe_DLMoveToFront
mov ecx, dword [sym.postgres.exe_CurrentResourceOwner]
push ecx
call sym.postgres.exe_ResourceOwnerEnlargeCatCacheListRefs
inc dword [esi + 0x18]
mov edx, dword [sym.postgres.exe_CurrentResourceOwner]
push esi
push edx
call sym.postgres.exe_ResourceOwnerRememberCatCacheListRef
mov ecx, dword [ebp - 4]
add esp, 0x10
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x10d], 0
mov edx, dword [ebp - 0x11c]
mov eax, dword [edx]
mov dword [ebp - 0x11c], eax
test eax, eax
jne 0x664fc0
mov eax, dword [sym.postgres.exe_CurrentResourceOwner]
push eax
call sym.postgres.exe_ResourceOwnerEnlargeCatCacheListRefs
mov ecx, dword [sym.postgres.exe_PG_exception_stack]
mov edx, dword [sym.postgres.exe_error_context_stack]
lea eax, [ebp - 0x104]
push 0
push eax
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x140], edx
call sub.MSVCR100.dll__setjmp3
add esp, 0xc
test eax, eax
jne 0x6654ef
mov ebx, dword [ebp - 0x10c]
lea ecx, [ebp - 0x104]
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov edx, dword [ebx + 0xc]
push 1
push edx
call sym.postgres.exe_heap_open
mov ecx, dword [ebp - 0x120]
mov edi, eax
add esp, 8
lea eax, [ebp - 0xc4]
push eax
push ecx
push sym.postgres.exe_SnapshotNowData
mov eax, ebx
mov dword [ebp - 0x128], edi
call fcn.00664630
movzx edx, al
mov eax, dword [ebx + 0x10]
push edx
push eax
push edi
call sym.postgres.exe_systable_beginscan
mov esi, eax
cmp dword [esi + 4], 0
push esi
mov dword [ebp - 0x134], esi
setne byte [ebp - 0x115]
call sym.postgres.exe_systable_getnext
add esp, 0x1c
mov dword [ebp - 0x12c], eax
test eax, eax
je 0x665397
lea ecx, [ebx + 0x20]
mov dword [ebp - 0x130], ecx
jmp 0x6652b8
mov eax, dword [ebp - 0x12c]
push ebx
xor esi, esi
call fcn.00663a40
mov edx, dword [ebp - 0x130]
mov edi, dword [edx]
dec edi
and edi, eax
mov ebx, dword [ebx + edi*8 + 0x114]
add esp, 4
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x11c], ebx
test ebx, ebx
je 0x665337
mov esi, dword [ebx + 8]
cmp byte [esi + 0x20], 0
jne 0x66531f
cmp byte [esi + 0x21], 0
jne 0x66531f
cmp dword [esi + 0x24], eax
jne 0x66531f
mov eax, dword [ebp - 0x12c]
add eax, 4
push eax
lea ecx, [esi + 0x2c]
push ecx
call sym.postgres.exe_ItemPointerEquals
add esp, 8
test al, al
je 0x665319
cmp dword [esi + 0x18], 0
je 0x665327
mov eax, dword [ebp - 0x138]
mov ebx, dword [ebx]
test ebx, ebx
jne 0x6652e5
jmp 0x66532d
mov eax, dword [ebp - 0x138]
mov dword [ebp - 0x11c], ebx
test ebx, ebx
jne 0x665352
mov edx, dword [ebp - 0x12c]
push 0
push edi
mov edi, dword [ebp - 0x10c]
push eax
push edx
call fcn.006647a0
add esp, 0x10
mov esi, eax
mov eax, dword [ebp - 0x124]
push esi
push eax
call sym.postgres.exe_lappend
mov ecx, dword [ebp - 0x134]
inc dword [esi + 0x1c]
push ecx
mov dword [ebp - 0x124], eax
call sym.postgres.exe_systable_getnext
mov ebx, dword [ebp - 0x10c]
add esp, 0xc
mov dword [ebp - 0x12c], eax
test eax, eax
jne 0x6652b2
mov esi, dword [ebp - 0x134]
mov edi, dword [ebp - 0x128]
push esi
call sym.postgres.exe_systable_endscan
push 1
push edi
call sym.postgres.exe_relation_close
mov edx, dword [ebp - 0x120]
push edx
push ebx
lea ecx, [ebp - 0xc4]
call fcn.00664860
mov ecx, dword [sym.postgres.exe_CacheMemoryContext]
mov edi, eax
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x124]
add esp, 0x14
mov dword [sym.postgres.exe_CurrentMemoryContext], ecx
test eax, eax
je 0x6653e3
mov ebx, dword [eax + 4]
jmp 0x6653e5
xor ebx, ebx
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
lea edx, [ebx*4 + 0x40]
push edx
push eax
call sym.postgres.exe_MemoryContextAlloc
mov esi, eax
lea ecx, [esi + 0x24]
push ecx
push edi
mov dword [ebp - 0x148], esi
call sym.postgres.exe_heap_copytuple_with_tuple
mov edx, dword [ebp - 0x128]
push edi
mov dword [sym.postgres.exe_CurrentMemoryContext], edx
call sym.postgres.exe_heap_freetuple
mov eax, dword [ebp - 0x144]
mov ecx, dword [ebp - 0x140]
mov edx, dword [ebp - 0x10c]
mov dword [sym.postgres.exe_PG_exception_stack], eax
lea eax, [esi + 8]
mov dword [sym.postgres.exe_error_context_stack], ecx
push esi
mov dword [esi], 0x52765103
push eax
mov dword [esi + 4], edx
mov dword [ebp - 0x130], eax
call sym.postgres.exe_DLInitElem
mov cx, word [ebp - 0x120]
mov edx, dword [ebp - 0x13c]
lea eax, [esi + 0x1c]
mov dword [esi + 0x18], 0
mov byte [eax], 0
lea edi, [esi + 0x18]
mov dword [ebp - 0x128], eax
mov al, byte [ebp - 0x115]
mov byte [esi + 0x1d], al
mov eax, dword [ebp - 0x124]
mov word [esi + 0x1e], cx
mov dword [esi + 0x20], edx
add esp, 0x1c
mov dword [esi + 0x38], ebx
mov esi, dword [ebp - 0x148]
test eax, eax
je 0x6654c8
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x6654c8
lea edx, [esi + 0x3c]
mov eax, dword [ecx]
mov dword [edx], eax
dec dword [eax + 0x1c]
add edx, 4
cmp byte [eax + 0x20], 0
mov dword [eax + 0x18], esi
je 0x6654c1
mov eax, dword [ebp - 0x128]
mov byte [eax], 1
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x6654a5
mov ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0x10c]
push ecx
add edx, 0x10c
push edx
call sym.postgres.exe_DLAddHead
inc dword [edi]
mov eax, dword [sym.postgres.exe_CurrentResourceOwner]
push esi
push eax
jmp 0x6651af
mov eax, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x144]
mov edx, dword [ebp - 0x140]
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov dword [sym.postgres.exe_error_context_stack], edx
test eax, eax
je 0x66558f
mov edi, dword [eax + 8]
test edi, edi
je 0x66558f
mov ebx, dword [ebp - 0x10c]
mov esi, dword [edi]
dec dword [esi + 0x1c]
cmp byte [esi + 0x20], 0
mov eax, dword [esi + 0x1c]
je 0x665588
test eax, eax
jne 0x665588
mov eax, dword [esi + 0x18]
test eax, eax
je 0x665555
cmp dword [eax + 0x18], 0
jne 0x665588
test eax, eax
je 0x665555
push eax
push ebx
mov byte [esi + 0x20], 1
call fcn.00663eb0
add esp, 8
jmp 0x665588
lea eax, [esi + 8]
push eax
call sym.postgres.exe_DLRemove
mov eax, dword [esi + 0x38]
add esp, 4
test eax, eax
je 0x665571
push eax
call sym.postgres.exe_pfree
add esp, 4
push esi
call sym.postgres.exe_pfree
mov eax, dword [0x85e0e8]
or ecx, 0xffffffff
add dword [ebx + 0x1c], ecx
add esp, 4
add dword [eax + 4], ecx
mov edi, dword [edi + 4]
test edi, edi
jne 0x665522
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3