Function at 0x495720
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 eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0xc]
cmp byte [ebx + 0x19], 0
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x50], ecx
je 0x4957ea
call sym.postgres.exe_superuser
test al, al
jne 0x4957ea
push 0
push str.execute_extension_script
test esi, esi
jne 0x49579d
push 0x31a
push str.src_backendcommandsextension.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4957ea
push str.Must_be_superuser_to_create_this_extension.
call sym.postgres.exe_errhint
mov edx, dword [ebx]
add esp, 4
push eax
push edx
push str.permission_denied_to_create_extension___s_
jmp 0x4957cb
push 0x320
push str.src_backendcommandsextension.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4957ea
push str.Must_be_superuser_to_update_this_extension.
call sym.postgres.exe_errhint
add esp, 4
push eax
mov eax, dword [ebx]
push eax
push str.permission_denied_to_update_extension___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x1005084
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
push edi
push esi
call fcn.00494d50
add esp, 8
mov dword [ebp - 0x54], eax
call sym.postgres.exe_NewGUCNestLevel
mov esi, 0x13
xor ebx, ebx
mov dword [ebp - 0x58], eax
cmp dword [sym.postgres.exe_client_min_messages], esi
jge 0x495829
push ebx
push 1
push 2
push 0xc
push 5
push str.warning
push 0x6b7bd4
call sym.postgres.exe_set_config_option
add esp, 0x1c
cmp dword [sym.postgres.exe_log_min_messages], esi
jge 0x49584c
push ebx
push 1
push 2
push 0xc
push 4
push str.warning
push 0x6b7be8
call sym.postgres.exe_set_config_option
add esp, 0x1c
lea ecx, [ebp - 0x70]
push ecx
call sym.postgres.exe_initStringInfo
mov edx, dword [ebp - 0x50]
push edx
call sym.postgres.exe_quote_identifier
push eax
lea eax, [ebp - 0x70]
push eax
call sym.postgres.exe_appendStringInfoString
mov eax, dword [ebp - 0x5c]
add esp, 0x10
cmp eax, ebx
je 0x4958ae
mov esi, dword [eax + 8]
cmp esi, ebx
je 0x4958ae
lea esp, [esp]
mov eax, dword [esi]
push eax
call sym.postgres.exe_get_namespace_name
add esp, 4
cmp eax, ebx
je 0x4958a7
push eax
call sym.postgres.exe_quote_identifier
push eax
lea ecx, [ebp - 0x70]
push 0x6c1dd8
push ecx
call sym.postgres.exe_appendStringInfo
add esp, 0x10
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x495880
mov edx, dword [ebp - 0x70]
push ebx
push 1
push 2
push 0xc
push 5
push edx
push str.search_path
call sym.postgres.exe_set_config_option
mov eax, dword [ebp + 8]
mov ecx, dword [sym.postgres.exe_PG_exception_stack]
mov edx, dword [sym.postgres.exe_error_context_stack]
mov dword [sym.postgres.exe_CurrentExtensionObject], eax
lea eax, [ebp - 0x44]
push ebx
push eax
mov byte [sym.postgres.exe_creating_extension], 1
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x4c], edx
call sub.MSVCR100.dll__setjmp3
add esp, 0x24
test eax, eax
jne 0x495a0f
mov edx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x60]
push edx
lea ecx, [ebp - 0x44]
push edi
mov dword [sym.postgres.exe_PG_exception_stack], ecx
call fcn.00495510
push eax
call sym.postgres.exe_cstring_to_text
push 0x6c1dc8
mov esi, eax
call sym.postgres.exe_cstring_to_text
add esp, 0x10
push eax
push 0x6aaa59
call sym.postgres.exe_cstring_to_text
add esp, 4
push eax
push str.echo._
call sym.postgres.exe_cstring_to_text
add esp, 4
push eax
push esi
push 0x3b6
push sym.postgres.exe_textregexreplace
call sym.postgres.exe_DirectFunctionCall4Coll
add esp, 0x18
mov esi, eax
cmp byte [edi + 0x18], bl
jne 0x49598f
mov eax, dword [ebp - 0x50]
push eax
call sym.postgres.exe_quote_identifier
push eax
call sym.postgres.exe_cstring_to_text
add esp, 8
push eax
push str._extschema_
call sym.postgres.exe_cstring_to_text
add esp, 4
push eax
push esi
push ebx
push sym.postgres.exe_replace_text
call sym.postgres.exe_DirectFunctionCall3Coll
add esp, 0x14
mov esi, eax
cmp dword [edi + 0xc], ebx
je 0x4959c0
mov ecx, dword [edi + 0xc]
push ecx
call sym.postgres.exe_cstring_to_text
add esp, 4
push eax
push str.MODULE_PATHNAME
call sym.postgres.exe_cstring_to_text
add esp, 4
push eax
push esi
push ebx
push sym.postgres.exe_replace_text
call sym.postgres.exe_DirectFunctionCall3Coll
add esp, 0x14
mov esi, eax
push esi
call sym.postgres.exe_pg_detoast_datum_packed
push eax
call sym.postgres.exe_text_to_cstring
mov edi, eax
call fcn.004955c0
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
push ecx
push 1
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov dword [sym.postgres.exe_error_context_stack], eax
mov byte [sym.postgres.exe_creating_extension], bl
mov dword [sym.postgres.exe_CurrentExtensionObject], ebx
call sym.postgres.exe_AtEOXact_GUC
mov ecx, dword [ebp - 4]
add esp, 0x10
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov dword [sym.postgres.exe_error_context_stack], eax
mov byte [sym.postgres.exe_creating_extension], bl
mov dword [sym.postgres.exe_CurrentExtensionObject], ebx
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3