Function at 0x4b79a0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
push ebx
push edi
push 0x15
push eax
call sym.postgres.exe_MemoryContextAlloc
mov ebx, eax
mov eax, esi
add esp, 8
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4b79d0
sub eax, ecx
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
add eax, 0x12
push eax
push ecx
call sym.postgres.exe_MemoryContextAlloc
mov edx, dword [ebp + 8]
push edx
push str.pg_tblspc__u
push ebx
mov edi, eax
call sym.postgres.exe_pg_sprintf
push str.PG_9.2_201204301
push esi
push 0x6b04b0
push edi
call sym.postgres.exe_pg_sprintf
push 0x1c0
push esi
call dword [sym.imp.MSVCR100.dll__chmod]
add esp, 0x2c
test eax, eax
je 0x4b7ac3
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 2
push 0
push str.create_tablespace_directories
jne 0x4b7a8e
push 0x237
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7ac3
cmp byte [sym.postgres.exe_InRecovery], 0
je 0x4b7a64
push str.Create_this_directory_for_the_tablespace_before_restarting_the_server.
call sym.postgres.exe_errhint
add esp, 4
jmp 0x4b7a66
xor eax, eax
push eax
push esi
push str.directory___s__does_not_exist
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x1020205
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
jmp 0x4b7ac3
push 0x23c
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7ac3
push esi
push str.could_not_set_permissions_on_directory___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp byte [sym.postgres.exe_InRecovery], 0
je 0x4b7b30
lea eax, [ebp - 0x28]
push eax
push edi
call sym.postgres.exe_pgwin32_safestat
add esp, 8
test eax, eax
jne 0x4b7b30
mov ecx, dword [ebp - 0x22]
and ecx, 0xf000
cmp ecx, 0x4000
jne 0x4b7b30
push 1
push edi
call sym.postgres.exe_rmtree
add esp, 8
test al, al
jne 0x4b7b30
push 0
push str.create_tablespace_directories
push 0x24e
push str.src_backendcommands_tablespace.c
push 0x13
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7b30
push edi
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
push edi
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 4
test eax, eax
jns 0x4b7bbb
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 0x11
push 0
push str.create_tablespace_directories
jne 0x4b7b86
push 0x25c
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7bbb
push edi
push str.directory___s__already_in_use_as_a_tablespace
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x6000145
call sym.postgres.exe_errcode
add esp, 4
jmp 0x4b7bb2
push 0x261
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7bbb
push edi
push str.could_not_create_directory___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
cmp byte [sym.postgres.exe_InRecovery], 0
je 0x4b7c18
push ebx
call sym.postgres.exe_pgunlink
add esp, 4
test eax, eax
jns 0x4b7c18
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 2
je 0x4b7c18
push 0
push str.create_tablespace_directories
push 0x26b
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7c18
push ebx
push str.could_not_remove_symbolic_link___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
push ebx
push esi
call sym.postgres.exe_pgsymlink
add esp, 8
test eax, eax
jns 0x4b7c62
push 0
push str.create_tablespace_directories
push 0x275
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7c62
push ebx
push str.could_not_create_symbolic_link___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
push ebx
call sym.postgres.exe_pfree
push edi
call sym.postgres.exe_pfree
mov ecx, dword [ebp - 4]
add esp, 8
pop edi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret