Function at 0x4b76e0
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 [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp eax, 0x680
je 0x4b7987
push ebx
push edi
push eax
push ecx
call sym.postgres.exe_GetDatabasePath
mov edi, eax
lea eax, [ebp - 0x28]
push eax
push edi
call sym.postgres.exe_pgwin32_safestat
add esp, 0x10
test eax, eax
jns 0x4b7927
mov ebx, dword [sym.imp.MSVCR100.dll__errno]
call ebx
cmp dword [eax], 2
push 0
jne 0x4b78f4
push 0x13
call sym.postgres.exe_LWLockAcquire
lea ecx, [ebp - 0x28]
push ecx
push edi
call sym.postgres.exe_pgwin32_safestat
add esp, 0x10
test eax, eax
jne 0x4b7761
mov edx, dword [ebp - 0x22]
and edx, 0xf000
cmp edx, 0x4000
je 0x4b78e5
push edi
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 4
test eax, eax
jns 0x4b78e5
call ebx
cmp dword [eax], 2
jne 0x4b7780
cmp byte [ebp + 0x10], 0
jne 0x4b77bc
push 0
push 0x6c8820
push 0x9b
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b77bc
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
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
push esi
push edi
push eax
call sym.postgres.exe_MemoryContextStrdup
mov esi, eax
push esi
call sym.postgres.exe_get_parent_directory
push esi
call sym.postgres.exe_get_parent_directory
push esi
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 0x14
test eax, eax
jns 0x4b7828
call ebx
cmp dword [eax], 0x11
je 0x4b7828
push 0
push 0x6c8820
push 0xac
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7828
push esi
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
push esi
call sym.postgres.exe_pfree
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
push edi
push ecx
call sym.postgres.exe_MemoryContextStrdup
mov esi, eax
push esi
call sym.postgres.exe_get_parent_directory
push esi
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 0x14
test eax, eax
jns 0x4b7894
call ebx
cmp dword [eax], 0x11
je 0x4b7894
push 0
push 0x6c8820
push 0xb7
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b7894
push esi
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
push esi
call sym.postgres.exe_pfree
push edi
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 8
pop esi
test eax, eax
jns 0x4b78e5
push 0
push 0x6c8820
push 0xbf
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b78e5
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
push 0x13
call sym.postgres.exe_LWLockRelease
add esp, 4
jmp 0x4b797c
push 0x6c8820
push 0xc9
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b797c
push edi
push str.could_not_stat_directory___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
jmp 0x4b7973
mov edx, dword [ebp - 0x22]
and edx, 0xf000
cmp edx, 0x4000
je 0x4b797c
push 0
push 0x6c8820
push 0xd3
push str.src_backendcommands_tablespace.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x4b797c
push edi
push str.__s__exists_but_is_not_a_directory
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x9008084
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
push edi
call sym.postgres.exe_pfree
add esp, 4
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret