Function at 0x48d7c0
Capabilities:
Delete directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 3
push 0x4ee
mov dword [ebp - 0xb0], esi
mov dword [ebp - 0xa4], eax
call sym.postgres.exe_heap_open
push 0
push 0
lea ecx, [ebp - 0xac]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0xa8]
mov edi, eax
push edx
push 8
mov eax, esi
mov dword [ebp - 0xd0], edi
call fcn.0048c840
add esp, 0x34
test al, al
jne 0x48d86e
push 0
push str.movedb
push 0x416
push str.src_backendcommandsdbcommands.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48d86e
push esi
push str.database___s__does_not_exist
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x503
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ebx, dword [ebp - 0xa8]
push 8
push 0
push ebx
push 0x4ee
call sym.postgres.exe_LockSharedObjectForSession
call sym.postgres.exe_GetUserId
push eax
push ebx
call sym.postgres.exe_pg_database_ownercheck
add esp, 0x18
test al, al
jne 0x48d8a3
push esi
push 3
push 2
call sym.postgres.exe_aclcheck_error
add esp, 0xc
cmp ebx, dword [sym.postgres.exe_MyDatabaseId]
jne 0x48d8ee
push 0
push str.movedb
push 0x42e
push str.src_backendcommandsdbcommands.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48d8ee
push str.cannot_change_the_tablespace_of_the_currently_open_database
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x6000145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov eax, dword [ebp - 0xa4]
push 0
push eax
call sym.postgres.exe_get_tablespace_oid
add esp, 8
mov esi, eax
push 0x200
mov dword [ebp - 0xa0], esi
call sym.postgres.exe_GetUserId
push eax
push esi
call sym.postgres.exe_pg_tablespace_aclcheck
add esp, 0xc
test eax, eax
je 0x48d931
mov ecx, dword [ebp - 0xa4]
push ecx
push 0xe
push eax
call sym.postgres.exe_aclcheck_error
add esp, 0xc
cmp esi, 0x680
jne 0x48d97c
push 0
push str.movedb
push 0x444
push str.src_backendcommandsdbcommands.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48d97c
push str.pg_global_cannot_be_used_as_default_tablespace
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x3080082
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov esi, dword [ebp - 0xac]
cmp esi, dword [ebp - 0xa0]
jne 0x48d9b5
push 0
push edi
call sym.postgres.exe_relation_close
push 8
push 0
push ebx
push 0x4ee
call sym.postgres.exe_UnlockSharedObjectForSession
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0xd4]
push edx
lea eax, [ebp - 0xcc]
push eax
push ebx
call sym.postgres.exe_CountOtherDBBackends
add esp, 0xc
test al, al
je 0x48da2c
push 0
push str.movedb
push 0x45c
push str.src_backendcommandsdbcommands.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48da2c
mov eax, dword [ebp - 0xd4]
mov ecx, dword [ebp - 0xcc]
call fcn.0048cd30
mov ecx, dword [ebp - 0xb0]
push eax
push ecx
push str.database___s__is_being_accessed_by_other_users
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x6000145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
push esi
push ebx
call sym.postgres.exe_GetDatabasePath
mov edx, dword [ebp - 0xa0]
push edx
push ebx
mov dword [ebp - 0xc0], eax
call sym.postgres.exe_GetDatabasePath
mov edi, eax
push 0x1c
mov dword [ebp - 0xc8], edi
call sym.postgres.exe_RequestCheckpoint
push edi
call sym.postgres.exe_AllocateDir
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x48db96
push edi
push ebx
call sym.postgres.exe_ReadDir
add esp, 8
test eax, eax
je 0x48db5e
lea ebx, [ebx]
lea esi, [eax + 8]
mov ecx, 0x6c0144
mov eax, esi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x48dab0
test dl, dl
je 0x48daac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x48dab0
add eax, 2
add ecx, 2
test dl, dl
jne 0x48da90
xor eax, eax
jmp 0x48dab5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x48db4c
mov ecx, 0x6c0140
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x48dae4
test dl, dl
je 0x48dae0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x48dae4
add eax, 2
add ecx, 2
test dl, dl
jne 0x48dac4
xor eax, eax
jmp 0x48dae9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x48db4c
push 0
push str.movedb
push 0x484
push str.src_backendcommandsdbcommands.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48db4c
push str.You_must_move_them_back_to_the_databases_default_tablespace_before_using_this_command.
call sym.postgres.exe_errhint
mov ecx, dword [ebp - 0xb0]
add esp, 4
push eax
mov eax, dword [ebp - 0xa4]
push eax
push ecx
push str.some_relations_of_database___s__are_already_in_tablespace___s_
call sym.postgres.exe_errmsg
add esp, 0xc
push eax
push 0x145
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
push edi
push ebx
call sym.postgres.exe_ReadDir
add esp, 8
test eax, eax
jne 0x48da80
push ebx
call sym.postgres.exe_FreeDir
push edi
call dword [sym.imp.MSVCR100.dll__rmdir]
add esp, 8
test eax, eax
je 0x48db96
push str.movedb
push 0x48e
push str.src_backendcommandsdbcommands.c
call sym.postgres.exe_elog_start
push edi
push str.could_not_remove_directory___s_:__m
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x18
mov edx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xa0]
lea ecx, [ebp - 0xb8]
push ecx
push 0x48c820
mov dword [ebp - 0xb8], edx
mov dword [ebp - 0xb4], eax
call sym.postgres.exe_on_shmem_exit
mov edx, dword [sym.postgres.exe_PG_exception_stack]
mov eax, dword [sym.postgres.exe_error_context_stack]
xor esi, esi
lea ecx, [ebp - 0x8c]
push esi
push ecx
mov dword [ebp - 0xbc], edx
mov dword [ebp - 0xc4], eax
call sub.MSVCR100.dll__setjmp3
add esp, 0x10
test eax, eax
jne 0x48de9f
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xc0]
push esi
push eax
lea edx, [ebp - 0x8c]
push ecx
mov dword [sym.postgres.exe_PG_exception_stack], edx
call sym.postgres.exe_copydir
mov edx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x98], edx
lea edx, [ebp - 0x104]
push edx
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0x9c]
push esi
push 4
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x104], ecx
mov dword [ebp - 0x100], 0x10
mov dword [ebp - 0xfc], esi
mov dword [ebp - 0xf4], esi
call sym.postgres.exe_XLogInsert
mov ebx, dword [ebp - 0xb0]
push ebx
push 0x3e
push 3
lea eax, [ebp - 0x134]
push 1
push eax
call sym.postgres.exe_ScanKeyInit
mov esi, dword [ebp - 0xd0]
lea ecx, [ebp - 0x134]
push ecx
push 1
push sym.postgres.exe_SnapshotNowData
push 1
push 0xa6f
push esi
call sym.postgres.exe_systable_beginscan
add esp, 0x44
push eax
mov dword [ebp - 0xa4], eax
call sym.postgres.exe_systable_getnext
mov edi, eax
add esp, 4
test edi, edi
jne 0x48dd00
push eax
push str.movedb
push 0x4c3
push str.src_backendcommandsdbcommands.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48dd00
push ebx
push str.database___s__does_not_exist
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x503
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
lea edx, [ebp - 0x4c]
test dl, 3
jne 0x48dd30
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
jmp 0x48dd40
push 0x30
lea eax, [ebp - 0x4c]
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xa0]
lea ecx, [ebp - 0x1c]
mov ecx, edx
push ecx
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x4c]
mov byte [ebp - 6], 1
mov ecx, dword [esi + 0x28]
push eax
push ecx
push edi
call sym.postgres.exe_heap_modify_tuple
mov ebx, eax
push ebx
add edi, 4
push edi
push esi
call sym.postgres.exe_simple_heap_update
push ebx
push esi
call sym.postgres.exe_CatalogUpdateIndexes
mov edx, dword [ebp - 0xa4]
push edx
call sym.postgres.exe_systable_endscan
push 0x1c
call sym.postgres.exe_RequestCheckpoint
call sym.postgres.exe_ForceSyncCommit
xor edi, edi
push edi
push esi
call sym.postgres.exe_relation_close
lea eax, [ebp - 0xb8]
push eax
push 0x48c820
call sym.postgres.exe_cancel_shmem_exit
mov ecx, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xc4]
add esp, 0x40
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov dword [sym.postgres.exe_error_context_stack], edx
call sym.postgres.exe_PopActiveSnapshot
call sym.postgres.exe_CommitTransactionCommand
call sym.postgres.exe_StartTransactionCommand
mov esi, dword [ebp - 0xc0]
push 1
push esi
call sym.postgres.exe_rmtree
add esp, 8
test al, al
jne 0x48de33
push edi
push str.movedb
push 0x505
push str.src_backendcommandsdbcommands.c
push 0x13
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x48de33
push esi
push str.some_useless_files_may_be_left_behind_in_old_database_directory___s_
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
mov eax, dword [ebp - 0xac]
mov esi, dword [ebp - 0xa8]
lea edx, [ebp - 0xf0]
push edx
lea ecx, [ebp - 0xdc]
push 0x10
push 4
mov dword [ebp - 0xdc], esi
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0xec], 8
mov dword [ebp - 0xe8], edi
mov dword [ebp - 0xe0], edi
call sym.postgres.exe_XLogInsert
push 8
push edi
push esi
push 0x4ee
call sym.postgres.exe_UnlockSharedObjectForSession
mov ecx, dword [ebp - 4]
add esp, 0x1c
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0xc4]
lea edx, [ebp - 0xb8]
push edx
push 0x48c820
mov dword [sym.postgres.exe_PG_exception_stack], eax
mov dword [sym.postgres.exe_error_context_stack], ecx
call sym.postgres.exe_cancel_shmem_exit
mov eax, dword [ebp - 0xb4]
mov ecx, dword [ebp - 0xb8]
push eax
push ecx
call sym.postgres.exe_GetDatabasePath
push 1
push eax
call sym.postgres.exe_rmtree
add esp, 0x18
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3